/*
 * OTALEX · WeShoes
 * Director recommendation UI v1
 *
 * Real Recommendation Core data only.
 * No prototype tasks are rendered here.
 */

.ws-rec-section{
    margin-top:16px;
}

.ws-rec-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
}

.ws-rec-head-copy{
    min-width:0;
}

.ws-rec-head-copy h2{
    margin:0;
}

.ws-rec-subtitle{
    margin-top:5px;
    font-size:13px;
    line-height:1.45;
    opacity:.72;
}

.ws-rec-summary{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}

.ws-rec-summary-chip{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-height:30px;
    padding:4px 10px;
    border:1px solid rgba(127,127,127,.28);
    border-radius:999px;
    font-size:12px;
    white-space:nowrap;
}

.ws-rec-summary-chip strong{
    font-size:14px;
}

.ws-rec-filters{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin:16px 0;
}

.ws-rec-filter{
    min-height:34px;
    padding:6px 12px;
    border:1px solid rgba(127,127,127,.32);
    border-radius:999px;
    background:transparent;
    color:inherit;
    cursor:pointer;
    font:inherit;
    font-size:13px;
}

.ws-rec-filter.active{
    border-width:2px;
    font-weight:700;
}

.ws-rec-grid{
    display:grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(310px,1fr)
        );
    gap:12px;
}

.ws-rec-card{
    display:flex;
    flex-direction:column;
    gap:12px;
    min-width:0;
    padding:15px;
    border:1px solid rgba(127,127,127,.25);
    border-radius:14px;
}

.ws-rec-card[data-hidden="1"]{
    display:none;
}

.ws-rec-card-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
}

.ws-rec-product{
    min-width:0;
}

.ws-rec-product strong{
    display:block;
    line-height:1.35;
}

.ws-rec-product-meta{
    margin-top:4px;
    font-size:12px;
    line-height:1.4;
    opacity:.72;
    word-break:break-word;
}

.ws-rec-score{
    flex:0 0 auto;
    min-width:50px;
    text-align:center;
    padding:6px 8px;
    border:1px solid rgba(127,127,127,.32);
    border-radius:10px;
}

.ws-rec-score strong{
    display:block;
    font-size:18px;
    line-height:1;
}

.ws-rec-score span{
    display:block;
    margin-top:3px;
    font-size:10px;
    opacity:.65;
}

.ws-rec-action-row{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.ws-rec-action-badge{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    padding:4px 9px;
    border:1px solid rgba(127,127,127,.30);
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.ws-rec-confidence{
    font-size:12px;
    opacity:.75;
}

.ws-rec-target{
    padding:9px 10px;
    border-inline-start:
        3px solid rgba(127,127,127,.42);
    font-size:13px;
    line-height:1.4;
}

.ws-rec-target strong{
    display:block;
    margin-bottom:2px;
}

.ws-rec-metrics{
    display:grid;
    grid-template-columns:
        repeat(3,minmax(0,1fr));
    gap:8px;
}

.ws-rec-metric{
    padding:8px;
    border:1px solid rgba(127,127,127,.20);
    border-radius:10px;
    min-width:0;
}

.ws-rec-metric span{
    display:block;
    font-size:10px;
    line-height:1.25;
    opacity:.65;
}

.ws-rec-metric strong{
    display:block;
    margin-top:3px;
    font-size:16px;
}

.ws-rec-donor{
    padding:10px;
    border:1px dashed rgba(127,127,127,.36);
    border-radius:10px;
    font-size:12px;
    line-height:1.45;
}

.ws-rec-donor strong{
    display:block;
    margin-bottom:3px;
}

.ws-rec-evidence{
    display:flex;
    gap:7px;
    flex-wrap:wrap;
}

.ws-rec-evidence span{
    padding:3px 7px;
    border-radius:999px;
    border:1px solid rgba(127,127,127,.22);
    font-size:10px;
    opacity:.78;
}

.ws-rec-footnote{
    margin-top:14px;
    font-size:11px;
    line-height:1.5;
    opacity:.64;
}

.ws-rec-empty{
    padding:18px;
    text-align:center;
    opacity:.72;
}

.ws-rec-sync-pending{
    margin-top:16px;
}

@media (max-width:720px){

    .ws-rec-grid{
        grid-template-columns:1fr;
    }

    .ws-rec-metrics{
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }

    .ws-rec-head{
        display:block;
    }

    .ws-rec-summary{
        margin-top:10px;
    }
}

@media (max-width:420px){

    .ws-rec-card{
        padding:12px;
    }

    .ws-rec-metrics{
        grid-template-columns:1fr;
    }
}


/* ==================================================
   WESHOES_RECOMMENDATIONS_COLLAPSED_V2
   ================================================== */

/*
 * Recommendations are a dashboard signal first.
 * Keep the sales chart visible until the user
 * explicitly expands this section.
 */

.ws-rec-section{
    transition:
        padding .18s ease;
}

.ws-rec-head{
    cursor:pointer;
    user-select:none;
    outline:none;
}

.ws-rec-head:focus-visible{
    outline:
        2px solid rgba(101,87,245,.38);
    outline-offset:3px;
}

.ws-rec-section:not(.expanded)
.ws-rec-subtitle,

.ws-rec-section:not(.expanded)
.ws-rec-filters,

.ws-rec-section:not(.expanded)
.ws-rec-grid,

.ws-rec-section:not(.expanded)
.ws-rec-footnote{
    display:none;
}

.ws-rec-section:not(.expanded)
.ws-rec-head{
    align-items:center;
}

.ws-rec-section:not(.expanded)
.ws-rec-head-copy h2{
    margin:0;
}

.ws-rec-chevron{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:30px;
    height:30px;

    border:1px solid rgba(127,127,127,.24);
    border-radius:9px;

    font-size:19px;
    line-height:1;

    transition:
        transform .18s ease;
}

.ws-rec-section.expanded
.ws-rec-chevron{
    transform:
        rotate(180deg);
}


/*
 * Wider cards make mixed Hebrew/English product
 * names easier to scan.
 */
.ws-rec-grid{
    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );
}

.ws-rec-product strong{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;

    overflow:hidden;

    font-size:14px;
}

.ws-rec-product-meta{
    direction:auto;
}


/* Navigation controls */

.ws-rec-links{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;

    padding-top:2px;
}

.ws-rec-link{
    min-height:34px;
    padding:6px 11px;

    border:
        1px solid rgba(127,127,127,.28);
    border-radius:9px;

    background:#fff;
    color:inherit;

    cursor:pointer;

    font:inherit;
    font-size:11px;
    font-weight:700;
}

.ws-rec-link:hover{
    background:
        rgba(127,127,127,.06);
}

.ws-rec-link.primary{
    border-color:
        rgba(101,87,245,.34);

    background:
        rgba(101,87,245,.07);
}


/*
 * In collapsed state this should behave almost
 * like one dashboard notification row.
 */
.ws-rec-section:not(.expanded){
    padding-top:13px;
    padding-bottom:13px;
}


@media(max-width:900px){

    .ws-rec-grid{
        grid-template-columns:1fr;
    }
}


@media(max-width:600px){

    .ws-rec-summary{
        gap:5px;
    }

    .ws-rec-summary-chip{
        padding:
            3px 7px;
        min-height:27px;
    }

    .ws-rec-section:not(.expanded)
    .ws-rec-head{
        display:flex;
        gap:8px;
    }

    .ws-rec-link{
        flex:1 1 auto;
    }
}


/* ==================================================
   WESHOES_RECOMMENDATION_DETAIL_V1
   ================================================== */

html.ws-rec-detail-open{
    overflow:hidden;
}

.ws-rec-detail-backdrop{
    position:fixed;
    inset:0;
    z-index:1190;

    background:
        rgba(7,18,38,.42);

    backdrop-filter:
        blur(2px);
}

.ws-rec-detail{
    position:fixed;
    top:0;
    bottom:0;
    inset-inline-end:0;

    z-index:1200;

    width:min(
        620px,
        94vw
    );

    background:#fff;

    border-inline-start:
        1px solid rgba(127,127,127,.22);

    box-shadow:
        0 0 40px rgba(0,0,0,.16);

    display:flex;
    flex-direction:column;
}

.ws-rec-detail-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;

    padding:
        20px 20px 16px;

    border-bottom:
        1px solid rgba(127,127,127,.18);
}

.ws-rec-detail-head h2{
    margin:4px 0 5px;

    font-size:21px;
    line-height:1.25;
}

.ws-rec-detail-eyebrow{
    font-size:11px;
    font-weight:700;
    opacity:.66;
}

.ws-rec-detail-variant{
    font-size:12px;
    line-height:1.45;
    opacity:.68;
}

.ws-rec-detail-close{
    flex:0 0 auto;

    width:36px;
    height:36px;

    border:
        1px solid rgba(127,127,127,.22);

    border-radius:10px;

    background:#fff;

    cursor:pointer;

    font-size:25px;
    line-height:1;
}

.ws-rec-detail-scroll{
    overflow:auto;

    padding:
        16px 20px 24px;
}

.ws-rec-detail-summary{
    display:grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0,1fr)
        );

    gap:8px;
}

.ws-rec-detail-summary > div,
.ws-rec-detail-evidence-grid > div{
    padding:10px;

    border:
        1px solid rgba(127,127,127,.20);

    border-radius:11px;
}

.ws-rec-detail-summary span,
.ws-rec-detail-evidence-grid span{
    display:block;

    font-size:10px;
    line-height:1.25;
    opacity:.64;
}

.ws-rec-detail-summary strong,
.ws-rec-detail-evidence-grid strong{
    display:block;

    margin-top:4px;

    font-size:17px;
}

.ws-rec-detail-section{
    margin-top:20px;
}

.ws-rec-detail-section h3{
    margin:0 0 9px;

    font-size:14px;
}

.ws-rec-detail-recommendation{
    padding:13px;

    border:
        1px solid rgba(101,87,245,.22);

    border-radius:12px;

    background:
        rgba(101,87,245,.045);

    font-size:13px;
    line-height:1.55;
}

.ws-rec-detail-evidence-grid{
    display:grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0,1fr)
        );

    gap:8px;
}

.ws-rec-detail-signal{
    margin-top:8px;

    padding:
        8px 10px;

    border-radius:9px;

    background:
        rgba(127,127,127,.07);

    font-size:11px;
}

.ws-rec-detail-store-list{
    display:grid;
    gap:8px;
}

.ws-rec-detail-store-list button{
    display:grid;

    grid-template-columns:
        78px 1fr auto;

    gap:10px;

    align-items:center;

    width:100%;

    padding:
        10px 12px;

    border:
        1px solid rgba(127,127,127,.20);

    border-radius:11px;

    background:#fff;
    color:inherit;

    text-align:start;

    font:inherit;

    cursor:pointer;
}

.ws-rec-detail-store-list button:disabled{
    cursor:default;
}

.ws-rec-detail-store-list span{
    font-size:10px;
    opacity:.6;
}

.ws-rec-detail-store-list strong{
    font-size:12px;
}

.ws-rec-detail-store-list small{
    font-size:10px;
    opacity:.62;
}

.ws-rec-detail-section-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
}

.ws-rec-detail-section-head span{
    font-size:10px;
    opacity:.6;
}

.ws-rec-detail-movements{
    display:grid;
    gap:7px;
}

.ws-rec-detail-movement{
    display:grid;

    grid-template-columns:
        minmax(0,1.5fr)
        minmax(90px,.7fr)
        minmax(90px,.7fr);

    gap:10px;

    align-items:center;

    padding:
        9px 10px;

    border:
        1px solid rgba(127,127,127,.18);

    border-radius:10px;
}

.ws-rec-detail-movement > div{
    min-width:0;
}

.ws-rec-detail-movement span{
    display:block;

    margin-top:2px;

    font-size:9px;
    opacity:.6;
}

.ws-rec-detail-movement strong{
    display:block;

    font-size:11px;
    line-height:1.35;
}

.ws-rec-detail-loading,
.ws-rec-detail-empty{
    padding:14px;

    border:
        1px dashed rgba(127,127,127,.25);

    border-radius:10px;

    font-size:11px;
    opacity:.7;
}

.ws-rec-detail-actions{
    display:flex;
    gap:8px;

    margin-top:20px;
}

.ws-rec-detail-actions
.ws-rec-link{
    min-height:38px;
}

.ws-rec-detail-note{
    margin-top:16px;

    font-size:10px;
    line-height:1.5;
    opacity:.58;
}


@media(max-width:600px){

    .ws-rec-detail{
        width:100vw;
    }

    .ws-rec-detail-head{
        padding:
            16px 14px 13px;
    }

    .ws-rec-detail-scroll{
        padding:
            12px 14px 20px;
    }

    .ws-rec-detail-summary,
    .ws-rec-detail-evidence-grid{
        grid-template-columns:
            repeat(
                2,
                minmax(0,1fr)
            );
    }

    .ws-rec-detail-movement{
        grid-template-columns:
            1fr auto;
    }

    .ws-rec-detail-movement
    > div:last-child{
        grid-column:
            1 / -1;
    }

    .ws-rec-detail-store-list button{
        grid-template-columns:
            65px 1fr;
    }

    .ws-rec-detail-store-list small{
        grid-column:
            2;
    }
}
