/* =========================================================
   KRADPC OWNER COURT SCHEDULE V1
   MANUAL AVAILABILITY
   Canonical Presentation Authority
   ========================================================= */

/* Base Manual Availability presentation */

.manual-cell{color:#173329;cursor:pointer;background:#eff9f1;border:1px solid #cfe7d5;border-radius:9px;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:62px;margin:5px;padding:7px;display:flex}

.manual-cell strong{font-size:8px;}

.manual-cell small{color:#608174;font-size:6px;}

.manual-cell.picked{color:#fff;background:linear-gradient(145deg,#03a943,#08c954);border-color:#02963c}

.manual-cell.picked small{color:#eafff1}

.manual-cell.booking{color:#b9422c;background:#fff0ec;border-color:#ffb5a4}

.manual-cell.openplay{color:#5d47a8;background:#f1edff;border-color:#cdc3ff}

.manual-cell.blocked{color:#69736f;background:#eef0ef;border-color:#d5dbd8}

.manual-cell.lapsed{color:#a0a7a4;background:#f5f6f5;border-color:#e3e6e4}

.manual-cell:disabled{opacity:1;cursor:not-allowed}

.manual-legend{border:1px solid var(--line);background:#fff;border-radius:10px;flex-wrap:wrap;gap:17px;margin-top:12px;padding:11px 13px;display:flex}

.manual-legend span{align-items:center;gap:6px;font-size:7px;display:flex}

.manual-legend span:before{content:"";background:#eff9f1;border:1px solid #cfe7d5;border-radius:3px;width:13px;height:13px}

.manual-legend .picked:before{background:#04b64a;border-color:#02963c}

.manual-legend .booking:before{background:#fff0ec;border-color:#ffb5a4}

.manual-legend .openplay:before{background:#f1edff;border-color:#cdc3ff}

.manual-legend .blocked:before{background:#eef0ef;border-color:#d5dbd8}

.manual-legend .lapsed:before{background:#f5f6f5;border-color:#e3e6e4}

@media (width<=600px){
.manual-legend{gap:10px}
}

/* Dewpoint Theme / Owner state presentation */

.shell:not(.player-shell) .manual-cell:not(.picked):not(.booking):not(.openplay):not(.blocked):not(.lapsed){
    color:var(--kr-accent-text);
    background:var(--kr-theme-faint);
    border-color:var(--kr-theme-border);
}

.shell:not(.player-shell) .manual-cell:not(.picked):not(.booking):not(.openplay):not(.blocked):not(.lapsed) strong{
    color:var(--kr-accent-text);
}

.shell:not(.player-shell) .manual-cell.picked{
    color:#fff;

    background:
        linear-gradient(
            145deg,
            var(--kr-accent),
            var(--kr-accent-2)
        );

    border-color:var(--kr-accent);
}

.shell:not(.player-shell) .manual-cell.picked small{
    color:rgba(255,255,255,.85);
}

.shell:not(.player-shell) .manual-legend .picked:before{
    background:var(--kr-accent);
    border-color:var(--kr-accent);
}

.shell:not(.player-shell) .manual-legend span:not(.booking):not(.openplay):not(.blocked):not(.lapsed):before{
    background:var(--kr-theme-faint);
    border-color:var(--kr-theme-border);
}

.shell:not(.player-shell) .manual-cell.booking{
    color:#b9422c;
    background:#fff0ec;
    border-color:#ffb5a4;
}

.shell:not(.player-shell) .manual-cell.openplay{
    color:#5d47a8;
    background:#f1edff;
    border-color:#cdc3ff;
}

.shell:not(.player-shell) .manual-cell.blocked, .shell:not(.player-shell) .manual-cell.lapsed{
    color:#69736f;
}

/* Existing block / reopen interaction */

/* =========================================================
   DEWPOINT OWNER COURT SCHEDULE
   BLOCK / REOPEN INTERACTION V1
   ========================================================= */

.owner-settings .manual-cell.blocked:not(:disabled){
    cursor:pointer;
    opacity:1;

    transition:
        transform .14s ease,
        box-shadow .14s ease,
        filter .14s ease;
}

.owner-settings .manual-cell.blocked:not(:disabled):hover{
    transform:translateY(-1px);

    filter:brightness(.97);

    box-shadow:
        0 5px 14px rgba(40,50,70,.10);
}

.owner-settings .manual-cell.blocked:not(:disabled):focus-visible{
    outline:2px solid currentColor;
    outline-offset:2px;
}

.owner-settings .manual-cell.booking:disabled,
.owner-settings .manual-cell.openplay:disabled,
.owner-settings .manual-cell.lapsed:disabled{
    cursor:not-allowed;
}

@media(max-width:700px){

    .owner-settings .manual-cell.blocked:not(:disabled){
        touch-action:manipulation;
    }

}

/* =========================================================
   DEWPOINT OWNER COURT SCHEDULE
   MOBILE GRID RESPONSIVE LAYOUT V1

   Presentation only.
   Desktop dimensions remain controlled by the component's
   existing 130px / 118px fallbacks.
   ========================================================= */

@media (max-width:700px){

    /*
     * Let courts retain a usable width rather than squeezing
     * every court into the phone viewport.
     */
    .owner-settings .manual-slot-grid{
        --manual-time-col:92px;
        --manual-court-col:132px;

        width:max-content;
        min-width:100%;
    }


    /*
     * The schedule becomes horizontally swipeable.
     * Only the schedule grid scrolls — not the whole page.
     */
    .owner-settings .manual-grid-scroll{
        width:100%;
        max-width:100%;

        overflow-x:auto;
        overflow-y:hidden;

        padding-bottom:8px;

        -webkit-overflow-scrolling:touch;
        overscroll-behavior-x:contain;
        touch-action:pan-x pan-y;
    }


    /*
     * Better mobile proportions for each schedule box.
     */
    .owner-settings .manual-cell{
        min-height:64px;

        margin:4px;
        padding:8px 7px;

        border-radius:10px;
    }


    /*
     * Current desktop typography is intentionally tiny.
     * Increase only inside the mobile Court Schedule.
     */
    .owner-settings .manual-cell strong{
        font-size:10px;
        line-height:1.2;

        text-align:center;
        white-space:normal;
    }

    .owner-settings .manual-cell small{
        font-size:8px;
        line-height:1.2;

        text-align:center;
    }


    /*
     * Keep time labels inside their own first column.
     */
    .owner-settings .manual-time{
        min-width:0;

        padding-left:8px;
        padding-right:8px;

        line-height:1.25;
    }

    .owner-settings .manual-time b{
        white-space:normal;
    }


    /*
     * Court headers stay readable while swiping horizontally.
     */
    .owner-settings .manual-grid-head{
        min-width:0;

        padding-left:6px;
        padding-right:6px;

        text-align:center;
        white-space:normal;
    }
}

