/* ==========================================================================
   Ticket media previews (player tickets page + staff dashboard)
   Rendered by assets/js/ticket-media.js. Colours follow the dashboard's
   purple/gold vocabulary so previews read as part of the ticket, not an
   embedded widget.
   ========================================================================== */

.tm-inline-link {
    color: #a78bfa;
    text-decoration: none;
    border-bottom: 1px dotted rgba(167, 139, 250, 0.5);
    word-break: break-word;
}

.tm-inline-link:hover {
    color: #c084fc;
    border-bottom-color: #c084fc;
}

.tm-media {
    margin-top: 12px;
    /* Message bodies use white-space: pre-wrap; the preview grid must not inherit it */
    white-space: normal;
}

.tm-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(201, 165, 90, 0.75);
}

.tm-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

/* Image / video thumbnails */
.tm-tile {
    position: relative;
    display: block;
    width: 148px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.25);
    background: rgba(0, 0, 0, 0.45);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tm-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(192, 132, 252, 0.7);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.tm-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Shown only when the remote image fails or there is no thumbnail */
.tm-tile-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.75rem;
    color: #c4b5fd;
    text-align: center;
    padding: 6px;
}

.tm-tile.tm-broken .tm-tile-fallback,
.tm-tile.tm-nothumb .tm-tile-fallback {
    display: flex;
}

.tm-tile.tm-broken {
    background: rgba(139, 92, 246, 0.08);
}

.tm-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    pointer-events: none;
}

.tm-tile.tm-broken .tm-play {
    display: none;
}

/* Non-previewable links */
.tm-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 260px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.tm-chip:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(192, 132, 252, 0.6);
    color: #e9d5ff;
}

@media (max-width: 600px) {
    .tm-tile {
        width: 120px;
        height: 78px;
    }
}

/* ==========================================================================
   Ticket participants (group / IC sessions)
   ========================================================================== */

.tp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tp-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #7dd3fc;
    font-size: 0.78rem;
    white-space: nowrap;
}

.tp-chip.owner {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
}

.tp-chip img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.tp-remove {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0 0 0 2px;
    font-size: 0.8rem;
    line-height: 1;
}

.tp-remove:hover {
    opacity: 1;
    color: #f87171;
}

.tp-empty {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

.tp-add-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tp-add-row input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.85rem;
}

.tp-add-row input:focus {
    outline: none;
    border-color: #c084fc;
}

.tp-add-btn {
    padding: 8px 16px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tp-add-btn:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.28);
    color: #e0f2fe;
}

.tp-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* "Shared with you" marker on the player's ticket list */
.tp-shared-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    font-size: 0.7rem;
    font-weight: 600;
}
