﻿:root {
    --navy: #102b50;
    --blue: #1769aa;
    --green: #16834a;
    --line: #dce3eb;
    --muted: #687789;
    --bg: #f4f7fb
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    font: 15px/1.45 Arial,sans-serif;
    color: #172536;
    padding: 24px
}

.demo {
    max-width: 1050px;
    margin: auto
}

.note {
    color: var(--muted);
    font-size: 13px;
    margin: 5px 0 18px
}

.slots {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 12px;
    margin-bottom: 22px
}

.slot {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    min-width: 0
}

    .slot strong {
        display: block;
        margin-bottom: 8px
    }

.slot-preview {
    width:100%;
    aspect-ratio:2 / 3;
    height:auto;
    border-radius:8px;
    background:#eef2f7;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    color:#8793a2;
    font-size:12px;
}

.slot-preview img {
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
}

.slot button {
    width: 100%;
    margin-top: 8px
}

button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer
}

.primary {
    background: var(--green);
    color: #fff
}

.secondary {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--navy)
}

.danger {
    background: #fff0f0;
    color: #b42318;
    border: 1px solid #ffd4d1
}

.modal {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 35px #102b5020;
    overflow: hidden
}

.modal-head {
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center
}

    .modal-head h1 {
        font-size: 21px;
        margin: 0;
        color: var(--navy)
    }

.modal-body {
    padding: 20px 22px
}

.search {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 15px;
    margin-bottom: 17px
}

.label {
    font-size: 13px;
    font-weight: 700;
    color: #435166;
    margin-bottom: 9px
}

.categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px
}

.cat {
    background: #f3f6fa;
    color: #34445a;
    border: 1px solid #e1e7ef;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px
}

    .cat.active {
        background: var(--navy);
        color: #fff;
        border-color: var(--navy)
    }

.grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 13px
}

.image-card {
    border: 2px solid transparent;
    border-radius: 11px;
    padding: 6px;
    text-align: left;
    background: #fff;
    min-width: 0
}

    .image-card:hover {
        border-color: #a7c7e7
    }

    .image-card.selected {
        border-color: var(--green);
        background: #f2fbf5
    }

/* PROMOTION LIBRARY - PORTRAIT POSTER */
.art {
    display:block;
    width:100%;
    aspect-ratio:2 / 3;
    height:auto;
    border-radius:8px;
    overflow:hidden;
    object-fit:contain;
    object-position:center;
    background:#f3f5f8;
}

/* IMAGE CARD */
.image-card {
    border:2px solid transparent;
    border-radius:11px;
    padding:7px;
    text-align:left;
    background:#fff;
    min-width:0;
    width:100%;
}

.image-card:hover {
    border-color:#a7c7e7;
}

.image-card.selected {
    border-color:#16834a;
    background:#f2fbf5;
}

.image-card small {
    display: block;
    color: #596779;
    padding: 8px 2px 2px;
    font-size: 12px
}

.empty {
    grid-column: 1/-1;
    padding: 35px;
    text-align: center;
    color: var(--muted);
    background: #f8fafc;
    border-radius: 10px
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding: 16px 22px
}

.action-right {
    display: flex;
    gap: 9px
}

.hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px
}

.preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #07182dcc;
    z-index: 10;
    align-items: center;
    justify-content: center;
    padding: 18px
}

    .preview-overlay.show {
        display: flex
    }

.preview-box {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    width: min(520px,100%)
}

.preview-art {
    height: 300px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    text-shadow: 0 1px 5px #0008;
    white-space: pre-line
}

.preview-box .actions {
    padding: 14px 0 0;
    border: 0
}

.status {
    font-size: 13px;
    color: var(--green);
    min-height: 18px
}

@media(max-width:760px) {
    body {
        padding: 12px
    }

    .slots {
        grid-template-columns: repeat(2,1fr)
    }

    .grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .modal-head, .modal-body {
        padding: 15px
    }

    .art {
        height: 115px
    }

    .actions {
        padding: 14px
    }

    .preview-art {
        height: 230px
    }
}
/* Desktop */
.grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}

/* Tablet */
@media (max-width:900px) {
    .grid {
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

/* Mobile */
@media (max-width:600px) {
    .grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }
}
