/* ============================================================
   BINDER VIEW
   Simulates a physical 9-pocket binder page for Mario Lemieux cards.
   ============================================================ */

.binder-view {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 2.5%;
}

.binder-pager {
    position: sticky;
    top: 8px;
    z-index: 20;
    background: rgba(20, 32, 43, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 14px;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.binder-pager-nav {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.binder-pager-btn {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    border-radius: 4px;
    padding: 7px 10px;
    min-height: 30px;
    min-width: 96px;
    white-space: nowrap;
}

.binder-pager-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.binder-pager-meta {
    min-width: 0;
    text-align: center;
    color: #fff;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 2px;
}

.binder-pager-center {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 7px;
}

.binder-pager-middle {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.binder-pager-progress {
    display: -webkit-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.binder-pager-section {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.binder-pager-page {
    font-size: 12px;
    opacity: 0.78;
}

.binder-year-jump-wrap {
    display: -webkit-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    color: #fff;
    margin: 0;
}

.binder-year-jump-label {
    font-size: 11px;
    opacity: 0.76;
    white-space: nowrap;
}

.binder-year-jump {
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 4px;
    height: 30px;
    min-width: 150px;
    padding: 4px 8px;
    font-size: 12px;
}

.binder-year-jump option {
    color: #111;
}

.binder-year-tab-stats {
    font-size: 12px;
    opacity: 0.75;
    white-space: nowrap;
}

.binder-year-progress {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
}

.binder-year-progress-track {
    width: 80px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.binder-year-progress-fill {
    height: 5px;
    background: #27ae60;
    border-radius: 3px;
    min-width: 0;
    -webkit-transition: width 0.3s;
    transition: width 0.3s;
}

.binder-year-progress-pct {
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
}

/* ── Year checklist ───────────────────────────────────────── */

.binder-checklist {
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 4px;
    padding: 8px 14px 10px 14px;
    margin-bottom: 18px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 3px 14px;
}

.binder-pager .binder-checklist {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 0;
}

.binder-checklist-item {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #888;
    padding: 2px 0;
}

.binder-checklist-item--owned {
    color: #1a7d3f;
}

.binder-checklist-check {
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    border: 1.5px solid #bbb;
    border-radius: 2px;
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    background: #fff;
}

.binder-checklist-item--owned .binder-checklist-check {
    background: #27ae60;
    border-color: #1f9751;
}

.binder-checklist-item-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Binder page (9-pocket sheet) ────────────────────────── */

.binder-page {
    background: #f5f6f7;
    border: 1px solid #d0d6dc;
    border-radius: 5px;
    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10), 0 2px 14px rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10), 0 2px 14px rgba(0, 0, 0, 0.06);
    padding: 14px;
    margin-bottom: 16px;
}

.binder-page-label {
    font-size: 10px;
    color: #aab2bb;
    text-align: right;
    margin-bottom: 10px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.binder-page-grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: -5px;
}

.binder-slot {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 33.333%;
    padding: 5px;
}

.binder-slot-inner {
    position: relative;
    width: 100%;
    padding-bottom: 139.68%;
    border-radius: 3px;
    overflow: hidden;
    -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.22);
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.22);
    background-image: -webkit-repeating-linear-gradient(145deg, #e4e4e4, #e4e4e4 5px, #d8d8d8 5px, #d8d8d8 10px);
    background-image: -o-repeating-linear-gradient(145deg, #e4e4e4, #e4e4e4 5px, #d8d8d8 5px, #d8d8d8 10px);
    background-image: repeating-linear-gradient(-55deg, #e4e4e4, #e4e4e4 5px, #d8d8d8 5px, #d8d8d8 10px);
}

.binder-slot--empty .binder-slot-inner {
    border: 1.5px dashed #c4c9cf;
    background-image: -webkit-repeating-linear-gradient(145deg, #eaecee, #eaecee 5px, #e0e3e6 5px, #e0e3e6 10px);
    background-image: -o-repeating-linear-gradient(145deg, #eaecee, #eaecee 5px, #e0e3e6 5px, #e0e3e6 10px);
    background-image: repeating-linear-gradient(-55deg, #eaecee, #eaecee 5px, #e0e3e6 5px, #e0e3e6 10px);
}

/* The inner content (link) fills the slot */
.binder-slot-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.binder-slot-link:hover,
.binder-slot-link:focus {
    outline: 2px solid #4a90d9;
    outline-offset: -2px;
    text-decoration: none;
}

.binder-slot-img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    display: block;
}

/* Landscape cards are rotated 90° to fit the portrait slot */
.binder-slot-img--landscape {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 139.68%;
    height: 71.6%;
    -o-object-fit: cover;
    object-fit: cover;
    display: block;
    -webkit-transform: translate(-50%, -50%) rotate(90deg);
    -ms-transform: translate(-50%, -50%) rotate(90deg);
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Card label strip at the bottom of each slot */
.binder-slot-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px 4px;
    font-size: 8px;
    background: rgba(0, 0, 0, 0.60);
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Green corner triangle for owned cards */
.binder-slot-owned-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 30px 30px 0;
    border-color: transparent #27ae60 transparent transparent;
    z-index: 7;
    pointer-events: none;
}

.binder-slot-owned-badge-check {
    position: absolute;
    top: 3px;
    right: -25px;
    width: 12px;
    height: 12px;
}

.binder-slot-inner--owned::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 4px solid #27ae60;
    pointer-events: none;
    z-index: 6;
}

@media (max-width: 1024px) {
    .binder-view {
        padding: 16px 2.2%;
    }

    .binder-pager {
        top: 6px;
    }

    .binder-pager .binder-checklist {
        max-height: 105px;
    }
}

@media (max-width: 768px) {
    .binder-view {
        padding: 14px 2%;
    }

    .binder-pager {
        top: 4px;
        padding: 8px;
    }

    .binder-pager-nav {
        gap: 8px;
    }

    .binder-pager-middle {
        gap: 8px;
    }

    .binder-pager-section {
        font-size: 13px;
    }

    .binder-pager-page {
        font-size: 11px;
    }

    .binder-pager-btn {
        font-size: 11px;
        padding: 7px 8px;
        min-height: 28px;
    }

    .binder-year-jump {
        min-width: 132px;
        height: 28px;
        font-size: 11px;
    }

    .binder-year-jump-label {
        font-size: 10px;
    }

    .binder-pager-progress {
        gap: 8px;
    }

    .binder-slot {
        width: 50%;
    }

    .binder-pager .binder-checklist {
        max-height: 96px;
    }
}

@media (max-width: 520px) {
    .binder-pager-nav {
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    .binder-pager-center {
        -webkit-box-ordinal-group: 0;
        -webkit-order: -1;
        -ms-flex-order: -1;
        order: -1;
        width: 100%;
    }

    .binder-pager-middle {
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        gap: 6px;
    }

    .binder-year-jump-wrap {
        width: 100%;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -ms-flex-pack: center;
        justify-content: center;
    }

    .binder-pager-progress {
        width: 100%;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -ms-flex-pack: center;
        justify-content: center;
    }

    .binder-year-jump {
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
        min-width: 0;
    }

    .binder-pager-btn {
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
        max-width: 48%;
    }

    .binder-slot {
        width: 100%;
    }

    .binder-pager .binder-checklist {
        max-height: 88px;
    }
}
