/* Ticket attachments (Components/TicketAttachments.razor).
   Plain CSS rather than Tailwind utilities: wwwroot/css/app.css is a generated,
   minified build of src/styles.css and only holds the utilities already in use. */

.attach-section {
    border-top: 1px solid #334155;
    padding-top: 1rem;
}

.attach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.attach-tile {
    position: relative;
    min-width: 0;
}

.attach-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    cursor: zoom-in;
    padding: 0;
    transition: border-color 0.15s;
}

.attach-thumb:hover,
.attach-thumb:focus-visible {
    border-color: #818cf8;
    outline: none;
}

.attach-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attach-thumb-delete {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    border-radius: 9999px;
    background: rgba(15, 15, 15, 0.8);
    color: #f87171;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    border: 1px solid #475569;
}

.attach-thumb-delete:hover {
    background: #dc2626;
    color: #fff;
}

.attach-caption {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #cbd5e1;
    min-width: 0;
}

.attach-dropzone {
    border: 2px dashed #475569;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.15s, background-color 0.15s;
}

.attach-dropzone:focus-visible,
.attach-dropzone-active {
    border-color: #818cf8;
    background: rgba(99, 102, 241, 0.1);
    outline: none;
}

/* InputFile inside a label styled as a button. */
.attach-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.attach-upload-row {
    background: #1a1a1a;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.attach-progress {
    position: relative;
    height: 0.25rem;
    margin-top: 0.5rem;
    overflow: hidden;
    border-radius: 9999px;
    background: #334155;
}

.attach-progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    border-radius: 9999px;
    background: #6366f1;
    animation: attach-progress 1.2s ease-in-out infinite;
}

@keyframes attach-progress {
    from { left: -40%; }
    to { left: 100%; }
}

/* Full-size viewer (ModalShell MaxWidth). */
.attach-viewer {
    max-width: min(1200px, 95vw);
}

.attach-viewer-img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
    object-fit: contain;
}

.attach-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
