/**
 * Zakat Calculator - Dark Celestial Theme
 * Matches MakkahCompass design system
 */

/* ========================================
   CSS VARIABLES
   ======================================== */

.zakat-calculator-app {
    --zk-midnight: #0A1628;
    --zk-deep-space: #0F1D32;
    --zk-night-blue: #152238;
    --zk-twilight: #1E3050;
    --zk-gold: #D4A941;
    --zk-gold-light: #E8D5A3;
    --zk-gold-bright: #F5C84C;
    --zk-emerald: #10B981;
    --zk-emerald-deep: #0D3B2D;
    --zk-cream: #F5F5F0;
    --zk-pearl: #E8E8E3;
    --zk-mist: #94A3B8;
    --zk-slate: #64748B;
    --zk-red: #EF4444;
    --zk-font-display: 'Cormorant Garamond', Georgia, serif;
    --zk-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --zk-radius-md: 8px;
    --zk-radius-lg: 16px;
}

/* ========================================
   APP CONTAINER
   ======================================== */

.zakat-calculator-app {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-family: var(--zk-font-body);
    color: var(--zk-cream);
}

/* ========================================
   NISAB DISPLAY
   ======================================== */

.nisab-display {
    background: linear-gradient(135deg, var(--zk-emerald-deep), rgba(16, 80, 61, 0.8));
    border: 1px solid rgba(212, 169, 65, 0.2);
    border-radius: var(--zk-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.nisab-display h3 {
    margin: 0 0 1rem;
    color: var(--zk-gold);
    font-family: var(--zk-font-display);
    font-size: 1.25rem;
}

.nisab-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.nisab-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--zk-radius-md);
    padding: 1rem;
}

.nisab-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.nisab-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.nisab-label {
    font-size: 0.8rem;
    color: var(--zk-mist);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nisab-value {
    font-weight: 700;
    color: var(--zk-gold);
    font-size: 0.95rem;
}

.nisab-note {
    margin: 0;
    font-size: 0.85rem;
    color: var(--zk-pearl);
    opacity: 0.9;
}

/* ========================================
   CALCULATOR SECTIONS
   ======================================== */

.calc-section {
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.4), rgba(15, 29, 50, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--zk-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.calc-section h3 {
    margin: 0 0 1.25rem;
    color: var(--zk-gold);
    font-family: var(--zk-font-display);
    font-size: 1.2rem;
}

/* ========================================
   INPUT GROUPS
   ======================================== */

.input-group {
    margin-bottom: 1rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--zk-pearl);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--zk-radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--zk-gold);
    box-shadow: 0 0 0 3px rgba(212, 169, 65, 0.15);
}

.input-prefix {
    padding: 0.75rem 0.75rem;
    color: var(--zk-mist);
    font-weight: 600;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--zk-cream);
    font-size: 1rem;
    padding: 0.75rem;
    font-family: var(--zk-font-body);
    outline: none;
    min-width: 0;
}

.input-wrapper input::placeholder {
    color: var(--zk-slate);
}

/* ========================================
   RESULTS SECTION
   ======================================== */

.calc-results {
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.5), rgba(15, 29, 50, 0.7));
    border: 2px solid rgba(212, 169, 65, 0.2);
    border-radius: var(--zk-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.95rem;
    color: var(--zk-pearl);
}

.result-row:last-of-type {
    border-bottom: none;
}

.result-value {
    font-weight: 700;
    color: var(--zk-cream);
    font-variant-numeric: tabular-nums;
}

.result-net {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.result-net .result-value {
    color: var(--zk-gold);
    font-size: 1.1rem;
}

/* Nisab Status */
.nisab-status {
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--zk-radius-md);
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: var(--zk-mist);
    background: rgba(0, 0, 0, 0.15);
}

.nisab-status.nisab-due {
    background: rgba(13, 59, 45, 0.5);
    color: var(--zk-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.nisab-status.nisab-below {
    background: rgba(30, 48, 80, 0.4);
    color: var(--zk-mist);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Zakat Amount */
.result-zakat {
    padding-top: 1rem;
}

.result-zakat span:first-child {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--zk-cream);
}

.zakat-amount {
    font-family: var(--zk-font-display);
    font-size: 1.75rem !important;
    color: var(--zk-gold) !important;
    text-shadow: 0 0 20px rgba(212, 169, 65, 0.3);
}

/* ========================================
   ACTIONS
   ======================================== */

.calc-actions {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--zk-gold);
    border: 2px solid var(--zk-gold);
    border-radius: var(--zk-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--zk-gold);
    color: var(--zk-midnight);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
    .nisab-grid {
        grid-template-columns: 1fr;
    }

    .zakat-calculator-app {
        padding: 0;
    }

    .calc-section,
    .calc-results {
        padding: 1rem;
    }

    .zakat-amount {
        font-size: 1.4rem !important;
    }
}

/* ========================================
   PRINT & ACCESSIBILITY
   ======================================== */

@media print {
    .calc-actions { display: none; }
    .zakat-calculator-app { color: black; }
    .input-wrapper { border-color: #ccc; }
}

.input-wrapper input:focus-visible {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
