/* assets/css/calculators/discount-calculator.css */

/* Widget Container */
.discount-widget-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Calculator Form */
.calculator-form {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

/* Discount Type Toggle */
.discount-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 5px;
    border-radius: 10px;
}

.type-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn.active {
    background: #fff;
    color: #f97316;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Inputs */
.input-wrapper {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.input-field {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fff;
}

.input-field:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Quick Buttons */
.quick-discounts {
    margin-bottom: 20px;
}

.quick-discount-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 700;
}

.quick-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.quick-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* Action Button */
.calc-action-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.calc-action-btn:hover {
    transform: translateY(-2px);
}

/* Error Message */
.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
    background: #fef2f2;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #ef4444;
}

/* --- RESULT SECTION --- */
.calc-result {
    margin-top: 2rem;
    padding: 2rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.5s ease;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #64748b;
    font-weight: 500;
}

.result-value {
    font-weight: 700;
    color: #111;
}

.result-savings {
    margin-top: 15px;
    padding: 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

.result-savings .result-value {
    color: #059669;
    font-size: 1.2rem;
}

.result-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #fff;
}

.result-total .result-value {
    font-size: 1.8rem;
    color: #f97316;
}

.discount-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #f97316;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 8px;
    vertical-align: middle;
}

/* Coupon */
.coupon-display {
    margin-top: 15px;
    padding: 10px;
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.coupon-code {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #d97706;
    letter-spacing: 1px;
}

/* Comparison Table */
.table-container {
    margin-top: 2rem;
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    padding: 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    margin: 0;
}

.table-wrapper {
    overflow-x: auto;
}

.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.calc-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.calc-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

.calc-table tr:hover {
    background-color: #f8fafc;
}

.calc-table .highlight-row {
    background-color: #eff6ff !important;
    font-weight: 700;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.text-center {
    text-align: center;
}

/* SEO & FAQ Styles */
.info-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 30px;
}

.info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.formula-box {
    background: #f8fafc;
    border-left: 4px solid #f97316;
    padding: 15px;
    margin: 15px 0;
    font-family: monospace;
}

.faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    color: var(--text-main);
}

.faq-answer {
    padding: 0 15px 15px;
    display: none;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-answer.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .calc-row {
        display: block;
    }

    .calc-row>div {
        margin-bottom: 15px;
    }
}