﻿/* ================= ROOT LAYOUT ================= */

.pricing-stage {
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem;
    background: linear-gradient(180deg, #f9fafb, #ffffff);
}

.pricing-card {
    width: 100%;
    max-width: 680px;
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 10px 35px rgba(0,0,0,0.07);
    border: 1px solid #e0e0e0;
}

/* ================= HEADER ================= */

.pp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pp-nav {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .pp-nav:hover:not(:disabled) {
        background: #e2e8f0;
    }

    .pp-nav:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.pp-title {
    flex: 1;
}

.pp-month {
    font-size: 1.3rem;
    font-weight: 700;
}

.pp-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
    gap: 6px;
}

.pp-total {
    color: #0d6efd;
    font-weight: 700;
}

/* ================= CALENDAR ================= */

.pp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.pp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    transition: opacity 0.25s ease;
}

    .pp-grid.is-fading {
        opacity: 0;
    }

/* ================= DAY CELL ================= */

.pp-cell {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 28px 8px 8px; /* reserve space for badge */
    min-height: 70px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

    .pp-cell:hover:not(.pp-muted):not(.is-empty):not(.is-selected) {
        background-color: #f8f9fa;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }

    .pp-cell.pp-muted {
        opacity: 0.4;
        background: #f1f5f9;
        cursor: not-allowed;
    }

    .pp-cell.is-empty {
        border: none;
        background: transparent;
        cursor: default;
    }

/* ================= CELL CONTENT ================= */

.pp-day {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 3px;
}

.pp-price {
    font-size: 13px;
    color: #374151;
}

/* ================= BADGES ================= */

.pp-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    color: #fff;
    white-space: nowrap;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

    .pp-badge.high {
        background-color: #dc3545;
    }

    .pp-badge.medium {
        background-color: #fd7e14;
    }

    .pp-badge.low {
        background-color: #198754;
    }

/* ================= TODAY ================= */

.pp-cell.pp-today {
    border: 2px solid #0d6efd;
}

/* ================= SELECTED DATE ================= */

.pp-cell.is-selected {
    background: #e7f1ff;
    border-color: #0d6efd;
    color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

    .pp-cell.is-selected .pp-day,
    .pp-cell.is-selected .pp-price {
        color: #0d6efd;
        font-weight: 600;
    }

    .pp-cell.is-selected .pp-badge {
        background-color: #fff;
        color: #0d6efd;
        font-weight: 700;
    }

/* ================= PRICE LOCK ================= */

.price-lock-badge {
    background: #212529;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

@keyframes pulse {
    from {
        background-color: #c0392b;
    }

    to {
        background-color: #dc3545;
    }
}

#priceLock[data-active] {
    animation: pulse 1s infinite alternate;
    transform: scale(1.05);
}

/* ================= VALIDATION ================= */

.pp-validation {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.pp-client-validation-error {
    display: none;
    text-align: center;
    color: #dc2626;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 999px;
    max-width: 90%;
    box-shadow: 0 2px 6px rgba(220,38,38,0.2);
}

/* ================= LEGEND ================= */

.pp-legend {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

/* ================= MOBILE ================= */

@media (max-width: 576px) {
    .pricing-card {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .pp-grid {
        gap: 6px;
    }

    .pp-cell {
        min-height: 60px;
        padding-top: 24px;
    }

    .pp-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.45rem;
    }
}
