/* Tip Calculator Styles - Dark Theme Default */

/* Calculator Container */
.calculator-container {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Tip Presets */
.tip-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preset-btn {
    padding: 0.75rem 0.5rem;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.preset-btn:hover {
    background: #334155;
    border-color: #475569;
}

.preset-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

/* Custom Tip Input */
.custom-tip-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.custom-tip-input input {
    flex: 1;
}

.custom-tip-input span {
    color: #94a3b8;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Button Group */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

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

.btn-secondary {
    background: #334155;
    color: #e2e8f0;
}

.btn-secondary:hover {
    background: #475569;
}

/* Results Container */
.results-container {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #334155;
}

.result-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
}

.result-card.highlight {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
}

.result-label {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.result-card.highlight .result-label {
    color: #dbeafe;
}

.result-value {
    color: #e2e8f0;
    font-size: 1.75rem;
    font-weight: 700;
}

.result-card.highlight .result-value {
    color: #ffffff;
}

/* Custom Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-content h3 {
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.modal-content p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.modal-content .btn-primary {
    width: 100%;
}

/* Info Sections */
.info-section {
    margin-bottom: 3rem;
}

.info-section h2 {
    color: #e2e8f0;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: #e2e8f0;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.info-card p {
    color: #94a3b8;
    line-height: 1.6;
}

/* Steps List */
.steps-list {
    max-width: 700px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.step-number {
    background: #3b82f6;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-item p {
    color: #e2e8f0;
    margin: 0;
    line-height: 1.6;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 0 auto;
}

.features-list li {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 0.75rem;
    color: #e2e8f0;
    position: relative;
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 1rem;
    color: #3b82f6;
    font-weight: 700;
    font-size: 1.2rem;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
}

.faq-item h3 {
    color: #e2e8f0;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    color: #94a3b8;
    line-height: 1.7;
    margin: 0;
}

/* Light Theme Overrides */
[data-theme="light"] .calculator-container,
[data-theme="light"] .info-card,
[data-theme="light"] .step-item,
[data-theme="light"] .features-list li,
[data-theme="light"] .faq-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .input-group label,
[data-theme="light"] .info-card h3,
[data-theme="light"] .step-item p,
[data-theme="light"] .features-list li,
[data-theme="light"] .faq-item h3,
[data-theme="light"] .result-value,
[data-theme="light"] .info-section h2 {
    color: #1e293b;
}

[data-theme="light"] .input-group input[type="number"],
[data-theme="light"] .preset-btn,
[data-theme="light"] .result-card {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

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

[data-theme="light"] .info-card p,
[data-theme="light"] .faq-item p {
    color: #64748b;
}

[data-theme="light"] .modal-content {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .modal-content h3 {
    color: #1e293b;
}

[data-theme="light"] .modal-content p {
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        padding: 1.5rem;
    }

    .tip-presets {
        grid-template-columns: repeat(3, 1fr);
    }

    .results-container {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 1rem;
    }

    .tip-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    .preset-btn {
        font-size: 0.85rem;
        padding: 0.65rem 0.4rem;
    }

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