/* =====================================================
   CZORS BOOKING HISTORY
===================================================== */

.czors-history {
    max-width: 980px;
}

.czors-history-head {
    margin-bottom: 28px;
}

.czors-history-head h1 {
    margin: 0;
    color: var(--czors-text);
    font-size: 42px;
    font-weight: 900;
}

.czors-history-head p {
    margin: 8px 0 0;
    color: var(--czors-muted);
    font-size: 16px;
}

/* Summary Cards */

.czors-history-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 30px 0;
}

.czors-history-stat {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
    border: 1px solid var(--czors-border);
    position: relative;
    overflow: hidden;
}

.czors-history-stat span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--czors-muted);
    margin-bottom: 10px;
}

.czors-history-stat strong {
    font-size: 34px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.czors-history-stat::after {
    content: "";
    position: absolute;
    right: -25px;
    bottom: -25px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: .12;
}

.czors-history-stat.upcoming::after { background: #22c55e; }
.czors-history-stat.completed::after { background: #3b82f6; }
.czors-history-stat.pending::after { background: #f28c28; }
.czors-history-stat.cancelled::after { background: #ef4444; }

/* Filter Chips */

.czors-history-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 14px;
    margin: 22px 0 28px;
}

.czors-history-filter::-webkit-scrollbar {
    display: none;
}

.czors-history-filter button {
    border: 1px solid var(--czors-border);
    background: rgba(255,255,255,.05);
    color: var(--czors-muted);
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.czors-history-filter button.active {
    background: var(--czors-primary);
    border-color: var(--czors-primary);
    color: #fff;
}

/* Booking Cards */

.czors-history-list {
    display: grid;
    gap: 18px;
}

.czors-history-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
    border: 1px solid var(--czors-border);
    color: var(--czors-text);
}

.czors-history-left {
    flex: 1;
}

.czors-history-left h3 {
    margin: 14px 0 6px;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}

.czors-history-left .provider {
    margin: 0;
    color: var(--czors-muted);
    font-size: 14px;
}

.czors-history-details {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.czors-history-details span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--czors-muted);
}

.czors-history-details svg {
    width: 16px;
    height: 16px;
    color: var(--czors-primary);
}

.czors-history-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.czors-history-right strong {
    font-size: 24px;
    font-weight: 900;
    color: var(--czors-primary);
}

.czors-history-right a {
    color: var(--czors-primary);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

/* Status Badges */

.czors-history-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.czors-history-status.approved {
    background: rgba(34,197,94,.14);
    color: #4ade80;
}

.czors-history-status.pending {
    background: rgba(242,140,40,.14);
    color: var(--czors-primary);
}

.czors-history-status.canceled,
.czors-history-status.cancelled {
    background: rgba(239,68,68,.14);
    color: #f87171;
}

/* Empty State */

.czors-history-empty {
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--czors-border);
    background: rgba(255,255,255,.04);
}

.czors-history-empty h3 {
    margin: 0 0 8px;
    color: var(--czors-text);
}

.czors-history-empty p {
    color: var(--czors-muted);
}

.czors-history-empty a {
    color: var(--czors-primary);
    font-weight: 900;
}

/* Mobile */

@media (max-width: 900px) {
    .czors-history {
        padding: 18px;
        padding-bottom: 100px;
        max-width: 100%;
    }

    .czors-history-head {
        margin-bottom: 22px;
    }

    .czors-history-head h1 {
        font-size: 32px;
    }

    .czors-history-head p {
        font-size: 14px;
    }

    .czors-history-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin: 24px 0;
    }

    .czors-history-stat {
        padding: 18px;
        border-radius: 20px;
    }

    .czors-history-stat strong {
        font-size: 28px;
    }

    .czors-history-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        border-radius: 22px;
        gap: 16px;
    }

    .czors-history-left h3 {
        font-size: 20px;
    }

    .czors-history-details {
        flex-direction: column;
        gap: 8px;
    }

    .czors-history-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 14px;
        border-top: 1px solid var(--czors-border);
    }

    .czors-history-right strong {
        font-size: 20px;
    }
}
/* Success toast */
.czors-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 14px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
    animation: czorsToastIn .25s ease both;
}

.czors-toast-success {
    background: rgba(34,197,94,.95);
    color: #fff;
}

@keyframes czorsToastIn {
    from {
        opacity: 0;
        transform: translate(-50%, 12px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* =====================================================
   BOOKING SEARCH AND SORT
===================================================== */

.czors-history-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 12px;
    margin-bottom: 16px;
}

.czors-history-search {
    min-height: 50px;
    padding: 0 15px;
    border: 1px solid var(--czors-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
    display: flex;
    align-items: center;
    gap: 10px;
}

.czors-history-search svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--czors-primary);
}

.czors-history-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--czors-text);
    font: inherit;
    font-size: 14px;
}

.czors-history-search input::placeholder {
    color: var(--czors-muted);
}

.czors-history-search:focus-within {
    border-color: rgba(242, 140, 40, .55);
    background: rgba(255, 255, 255, .065);
    box-shadow: 0 0 0 3px rgba(242, 140, 40, .10);
}

.czors-history-no-results {
    padding: 42px 20px;
    border: 1px solid var(--czors-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, .035);
    text-align: center;
}

.czors-history-no-results[hidden] {
    display: none;
}

.czors-history-no-results svg {
    width: 32px;
    height: 32px;
    color: var(--czors-primary);
}

.czors-history-no-results h3 {
    margin: 12px 0 6px;
    color: var(--czors-text);
    font-size: 20px;
    font-weight: 900;
}

.czors-history-no-results p {
    margin: 0;
    color: var(--czors-muted);
    font-size: 14px;
}

.czors-history-filter button {
    color: var(--czors-muted) !important;
}

.czors-history-filter button.active {
    color: #fff !important;
}

.czors-history-card[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .czors-history-tools {
        grid-template-columns: 1fr;
    }

    .czors-history-search {
        min-height: 48px;
    }
}
/* =====================================================
   CUSTOM BOOKING SORT DROPDOWN
===================================================== */

.czors-history-sort-custom {
    position: relative;
    min-width: 220px;
}

.czors-history-sort-trigger {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--czors-border);
    border-radius: 16px;
    background: rgba(255,255,255,.045);
    color: var(--czors-text);
    display: flex;
    align-items: center;
    gap: 10px;
    font: inherit;
    cursor: pointer;
    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.czors-history-sort-trigger:hover,
.czors-history-sort-custom.open
.czors-history-sort-trigger {
    border-color: rgba(242,140,40,.55);
    background: rgba(255,255,255,.065);
}

.czors-history-sort-custom.open
.czors-history-sort-trigger {
    box-shadow: 0 0 0 3px rgba(242,140,40,.10);
}

.czors-history-sort-trigger > svg:first-child {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--czors-primary);
}

.czors-history-sort-label {
    flex: 1;
    text-align: left;
    font-size: 13px;
    font-weight: 850;
}

.czors-history-sort-chevron {
    width: 17px;
    height: 17px;
    color: var(--czors-muted);
    transition: transform .2s ease;
}

.czors-history-sort-custom.open
.czors-history-sort-chevron {
    transform: rotate(180deg);
}

.czors-history-sort-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: 100%;
    min-width: 220px;
    padding: 7px;
    border: 1px solid var(--czors-border);
    border-radius: 16px;
    background: #111a24;
    box-shadow: 0 18px 45px rgba(0,0,0,.38);
}

.czors-history-sort-menu[hidden] {
    display: none;
}

.czors-history-sort-option {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--czors-muted);
    display: flex;
    align-items: center;
    gap: 9px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
    transition:
        background .18s ease,
        color .18s ease;
}

.czors-history-sort-option:hover {
    background: rgba(255,255,255,.055);
    color: var(--czors-text);
}

.czors-history-sort-option.active {
    background: rgba(242,140,40,.13);
    color: var(--czors-primary);
}

.czors-history-sort-option svg {
    width: 16px;
    height: 16px;
    opacity: 0;
}

.czors-history-sort-option.active svg {
    opacity: 1;
}

@media (max-width: 900px) {
    .czors-history-sort-custom {
        width: 100%;
        min-width: 0;
    }

    .czors-history-sort-menu {
        left: 0;
        right: auto;
        width: 100%;
    }
}