/**
 * Percentage Calculator Tool Styles
 * Light theme default with dark theme support
 */

.percentage-calculator-container {
    margin-top: 2rem;
}

/* Tab Navigation */
.calc-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
    overflow: hidden;
}

.calc-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    top: 2px;
}

.calc-tab:hover {
    color: #1f2937;
    background-color: #f3f4f6;
    border-radius: 8px 8px 0 0;
}

.calc-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

/* Calculator Panels */
.calc-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.calc-panel.active {
    display: block;
}

.calc-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.calc-description {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Form Styles */
.calc-form {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
}

.form-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.form-input:hover {
    border-color: #d1d5db;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.operator {
    font-size: 1.75rem;
    font-weight: 700;
    color: #6b7280;
    padding-bottom: 0.875rem;
    user-select: none;
}

/* Result Display */
.result-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.result-label {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #3b82f6;
}

.result-detail {
    text-align: center;
    font-size: 0.9375rem;
    color: #6b7280;
    font-weight: 500;
    min-height: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calc-tab {
        padding: 0.625rem 0.25rem;
        font-size: 0.8125rem;
    }

    .calc-heading {
        font-size: 1.25rem;
    }

    .calc-form {
        padding: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .operator {
        display: none;
    }

    .result-display {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .result-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .percentage-calculator-container {
        margin-top: 1.5rem;
    }

    .calc-tabs {
        margin-bottom: 1.5rem;
    }

    .calc-tab {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }

    .calc-heading {
        font-size: 1.125rem;
    }

    .calc-description {
        font-size: 0.875rem;
    }

    .calc-form {
        padding: 1.25rem;
    }

    .form-input {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .result-value {
        font-size: 1.5rem;
    }
}

/* Dark Theme - System Preference */
@media (prefers-color-scheme: dark) {
    .calc-tabs {
        border-bottom-color: #334155;
    }

    .calc-tab {
        color: #94a3b8;
    }

    .calc-tab:hover {
        color: #e2e8f0;
        background-color: rgba(255, 255, 255, 0.05);
    }

    .calc-tab.active {
        color: #60a5fa;
        border-bottom-color: #60a5fa;
    }

    .calc-heading {
        color: #e2e8f0;
    }

    .calc-description {
        color: #94a3b8;
    }

    .calc-form {
        background-color: #1e293b;
        border-color: #334155;
    }

    .form-label {
        color: #94a3b8;
    }

    .form-input {
        background-color: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }

    .form-input:hover {
        border-color: #475569;
    }

    .form-input::placeholder {
        color: #64748b;
    }

    .operator {
        color: #94a3b8;
    }

    .result-display {
        background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, transparent 100%);
        border-color: #60a5fa;
    }

    .result-label {
        color: #94a3b8;
    }

    .result-value {
        color: #60a5fa;
    }

    .result-detail {
        color: #94a3b8;
    }
}

/* Light Theme Explicit */
[data-theme="light"] .calc-tabs {
    border-bottom-color: #e5e7eb;
}

[data-theme="light"] .calc-tab {
    color: #6b7280;
}

[data-theme="light"] .calc-tab:hover {
    color: #1f2937;
    background-color: #f3f4f6;
}

[data-theme="light"] .calc-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

[data-theme="light"] .calc-heading {
    color: #1f2937;
}

[data-theme="light"] .calc-description {
    color: #6b7280;
}

[data-theme="light"] .calc-form {
    background-color: #f8fafc;
    border-color: #e5e7eb;
}

[data-theme="light"] .form-label {
    color: #6b7280;
}

[data-theme="light"] .form-input {
    background-color: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .form-input:hover {
    border-color: #d1d5db;
}

[data-theme="light"] .form-input::placeholder {
    color: #9ca3af;
}

[data-theme="light"] .operator {
    color: #6b7280;
}

[data-theme="light"] .result-display {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-color: #3b82f6;
}

[data-theme="light"] .result-label {
    color: #6b7280;
}

[data-theme="light"] .result-value {
    color: #3b82f6;
}

[data-theme="light"] .result-detail {
    color: #6b7280;
}

/* Dark Theme Explicit */
[data-theme="dark"] .calc-tabs {
    border-bottom-color: #334155;
}

[data-theme="dark"] .calc-tab {
    color: #94a3b8;
}

[data-theme="dark"] .calc-tab:hover {
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calc-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

[data-theme="dark"] .calc-heading {
    color: #e2e8f0;
}

[data-theme="dark"] .calc-description {
    color: #94a3b8;
}

[data-theme="dark"] .calc-form {
    background-color: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .form-label {
    color: #94a3b8;
}

[data-theme="dark"] .form-input {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .form-input:hover {
    border-color: #475569;
}

[data-theme="dark"] .form-input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .operator {
    color: #94a3b8;
}

[data-theme="dark"] .result-display {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, transparent 100%);
    border-color: #60a5fa;
}

[data-theme="dark"] .result-label {
    color: #94a3b8;
}

[data-theme="dark"] .result-value {
    color: #60a5fa;
}

[data-theme="dark"] .result-detail {
    color: #94a3b8;
}
