﻿  /* ══════════════════════════════════════════
       Weekly Court Booking – Clean RTL Layout
    ══════════════════════════════════════════ */
    .wk {
        direction: rtl;

        margin: 0 auto;
    }

    /* عنوان */
    .wk-head {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 22px;
    }

        .wk-head img {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            object-fit: cover;
        }

        .wk-head h2 {
            margin: 0;
            font-size: 20px;
            color: #1e293b;
        }

    /* راهنمای رنگ */
    .wk-legend {
        display: flex;
        gap: 16px;
        margin-bottom: 18px;
        flex-wrap: wrap;
    }

    .wk-leg {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: #475569;
    }

    .wk-leg-dot {
        width: 14px;
        height: 14px;
        border-radius: 4px;
    }

    .dot-free {
        background: #22c55e;
    }

    .dot-partial {
        background: #f59e0b;
    }

    .dot-full {
        background: #d1d5db;
    }

    /* اسکرول افقی */
    .wk-scroll {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    /* جدول */
    .wk-tbl {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        min-width: max-content;
    }

        /* هدر روزها */
        .wk-tbl thead tr th {
            padding: 0 5px 10px;
            text-align: center;
        }

         

    .wk-day-card {
        background: #fff;
        border-radius: 10px;
        padding: 10px 8px 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,.09);
    }

        .wk-day-card.is-today {
            border-top: 3px solid #16a34a;
        }

            .wk-day-card.is-today .wd-name {
                color: #16a34a;
            }

    .wd-name {
        font-size: 14px;
        font-weight: 700;
        color: #1e293b;
    }

    .wd-date {
        font-size: 11px;
        color: #94a3b8;
        margin-top: 3px;
    }

    /* ردیف‌های زمین */
    .wk-tbl tbody tr td {
        padding: 4px 5px;
        vertical-align: top;
    }

       

    /* برچسب زمین */
    .wk-label {
        background: #f1f5f9;
        border-radius: 8px;
        padding: 10px 6px;
        text-align: center;
        font-size: 12px;
        font-weight: 700;
        color: #475569;
        height: 100%;
        min-height: 72px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ستون اسلات */
    .wk-col {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    /* کارت اسلات */
    .wk-slot {
        border-radius: 9px;
        padding: 8px 9px 7px;
        min-height: 72px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        transition: transform .13s, box-shadow .13s;
    }

        .wk-slot.can-book {
            cursor: pointer;
        }

            .wk-slot.can-book:hover {
                transform: translateY(-2px);
                box-shadow: 0 6px 18px rgba(0,0,0,.14);
            }

        .wk-slot.free {
            background: #22c55e;
        }

        .wk-slot.partial {
            background: #f59e0b;
        }

        .wk-slot.full {
            background: #e2e8f0;
            cursor: default;
        }

    /* badge ظرفیت */
    .wk-cap {
        position: absolute;
        top: 5px;
        left: 6px;
        font-size: 10px;
        border-radius: 20px;
        padding: 1px 7px;
        background: rgba(0,0,0,.16);
        color: #fff;
    }

    .wk-slot.full .wk-cap {
        background: #cbd5e1;
        color: #94a3b8;
    }

    /* زمان */
    .wk-time {
        font-size: 15px;
        font-weight: 800;
        color: #fff;
        margin-top: 16px;
        letter-spacing: .3px;
    }

    .wk-slot.full .wk-time {
        color: #94a3b8;
    }

    /* قیمت */
    .wk-price {
        font-size: 11px;
        color: rgba(255,255,255,.85);
        margin-top: 2px;
    }

    .wk-slot.full .wk-price {
        color: #b0bec5;
    }

    /* روزی که این زمین برنامه ندارد */
    .wk-na {
        min-height: 72px;
        border-radius: 9px;
        background: #f8fafc;
        border: 1.5px dashed #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .wk-na-txt {
        font-size: 11px;
        color: #cbd5e1;
    }

    /* جداکننده ردیف‌ها */
    .wk-tbl tbody tr + tr td {
        padding-top: 10px;
    }

    /* ══ مودال ══ */
    .wk-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.5);
        z-index: 800;
    }

        .wk-overlay.open {
            display: flex;
            align-items: center;
            justify-content: center;
        }

    .wk-modal {
        background: #fff;
        border-radius: 16px;
        width: 360px;
        max-width: 95vw;
        padding: 24px 22px 20px;
        direction: rtl;
        box-shadow: 0 20px 50px rgba(0,0,0,.2);
        animation: pop .2s;    max-height: 95%;
    overflow-y: scroll;
    }

    @keyframes pop {
        from {
            transform: scale(.94);
            opacity: 0
        }

        to {
            transform: scale(1);
            opacity: 1
        }
    }

    .wk-modal-title {
        font-size: 17px;
        font-weight: 800;
        color: #1e293b;
        margin: 0 0 14px;
    }

    .wk-info-box {
        background: #f0fdf4;
        border-right: 3px solid #22c55e;
        border-radius: 8px;
        padding: 10px 14px;
        margin-bottom: 18px;
        font-size: 13px;
        color: #166534;
        line-height: 2.1;
    }

    .wk-fld label {
        display: block;
        font-size: 12px;
        color: #64748b;
        margin-bottom: 5px;
        font-weight: 600;
    }

    .wk-fld input, .wk-fld  select {
        width: 100%;
        border: 1.5px solid #e2e8f0;
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 14px;
        font-family: inherit;
        direction: rtl;
        outline: none;
        transition: border-color .15s;
        margin-bottom: 12px;
        color: #1e293b;
    }

        .wk-fld input:focus {
            border-color: #22c55e;
        }

    .wk-modal-btns {
        display: flex;
        gap: 8px;
        margin-top: 4px;
    }

    .btn-confirm {
        flex: 1;
        background: #16a34a;
        color: #fff;
        border: none;
        border-radius: 9px;
        padding: 12px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        font-family: inherit;
        transition: background .15s;
    }

        .btn-confirm:hover {
            background: #15803d;
        }

        .btn-confirm:disabled {
            background: #86efac;
            cursor: wait;
        }

    .btn-cancel {
        flex: 1;
        background: #f1f5f9;
        color: #475569;
        border: none;
        border-radius: 9px;
        padding: 12px;
        font-size: 14px;
        cursor: pointer;
        font-family: inherit;
    }

        .btn-cancel:hover {
            background: #e2e8f0;
        }

    /* ══ توست ══ */
    .wk-toast {
        display: none;
        position: fixed;
        bottom: 28px;
        left: 50%;
        transform: translateX(-50%);
        padding: 12px 28px;
        border-radius: 30px;
        font-size: 14px;
        font-weight: 600;
        color: #fff;
        box-shadow: 0 4px 20px rgba(0,0,0,.2);
        z-index: 9000;
        white-space: nowrap;
    }

        .wk-toast.show {
            display: block;
            animation: toastIn .25s;
        }

    @keyframes toastIn {
        from {
            opacity: 0;
            transform: translate(-50%,8px)
        }

        to {
            opacity: 1;
            transform: translate(-50%,0)
        }
    }

    /* ══ خالی ══ */
    .wk-empty {
        text-align: center;
        padding: 48px;
        color: #94a3b8;
        font-size: 15px;
    }