/**
 * Liste de pointage Cekonay
 * Habillage commun au panneau, aux déclencheurs et à l'encart du panier.
 */

.cekonay-postit-checklist,
.cekonay-postit-page-trigger,
.cekonay-postit-mobile-trigger,
.cekonay-flycart-postit-notice {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cekonay-postit-checklist {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 100001 !important;
    display: flex;
    width: min(480px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 48px));
    overflow: hidden;
    flex-direction: column;
    color: #171719;
    background: #ffffff;
    border: 1px solid #e6e1da;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(23, 23, 25, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-50% - 16px));
    transition: opacity 0.22s ease, transform 0.22s ease;
}

body.cekonay-postit-open .cekonay-postit-checklist {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.cekonay-postit-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #67635f;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.cekonay-postit-close:hover {
    color: #171719;
    background: #f1eeea;
}

.cekonay-postit-header {
    min-height: 64px;
    padding: 20px 62px 17px 22px;
    background: #ffffff;
    border-bottom: 1px solid #e6e1da;
    text-align: left;
}

.cekonay-postit-header h4 {
    margin: 0;
    padding: 0;
    color: #171719;
    font-family: inherit;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: -0.02em;
    text-transform: none;
}

.cekonay-postit-items-wrap {
    position: relative;
    min-height: 0;
    flex: 1 1 auto;
}

.cekonay-postit-items {
    max-height: min(520px, calc(100vh - 180px));
    overflow-y: auto;
    padding: 8px 20px;
    background: #f8f6f3;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.cekonay-postit-items::-webkit-scrollbar { width: 5px; }
.cekonay-postit-items::-webkit-scrollbar-track { background: transparent; }
.cekonay-postit-items::-webkit-scrollbar-thumb { background: #c8c3bd; border-radius: 999px; }
.cekonay-postit-items::-webkit-scrollbar-thumb:hover { background: #9e9891; }

.cekonay-postit-item {
    display: flex;
    align-items: flex-start;
    min-height: 52px;
    padding: 13px 4px;
    color: #363330;
    border-bottom: 1px solid #e6e1da;
    cursor: pointer;
    touch-action: pan-y;
    transition: color 0.18s ease, background 0.18s ease;
}

.cekonay-postit-item:last-child { border-bottom: 0; }
.cekonay-postit-item:hover { color: #171719; background: #ffffff; }

.cekonay-postit-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin: 1px 12px 0 0;
    background: #ffffff;
    border: 2px solid #1c71e3;
    border-radius: 7px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.cekonay-postit-item:hover .cekonay-postit-checkbox { transform: scale(1.04); }
.cekonay-postit-item.checked .cekonay-postit-checkbox { background: #1c71e3; border-color: #1c71e3; }
.cekonay-postit-item.checked .cekonay-postit-checkbox::after {
    position: absolute;
    top: 50%;
    left: 50%;
    color: #ffffff;
    content: "✓";
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    transform: translate(-50%, -54%);
}

.cekonay-postit-text {
    min-width: 0;
    flex: 1;
    color: inherit;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.cekonay-postit-item.checked .cekonay-postit-text {
    color: #817c76;
    font-style: normal;
    text-decoration: line-through;
    opacity: 0.78;
}

.cekonay-postit-footer {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    color: #67635f;
    background: #ffffff;
    border-top: 1px solid #e6e1da;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-align: center;
}

.cekonay-postit-count { flex: 1; }
.cekonay-postit-count .checked-count { color: #1c71e3; font-size: 17px; font-weight: 800; }

.cekonay-postit-scroll-hint {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 36px 16px 10px;
    background: linear-gradient(to top, rgba(248, 246, 243, 0.98) 25%, rgba(248, 246, 243, 0));
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.cekonay-postit-scroll-hint span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    color: #155fca;
    background: #ffffff;
    border: 1px solid #dbe8fb;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(28, 113, 227, 0.08);
    font-size: 12px;
    font-weight: 650;
}

.cekonay-postit-scroll-hint span::after { content: "↓"; font-size: 13px; }
.cekonay-postit-checklist.is-scrollable.has-more-items .cekonay-postit-scroll-hint { opacity: 1; transform: none; }

.cekonay-postit-page-trigger,
.cekonay-postit-mobile-trigger {
    position: fixed;
    z-index: 9997;
    min-height: 46px;
    padding: 0 17px;
    color: #ffffff;
    background: #1c71e3;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(28, 113, 227, 0.24);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.cekonay-postit-page-trigger {
    right: calc(max(20px, env(safe-area-inset-right, 20px)) + 76px);
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    display: block;
}

.cekonay-postit-mobile-trigger {
    right: max(16px, env(safe-area-inset-right, 16px));
    bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 82px));
    display: none;
}

.cekonay-postit-page-trigger:hover,
.cekonay-postit-mobile-trigger:hover { background: #155fca; transform: translateY(-1px); }

.cekonay-postit-page-trigger .badge,
.cekonay-postit-mobile-trigger .badge {
    display: inline-flex;
    min-width: 28px;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    margin-left: 7px;
    padding: 2px 7px;
    color: #155fca;
    background: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

body.cekonay-postit-open .cekonay-postit-page-trigger,
body.cekonay-postit-open .cekonay-postit-mobile-trigger { display: none !important; }
.cekonay-postit-mobile-trigger.hidden { display: none !important; }

.cekonay-flycart-postit-notice {
    margin: 14px 18px 10px;
    padding: 16px;
    color: #363330;
    background: #f3f7fd !important;
    border: 1px solid #dbe8fb !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
}

.cekonay-flycart-postit-notice,
.cekonay-flycart-postit-notice * { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; }
.cekonay-flycart-postit-notice p { margin: 0 0 6px; color: inherit; }
.cekonay-flycart-postit-notice strong { color: #171719 !important; font-family: inherit !important; font-size: 15px; font-weight: 750; }
.cekonay-flycart-postit-notice button {
    min-height: 42px;
    margin-top: 8px;
    padding: 0 17px !important;
    color: #ffffff !important;
    background: #1c71e3 !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 14px;
    font-weight: 700;
}
.cekonay-flycart-postit-notice button:hover { background: #155fca !important; }

@media (max-width: 640px) {
    .cekonay-postit-checklist {
        top: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        max-height: none;
        border-radius: 18px;
        transform: translate(-50%, -12px);
    }

    body.cekonay-postit-open .cekonay-postit-checklist { transform: translate(-50%, 0); }
    .cekonay-postit-header { min-height: 60px; padding: 18px 58px 15px 18px; }
    .cekonay-postit-header h4 { font-size: 18px; }
    .cekonay-postit-items { max-height: none; height: 100%; padding: 6px 14px; }
    .cekonay-postit-item { min-height: 50px; padding: 12px 2px; }
    .cekonay-postit-text { font-size: 13px; line-height: 1.45; }
    .cekonay-postit-footer { min-height: 56px; padding: 12px 18px; }
    .cekonay-postit-page-trigger { display: none !important; }
    .cekonay-postit-mobile-trigger { display: block !important; }
    .cekonay-flycart-postit-notice { margin: 12px; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .cekonay-postit-checklist,
    .cekonay-postit-close,
    .cekonay-postit-checkbox,
    .cekonay-postit-page-trigger,
    .cekonay-postit-mobile-trigger { transition: none !important; }
}

/* Liste de pointage : « i » d'information à côté du titre, sur ordinateur (souris) seulement, quelle que soit la largeur de la fenêtre.
   La bulle n'existe qu'au survol (ou au clavier) et disparaît dès qu'on quitte le « i ». */
.cekonay-postit-header { display: flex; align-items: center; gap: 8px; }
.cekonay-postit-aide { display: none; position: relative; }
.cekonay-postit-bulle { display: none; }
@media (hover: hover) and (pointer: fine) {
    .cekonay-postit-aide { display: inline-flex; }
    .cekonay-postit-info {
        display: inline-flex; align-items: center; justify-content: center;
        width: 18px; height: 18px; border-radius: 50%;
        border: 1px solid #cfc8bd; background: #ffffff; color: #8a837b;
        font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1;
        cursor: help; transition: border-color .15s ease, color .15s ease;
    }
    .cekonay-postit-info:hover, .cekonay-postit-info:focus-visible { border-color: #171719; color: #171719; outline: none; }
    .cekonay-postit-bulle {
        display: block; position: absolute; top: calc(100% + 10px); left: 50%; z-index: 5;
        width: 220px; padding: 11px 13px; border-radius: 12px;
        background: #ffffff; border: 1px solid #e6e1da; color: #3a3632;
        font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.5; text-align: left;
        box-shadow: 0 8px 24px rgba(23, 23, 25, .12);
        opacity: 0; visibility: hidden; transform: translate(-50%, -4px);
        transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
        pointer-events: none;
    }
    .cekonay-postit-bulle::before {
        content: ""; position: absolute; top: -6px; left: 50%; width: 10px; height: 10px;
        background: #ffffff; border-left: 1px solid #e6e1da; border-top: 1px solid #e6e1da;
        border-radius: 2px 0 0 0; transform: translateX(-50%) rotate(45deg);
    }
    .cekonay-postit-info:hover + .cekonay-postit-bulle,
    .cekonay-postit-info:focus-visible + .cekonay-postit-bulle {
        opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s;
    }
}
