/* Calculator Page Styles */

.calculator-page {
    padding-top: 65px;
    background: var(--bg-primary);
}

/* Hero */
.calc-hero {
    padding: 60px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.calc-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-light);
    border-radius: 100px;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.calc-hero h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.calc-hero p {
    font-size: 1em;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

/* Calculator Section */
.calc-section {
    padding: 60px 0;
}

.calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* Inputs */
.calc-inputs h2 {
    font-size: 1.5em;
    margin-bottom: 8px;
}

.calc-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.spending-categories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.category-icon {
    font-size: 1.4em;
}

.category-header label {
    font-weight: 600;
    color: var(--text-primary);
}

.input-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Slider */
.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 100px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--accent-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--accent-glow);
    transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--accent-gradient);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.value-input {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 100px;
}

.value-input span {
    color: var(--text-muted);
    font-weight: 500;
}

.value-input input {
    width: 70px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    outline: none;
}

/* Total */
.total-spending {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
}

.total-spending span:first-child {
    font-weight: 600;
    color: var(--text-secondary);
}

.total-value {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--accent-secondary);
}

/* Results */
.calc-results h2 {
    font-size: 1.5em;
    margin-bottom: 24px;
}

.results-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.loading-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.reward-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: all 0.2s ease;
}

.reward-card:hover {
    border-color: var(--border-accent);
}

.reward-card.top-card {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
}

.best-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    padding: 4px 12px;
    background: var(--success);
    color: white;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
}

.reward-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.card-image-small {
    width: 60px;
    height: 38px;
    background: var(--bg-elevated);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
}

.card-image-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.card-image-small span {
    font-weight: 700;
    color: var(--text-muted);
}

.card-info h3 {
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 2px;
}

.card-info p {
    color: var(--text-muted);
    font-size: 0.85em;
}

.reward-breakdown {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
    margin-bottom: 16px;
}

.reward-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.reward-row span:first-child {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.reward-row .value {
    font-weight: 600;
}

.reward-row .value.positive {
    color: var(--success);
}

.reward-row .value.negative {
    color: #ef4444;
}

.reward-row.total {
    border-top: 1px solid var(--border-subtle);
    margin-top: 8px;
    padding-top: 16px;
}

.reward-row.total span:first-child {
    font-weight: 700;
    color: var(--text-primary);
}

.reward-row.total .value {
    font-size: 1.2em;
    font-weight: 800;
}

.reward-card-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.btn-apply-small {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0d6e3f 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(13, 110, 63, 0.25);
}

.btn-apply-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 63, 0.35);
}

.btn-apply-small.disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-apply-small.disabled:hover {
    transform: none;
}

.btn-view-card {
    padding: 12px 16px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-view-card:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.results-note {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
}

.results-note p {
    color: var(--text-muted);
    font-size: 0.85em;
    margin: 0;
}

/* How It Works */
.how-it-works {
    padding: 80px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.how-it-works h2 {
    font-size: 1.75em;
    text-align: center;
    margin-bottom: 48px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step {
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    font-weight: 800;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .calc-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .calc-hero {
        padding: 60px 0 40px;
    }
    
    .calc-hero h1 {
        font-size: 1.75rem;
    }
    
    .category-input {
        padding: 16px;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .value-input {
        justify-content: center;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}


