/* ================================================================== */
/* Thimze Packages — Artwork Submission Modal                          */
/* ================================================================== */

/* Overlay */
.tpkg-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.tpkg-overlay.is-open {
    display: flex;
}

/* Modal box */
.tpkg-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
    overflow: hidden;
}

/* Header */
.tpkg-modal__header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
}
.tpkg-modal__title {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    margin: 0 0 3px;
}
.tpkg-modal__subtitle {
    font-size: 12px;
    color: #888;
    margin: 0;
}
.tpkg-modal__close {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
    color: #111;
    padding: 0;
    line-height: 1;
    transition: border-color .15s, background .15s, color .15s;
}
.tpkg-modal__close:hover {
    border-color: #27c2eb;
    background: #27c2eb;
    color: #fff;
}
.tpkg-modal__close svg { width: 10px; height: 10px; display: block; flex-shrink: 0; }

/* Body */
.tpkg-modal__body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

/* ── Slot ── */
.tpkg-slot {
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color .15s;
}
.tpkg-slot.is-complete { border-color: #27c2eb; }

.tpkg-slot__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}
.tpkg-slot__num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #27c2eb;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tpkg-slot__num.done {
    background: #1d9e75;
}
.tpkg-slot__name {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    color: #111;
}
.tpkg-slot__qty {
    font-size: 11px;
    color: #fff;
    background: #27c2eb;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Tab toggle */
.tpkg-slot__tabs {
    display: flex;
    gap: 8px;
    padding: 12px 14px 0;
}
.tpkg-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 10px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    background: #fafafa;
    transition: border-color .15s, background .15s;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    user-select: none;
}
.tpkg-tab:hover { border-color: #27c2eb; background: #f0fbff; }
.tpkg-tab.is-active { border-color: #27c2eb; background: #e6f9fd; color: #0e8faf; }
.tpkg-tab svg { flex-shrink: 0; }

/* Slot body */
.tpkg-slot__body { padding: 12px 14px 14px; }

/* Upload zone */
.tpkg-upload-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
}
.tpkg-upload-zone:hover,
.tpkg-upload-zone.is-dragover {
    border-color: #27c2eb;
    background: #f0fbff;
}
.tpkg-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.tpkg-upload-zone__icon {
    margin: 0 auto 8px;
    display: block;
    color: #27c2eb;
}
.tpkg-upload-zone__text {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin: 0 0 3px;
}
.tpkg-upload-zone__sub {
    font-size: 11px;
    color: #aaa;
    margin: 0;
}

/* Upload progress */
.tpkg-upload-progress {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f0fbff;
    border-radius: 8px;
    margin-top: 8px;
}
.tpkg-upload-progress.is-visible { display: flex; }
.tpkg-progress-bar-wrap {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}
.tpkg-progress-bar {
    height: 100%;
    background: #27c2eb;
    border-radius: 2px;
    width: 0%;
    transition: width .3s;
}
.tpkg-progress-label { font-size: 11px; color: #0e8faf; white-space: nowrap; }

/* Attached file chip */
.tpkg-file-chip {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #e6f9fd;
    border: 1.5px solid #27c2eb;
    border-radius: 8px;
    margin-top: 8px;
}
.tpkg-file-chip.is-visible { display: flex; }
.tpkg-file-chip__icon { color: #27c2eb; flex-shrink: 0; }
.tpkg-file-chip__name { font-size: 12px; color: #0e8faf; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpkg-file-chip__remove { background: none; border: none; cursor: pointer; color: #aaa; padding: 0; line-height: 1; }
.tpkg-file-chip__remove:hover { color: #e53e3e; }
.tpkg-file-chip__remove svg { width: 12px; height: 12px; display: block; }

/* Request form */
.tpkg-request-form { display: none; }
.tpkg-request-form.is-visible { display: block; }

.tpkg-request-form textarea {
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 72px;
    color: #333;
    outline: none;
    transition: border-color .15s;
    margin-bottom: 10px;
}
.tpkg-request-form textarea:focus { border-color: #27c2eb; }

/* Reference file (logo/inspiration) — inside request form */
.tpkg-ref-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tpkg-ref-zone {
    border: 1.5px dashed #d0d0d0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tpkg-ref-zone:hover { border-color: #27c2eb; background: #f0fbff; }
.tpkg-ref-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.tpkg-ref-zone__icon { color: #bbb; flex-shrink: 0; }
.tpkg-ref-zone__text { font-size: 12px; color: #888; text-align: left; }
.tpkg-ref-zone__sub { font-size: 10px; color: #bbb; }

/* Footer */
.tpkg-modal__footer {
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}
.tpkg-progress-info {
    font-size: 12px;
    color: #888;
}
.tpkg-progress-info strong { color: #27c2eb; }
.tpkg-modal__actions { display: flex; gap: 10px; }
.tpkg-btn-cancel {
    padding: 10px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #555;
    transition: border-color .15s;
}
.tpkg-btn-cancel:hover { border-color: #ccc; }
.tpkg-btn-confirm {
    padding: 10px 20px;
    background: #27c2eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}
.tpkg-btn-confirm:hover { background: #1a9dbf; }
.tpkg-btn-confirm:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 600px) {
    .tpkg-modal { max-height: 95vh; border-radius: 12px; }
    .tpkg-tab { font-size: 11px; padding: 8px; }
}
