/* ============================================================
   solar-calculator.css
   رنگ‌ها:
     --primary:      #00C6A9
     --primary-dark:  #00a68e
     --accent:       #F9E65C
   ============================================================ */

/* -------------------- Cloak -------------------- */
[x-cloak] {
    display: none !important;
}

/* ==================== HERO ==================== */
.sc-hero {
    background: linear-gradient(135deg, #003d33 0%, #005c4b 30%, #00896e 60%, #00C6A9 100%);
    position: relative;
    overflow: hidden;
}

.sc-hero-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.sc-hero-glow--1 {
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(249, 230, 92, 0.12) 0%, transparent 70%);
}

.sc-hero-glow--2 {
    bottom: -30%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 198, 169, 0.15) 0%, transparent 70%);
}

.sc-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.sc-hero-wave svg {
    width: 100%;
    height: auto;
    display: block;
}

.sc-highlight {
    color: #F9E65C;
    background: rgba(249, 230, 92, 0.15);
    padding: 2px 12px;
    border-radius: 6px;
}

/* ==================== CARD ==================== */
.sc-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.03),
        0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.sc-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 198, 169, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==================== FORM ==================== */
.sc-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 8px;
}

.sc-input-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
    background: #fff;
}

.sc-input-wrap:focus-within {
    border-color: #00C6A9;
    box-shadow: 0 0 0 3px rgba(0, 198, 169, 0.12);
}

.sc-input {
    border: none;
    padding: 12px 14px;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    outline: none;
    font-family: 'Vazirmatn', sans-serif;
    color: #1f2937;
    background: transparent;
}

.sc-input::-webkit-inner-spin-button,
.sc-input::-webkit-outer-spin-button {
    opacity: 1;
}

.sc-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.sc-unit {
    padding: 12px 14px;
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
}

.sc-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 5px;
}

/* ---- Range ---- */
.sc-range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to left, #00C6A9, #00a68e);
    outline: none;
    cursor: pointer;
}

.sc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #00C6A9;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 198, 169, 0.3);
    transition: all 0.15s;
}

.sc-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 198, 169, 0.45);
}

.sc-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #00C6A9;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 198, 169, 0.3);
}

/* ---- Select ---- */
.sc-select {
    width: 100%;
    padding: 12px 14px;
    padding-left: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
}

.sc-select:focus {
    border-color: #00C6A9;
    box-shadow: 0 0 0 3px rgba(0, 198, 169, 0.12);
}

/* ---- Presets ---- */
.sc-preset {
    padding: 5px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
}

.sc-preset:hover {
    border-color: #00C6A9;
    color: #00a68e;
    background: rgba(0, 198, 169, 0.05);
}

.sc-preset--active {
    padding: 5px 14px;
    border: 2px solid #00C6A9;
    border-radius: 20px;
    background: rgba(0, 198, 169, 0.1);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    color: #00a68e;
}

/* ==================== BUTTONS ==================== */
.sc-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #00C6A9, #00a68e);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(0, 198, 169, 0.3);
}

.sc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 198, 169, 0.4);
}

.sc-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 198, 169, 0.3);
}

.sc-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: none;
    border: 1px dashed #00C6A9;
    color: #00a68e;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.sc-btn-ghost:hover {
    background: rgba(0, 198, 169, 0.06);
    border-style: solid;
}

.sc-btn-pro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #F9E65C, #eab308);
    color: #1f2937;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.25s;
}

.sc-btn-pro:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(249, 230, 92, 0.35);
}

/* ==================== RESULTS ==================== */
.sc-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    transition: all 0.25s;
}

.sc-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sc-result-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sc-result--blue {
    background: #eff6ff;
}

.sc-result--green {
    background: #ecfdf5;
}

.sc-result--amber {
    background: #fffbeb;
}

.sc-result--sky {
    background: #f0f9ff;
}

.sc-result--pink {
    background: #fdf2f8;
}

.sc-result--teal {
    background: #f0fdfa;
}

.sc-result-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1;
    margin-bottom: 4px;
}

.sc-result-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
    color: #1f2937;
    line-height: 1.2;
}

.sc-result-unit {
    display: block;
    font-size: 0.65rem;
    color: #9ca3af;
    line-height: 1;
    margin-top: 2px;
}

/* ==================== CHART ==================== */
.sc-chart {
    height: 180px;
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding-bottom: 22px;
}

.sc-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.sc-chart-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 2px;
    cursor: pointer;
}

.sc-chart-bar:hover {
    filter: brightness(1.15);
}

.sc-chart-bar--green {
    background: linear-gradient(to top, #00C6A9, #34d399);
}

.sc-chart-bar--red {
    background: linear-gradient(to top, #f87171, #F9E65C);
}

.sc-chart-year {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 4px;
}

.sc-chart-line {
    position: absolute;
    width: 100%;
    border-top: 2px dashed #F9E65C;
    left: 0;
    pointer-events: none;
    transition: bottom 0.5s ease;
}

.sc-chart-line-label {
    position: absolute;
    left: 4px;
    top: -18px;
    font-size: 10px;
    color: #d97706;
    font-weight: 700;
    white-space: nowrap;
    background: #fffbeb;
    padding: 1px 8px;
    border-radius: 4px;
    border: 1px solid #fde68a;
}

/* ==================== PRO SECTION ==================== */
.sc-pro {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(249, 230, 92, 0.08);
}

.sc-pro-glow {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 198, 169, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.sc-pro-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: right;
}

.sc-pro-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

/* ==================== MODAL ==================== */
.sc-modal-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    color: #374151;
}

.sc-modal-input:focus {
    border-color: #00C6A9;
    box-shadow: 0 0 0 3px rgba(0, 198, 169, 0.12);
}

.sc-modal-input::placeholder {
    color: #9ca3af;
}

/* ==================== FOOTER ==================== */
.sc-footer {
    background: linear-gradient(180deg, #0f172a 0%, #0c1220 100%);
    padding-top: 48px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes sc-fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sc-result {
    animation: sc-fadeUp 0.35s ease both;
}

.sc-result:nth-child(1) { animation-delay: 0.00s; }
.sc-result:nth-child(2) { animation-delay: 0.06s; }
.sc-result:nth-child(3) { animation-delay: 0.12s; }
.sc-result:nth-child(4) { animation-delay: 0.18s; }
.sc-result:nth-child(5) { animation-delay: 0.24s; }
.sc-result:nth-child(6) { animation-delay: 0.30s; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .sc-card {
        padding: 20px;
    }

    .sc-result {
        padding: 10px;
        gap: 10px;
    }

    .sc-result-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .sc-result-value {
        font-size: 1.15rem;
    }

    .sc-chart {
        height: 140px;
    }

    .sc-pro {
        padding: 24px 20px;
    }

    .sc-footer {
        padding-top: 36px;
    }
}