/* ═══════════════════════════════════════════════════════════════════════════
   DELIVERABLES — Side Panel (LEFT side, below Message Board)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.deliverables-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.deliverables-overlay.is-open {
    display: block;
}

/* ── Side Panel — slides from LEFT ───────────────────────────────────────── */
.deliverables-panel {
    position: fixed;
    top: 0;
    left: -75vw;
    width: 75vw;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.deliverables-panel.is-open {
    left: 0;
}

.deliverables-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.deliverables-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #1a3a6b;
    flex-shrink: 0;
}

.deliverables-panel-header h3 {
    color: #fff;
    font-size: 50px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.deliverables-panel-header h3 svg {
    width: 54px;
    height:54px;
}

.deliverables-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s;
}

.deliverables-panel-close:hover {
    opacity: 0.7;
}

.deliverables-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.deliverables-empty {
    color: #6b7280;
    font-size: 14px;
    padding: 16px 0;
}

/* ── Panel Collage — matches Trail Mix collage exactly ───────────────────── */
.deliverables-panel-collage {
    position: relative;
    width: 100%;
    height: 700px;
}

.deliverables-panel-item {
    position: absolute;
    width: 38%;
    background: #fff;
    border: 5px solid #fff;
    border-bottom: 22px solid #fff;
    border-radius: 2px;
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: transform 0.2s, box-shadow 0.2s;
}

.deliverables-panel-item.deliverables-modal-trigger {
    cursor: pointer;
}

/* Each card placed at a specific spot — same positions as Trail Mix */
.deliverables-panel-item:nth-child(1)  { top: 2%;  left: 4%;   transform: rotate(-4deg);  z-index: 2; }
.deliverables-panel-item:nth-child(2)  { top: 4%;  left: 45%;  transform: rotate(3deg);   z-index: 3; }
.deliverables-panel-item:nth-child(3)  { top: 18%; left: 22%;  transform: rotate(-2deg);  z-index: 4; }
.deliverables-panel-item:nth-child(4)  { top: 28%; left: 52%;  transform: rotate(5deg);   z-index: 2; }
.deliverables-panel-item:nth-child(5)  { top: 32%; left: 3%;   transform: rotate(-3deg);  z-index: 3; }
.deliverables-panel-item:nth-child(6)  { top: 46%; left: 35%;  transform: rotate(2deg);   z-index: 5; }
.deliverables-panel-item:nth-child(7)  { top: 50%; left: 5%;   transform: rotate(-5deg);  z-index: 2; }
.deliverables-panel-item:nth-child(8)  { top: 58%; left: 52%;  transform: rotate(4deg);   z-index: 3; }
.deliverables-panel-item:nth-child(9)  { top: 70%; left: 18%;  transform: rotate(-2deg);  z-index: 4; }
.deliverables-panel-item:nth-child(10) { top: 74%; left: 54%;  transform: rotate(3deg);   z-index: 2; }

.deliverables-panel-item:hover {
    transform: rotate(0deg) scale(1.06);
    box-shadow: 4px 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.deliverables-panel-preview {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deliverables-panel-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deliverables-panel-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #1a3a6b;
}

.deliverables-panel-icon svg {
    width: 48px;
    height: 48px;
}

.deliverables-panel-icon--video    { color: #1a3a6b; }
.deliverables-panel-icon--audio    { color: #dc1f34; }
.deliverables-panel-icon--document { color: #dc1f34; }
.deliverables-panel-icon--text     { color: #1a3a6b; }
.deliverables-panel-icon--other    { color: #1a3a6b; }

.deliverables-panel-icon-ext {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deliverables-panel-item-info {
    padding: 8px 10px;
}

.deliverables-panel-item-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a3a6b;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deliverables-panel-item-type {
    font-size: 14px;
    color: #1a3a6b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Likes on collage cards — positioned with z-index to avoid bubbling issues */
.deliverables-panel-item-likes {
    margin-top: 4px;
    position: relative;
    z-index: 15;
}

.deliverables-panel-item-likes .invp-likes-btn {
    padding: 3px 6px;
}

.deliverables-panel-item-likes .invp-likes-icon {
    width: 16px;
    height: 16px;
}

.deliverables-panel-item-likes .invp-likes-count {
    font-size: 12px;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.deliverables-modal-container {
    width: 55%;
    max-height: 80vh;
    position: relative;
    background-color: rgb(243, 245, 244);
    overflow-y: auto;
    animation: deliverablesSlideIn 0.25s linear 1;
    border-radius: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.deliverables-modal-container::-webkit-scrollbar {
    display: none;
}

@keyframes deliverablesSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.deliverables-modal-exit {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 10px 10px 8px 10px;
    z-index: 100;
    border-radius: 50px;
    background-color: rgb(243, 245, 244);
    border: none;
    cursor: pointer;
}

.deliverables-modal-exit path {
    fill: #1a3a6b;
    transition: fill 0.5s ease;
}

.deliverables-modal-exit:hover path {
    fill: #dc1f34;
}

.deliverables-modal-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.deliverables-modal-info-container {
    padding: 0 50px 30px;
    display: flex;
    flex-direction: column;
    row-gap: 16px;
}

.deliverables-modal-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.deliverables-modal-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #1a3a6b;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
}

.deliverables-modal-title {
    font-size: 34px;
    font-weight: 700;
    color: #1a3a6b;
    margin: 0;
}

.deliverables-modal-desc {
    font-size: 26px;
    color: #444;
    margin: 0;
    line-height: 1.6;
}

.deliverables-modal-video,
.deliverables-modal-audio {
    width: 100%;
    display: block;
}

.deliverables-modal-video {
    max-height: 800px;
    object-fit: contain;
}

.deliverables-modal-text-content {
    font-size: 24px;
    line-height: 1.7;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 24px 28px;
    max-height: 800px;
    overflow-y: auto;
    white-space: pre-wrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.deliverables-modal-text-content::-webkit-scrollbar {
    display: none;
}

/* URL button — navy styled, appears when admin sets a URL */
.deliverables-modal-url-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1a3a6b;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
    width: fit-content;
}

.deliverables-modal-url-btn:hover {
    background: #dc1f34 !important;
    color: #fff;
}

.deliverables-modal-likes {
    margin-top: 8px;
}

.deliverables-modal-bottom-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border: 5px solid #1a3a6b;
    padding: 15px;
}

.deliverables-modal-file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deliverables-modal-filename {
    font-size: 16px;
    font-weight: bold;
    word-break: break-all;
    color: #1a3a6b;
}

.deliverables-modal-filesize {
    font-size: 14px;
    color: #6b7280;
}

.deliverables-modal-download-btn {
    white-space: nowrap;
    flex-shrink: 0;
    background: #dc1f34;
    color: #fff;
}

.deliverables-modal-download-btn:hover {
    background: #1a3a6b !important;
    color: #fff !important;
}

.deliverables-modal-player {
    width: 100%;
}

.deliverables-no-file {
    font-size: 13px;
    color: #9ca3af;
    padding: 16px;
}

.deliverables-fallback-link {
    color: #1a3a6b;
    font-size: 14px;
}

/* ── Panel Footer ────────────────────────────────────────────────────────── */
.deliverables-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.deliverables-see-everything {
    display: block;
    text-align: center;
    width: 100%;
    font-size: 30px;
    background: #1a3a6b;
    color: #fff;
}

.deliverables-see-everything:hover {
    background: #dc1f34 !important;
    color: #fff;
}

/* ── Full Page ───────────────────────────────────────────────────────────── */
.deliverables-page {
    padding-top: 60px;
    padding-bottom: 80px;
}

.deliverables-page-intro {
    max-width: 1000px;
    margin: 0 auto 32px;
    text-align: center;
}

.deliverables-page-desc {
    font-size: 30px;
    color: #1a3a6b;
    line-height: 1.6;
    margin: 0;
}

/* ── Search Bar ──────────────────────────────────────────────────────────── */
.deliverables-search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 48px;
}

.deliverables-search-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.deliverables-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #1a3a6b;
    width: 20px;
    height: 20px;
}

.deliverables-search-input {
    width: 100%;
    padding: 12px 15px 12px 46px !important;
    font-size: 14px;
    border: 2px solid #1a3a6b;
    border-radius: 5px;
    outline: none;
    box-sizing: border-box;
    color: #1a3a6b;
    background: #fff;
}

.deliverables-search-input::placeholder {
    color: #6b7280;
}

.deliverables-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #1a3a6b;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.deliverables-search-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
}

.deliverables-search-card {
    background: rgb(243, 245, 244);
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
    border-radius: 4px;
    overflow: hidden;
}

.deliverables-search-card:hover {
    transform: scale(1.02);
}

.deliverables-search-card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.deliverables-search-card-icon {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #1a3a6b;
}

.deliverables-search-card-info {
    padding: 10px;
}

.deliverables-search-card-title {
    font-weight: bold;
    font-size: 13px;
    margin: 0 0 3px;
    color: #333;
}

.deliverables-search-card-excerpt {
    font-size: 11px;
    color: #666;
    margin: 0 0 3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deliverables-search-card-meta {
    font-size: 11px;
    color: #1a3a6b;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
}

.deliverables-search-no-results {
    padding: 30px;
    text-align: center;
    color: #666;
}

.deliverables-archived-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #1a3a6b;
    color: white;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 10;
}

.deliverables-modal-archived-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #6b7280;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Full Page Masonry Grid ──────────────────────────────────────────────── */
.deliverables-collage {
    columns: 3;
    column-gap: 20px;
}

/* ── Full Page Cards — reuses Trail Mix card classes via invp_trailmix_render_item() ── */
.deliverables-card-wrapper {
    cursor: pointer;
    break-inside: avoid;
}

.deliverables-card-wrapper:hover .trailmix-card {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* Likes row sits after .trailmix-card inside .deliverables-card-wrapper */
.deliverables-card-wrapper .trailmix-card {
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.deliverables-card-likes {
    padding: 8px 16px 12px;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
    margin-bottom: 20px;
}

@media (max-width: 1023px) {
    .deliverables-collage {
        columns: 2;
    }

    .deliverables-modal-container {
        width: 80%;
    }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .deliverables-panel {
        width: 100vw;
        left: -100vw;
    }

    .deliverables-panel.is-open {
        left: 0;
    }

    .deliverables-panel-content {
        padding-bottom: 100px;
    }

    .deliverables-panel-footer {
        margin-bottom: 100px;
    }

    .deliverables-panel-header h3 {
        font-size: 30px;
        flex-wrap: wrap;
    }

    .deliverables-panel-header svg {
        width: 40px;
        height: 40px;
    }

    .deliverables-panel-item {
        width: 48%;
    }

    .deliverables-see-everything {
        font-size: 15px;
    }

    .deliverables-page {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    .deliverables-page-desc {
        font-size: 20px;
    }

    .deliverables-search-container {
        max-width: 100%;
    }

    .deliverables-search-grid {
        grid-template-columns: 1fr;
    }

    .deliverables-collage {
        columns: 1;
    }

    .deliverables-modal-container {
        width: 95%;
    }

    .deliverables-modal-info-container {
        padding: 0 20px 24px;
    }

    .deliverables-modal-image {
        height: 220px;
    }

    .deliverables-modal-title {
        font-size: 26px;
    }

    .deliverables-modal-desc {
        font-size: 18px;
    }

    .deliverables-modal-bottom-row {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .deliverables-modal-url-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@supports (-webkit-touch-callout: none) {
    .deliverables-panel-content {
        padding-bottom: 100px;
    }
    .deliverables-panel-footer {
        margin-bottom: 150px;
    }
}