/* Case Converter Tool Styles */

.case-converter-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.textarea-wrapper {
    position: relative;
}

.case-textarea {
    width: 100%;
    min-height: 250px;
    padding: 1rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color, #1f2937);
    background-color: var(--bg-color, #ffffff);
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.case-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.case-textarea::placeholder {
    color: var(--placeholder-color, #9ca3af);
}

.textarea-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-text-color, #6b7280);
}

.stat-item {
    display: flex;
    gap: 0.25rem;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color, #3b82f6);
}

.conversion-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.case-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    background-color: var(--bg-color, #ffffff);
    color: var(--text-color, #1f2937);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.case-btn:hover {
    border-color: var(--primary-color, #3b82f6);
    background-color: var(--primary-bg-hover, #eff6ff);
    color: var(--primary-color, #3b82f6);
    transform: translateY(-1px);
}

.case-btn:active {
    transform: translateY(0);
}

.case-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-copy,
.btn-clear {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy {
    background-color: var(--primary-color, #3b82f6);
    color: white;
}

.btn-copy:hover {
    background-color: var(--primary-hover, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-clear {
    background-color: var(--secondary-bg, #f3f4f6);
    color: var(--text-color, #1f2937);
}

.btn-clear:hover {
    background-color: var(--secondary-bg-hover, #e5e7eb);
    transform: translateY(-1px);
}

.btn-copy svg,
.btn-clear svg {
    width: 20px;
    height: 20px;
}

.copy-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background-color: var(--success-bg, #10b981);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideInUp 0.3s ease;
    z-index: 1000;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1f2937;
        --text-color: #f9fafb;
        --border-color: #374151;
        --muted-text-color: #9ca3af;
        --placeholder-color: #6b7280;
        --primary-bg-hover: #1e3a8a;
        --secondary-bg: #374151;
        --secondary-bg-hover: #4b5563;
    }
}

/* Light theme override (when explicitly set) */
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --muted-text-color: #6b7280;
    --placeholder-color: #9ca3af;
    --primary-bg-hover: #eff6ff;
    --secondary-bg: #f3f4f6;
    --secondary-bg-hover: #e5e7eb;
}

/* Dark theme override (when explicitly set) */
[data-theme="dark"] {
    --bg-color: #1f2937;
    --text-color: #f9fafb;
    --border-color: #374151;
    --muted-text-color: #9ca3af;
    --placeholder-color: #6b7280;
    --primary-bg-hover: #1e3a8a;
    --secondary-bg: #374151;
    --secondary-bg-hover: #4b5563;
}

/* Responsive design */
@media (max-width: 640px) {
    .conversion-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .case-btn {
        font-size: 0.8125rem;
        padding: 0.625rem 0.75rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-copy,
    .btn-clear {
        width: 100%;
        justify-content: center;
    }

    .copy-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        text-align: center;
    }
}
