/* ── BUG-256 — Pre-Ticket page-level styles ──────────────────────────────── */

/* Page container */
.pt-page {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.pt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.pt-page-title {
    font-size: 20px;
    font-weight: bold;
    color: #e8eaf0;
}

body[data-theme="light"] .pt-page-title {
    color: #1a202c;
}

/* Header buttons */
.pt-refresh-btn {
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.15s;
}

.pt-refresh-btn:hover {
    background: #3a7fd9;
}

.pt-raise-new-btn {
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    transition: background 0.15s;
}

.pt-raise-new-btn:hover {
    background: #218838;
}

/* Filter bar */
.pt-filter-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: flex-end;
}

.pt-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.pt-filter-label {
    font-size: 12px;
    color: #9aa3b5;
    white-space: nowrap;
}

.pt-dropdown {
    min-width: 160px;
    color: #1a1f2e;
}

/* Date inputs */
.pt-date-input {
    background: #1e2537;
    color: #e8eaf0;
    border: 1px solid #2d3548;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 13px;
    min-width: 160px;
    box-sizing: border-box;
    outline: none;
}

.pt-date-input:focus {
    border-color: #4a90d9;
}

body[data-theme="light"] .pt-date-input {
    background: #f7f9fc;
    color: #1a202c;
    border-color: #d1d9e0;
}

body[data-theme="light"] .pt-date-input:focus {
    border-color: #4a90d9;
}

/* Action status */
.pt-action-status {
    min-height: 24px;
    font-size: 13px;
    color: #9aa3b5;
    margin-bottom: 10px;
}

body[data-theme="light"] .pt-action-status {
    color: #4a5568;
}

/* Section wrap */
.pt-section-wrap {
    position: relative;
}

/* Table wrap */
.pt-table-wrap {
    overflow-x: auto;
}

/* Mobile (<=480px) */
@media (max-width: 480px) {
    .pt-page {
        padding: 12px;
    }

    .pt-filter-bar {
        flex-direction: column;
    }

    .pt-filter-group {
        width: 100%;
        min-width: unset;
    }

    .pt-dropdown,
    .pt-date-input {
        width: 100%;
        min-width: unset;
    }

    .pt-refresh-btn,
    .pt-raise-new-btn {
        min-height: 44px;
        padding: 10px 16px;
    }
}

/* ── FEAT-147 — Pre-ticket image upload & timeline images ──────────────────── */

/* ── Image upload row in Raise modal ──────────────────────────────────────── */
.pt-img-upload-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.pt-img-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pt-img-upload {
    border: 2px dashed #2d3548;
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    color: #9aa3b5;
    font-size: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}

.pt-img-upload:hover {
    border-color: #4a9eff;
    color: #4a9eff;
}

body[data-theme="light"] .pt-img-upload {
    border-color: #c8d0de;
    color: #5a6070;
}

body[data-theme="light"] .pt-img-upload:hover {
    border-color: #4a9eff;
    color: #4a9eff;
}

.pt-img-upload-label {
    font-size: 12px;
    pointer-events: none;
}

.pt-img-preview {
    width: 100%;
    max-height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-top: 4px;
    border: 1px solid #2d3548;
}

body[data-theme="light"] .pt-img-preview {
    border-color: #d0d7e3;
}

/* ── Timeline images section ──────────────────────────────────────────────── */
.pt-timeline-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.pt-timeline-img-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.pt-timeline-img-thumb {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #2d3548;
    transition: opacity 0.2s, border-color 0.2s;
    display: block;
}

.pt-timeline-img-thumb:hover {
    opacity: 0.82;
    border-color: #4a9eff;
}

body[data-theme="light"] .pt-timeline-img-thumb {
    border-color: #c8d0de;
}

.pt-timeline-img-dl {
    font-size: 11px;
    color: #4a9eff;
    text-decoration: none;
}

.pt-timeline-img-dl:hover {
    text-decoration: underline;
}

/* ── Mobile (390px) ───────────────────────────────────────────────────────── */
@media (max-width: 390px) {
    .pt-img-upload-row {
        flex-direction: column;
    }

    .pt-timeline-images {
        gap: 6px;
    }

    .pt-timeline-img-thumb {
        width: 80px;
        height: 64px;
    }
}
