/**
 * File Upload & Dropzone Component Styles
 */
.file-upload-component {
    width: 100%;
}

.upload-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.upload-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ticket-text-primary, #1E293B);
}

.btn-clipboard-paste,
.ticket-btn-clipboard-paste {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ticket-bg-subtle, #F8FAFC);
    border: 1px solid var(--ticket-border, #CBD5E1);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ticket-text-secondary, #64748B);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-clipboard-paste:hover,
.ticket-btn-clipboard-paste:hover {
    background: var(--ticket-primary-light, #EDE9FE);
    border-color: #D2CCEE;
    color: var(--ticket-primary, #7B3FE4);
}

.btn-clipboard-paste .material-symbols-outlined,
.ticket-btn-clipboard-paste .material-symbols-outlined {
    font-size: 15px;
}

/* Dropzone */
.file-dropzone,
.ticket-dropzone {
    border: 2px dashed var(--ticket-border, #CBD5E1);
    border-radius: var(--ticket-radius-sm, 6px);
    padding: 24px 16px;
    text-align: center;
    background: var(--ticket-bg-subtle, #F8FAFC);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.file-dropzone:hover,
.file-dropzone:focus-visible,
.ticket-dropzone:hover,
.ticket-dropzone:focus-visible {
    border-color: var(--ticket-primary, #7B3FE4);
    background: #F4F2FF;
}

.file-dropzone.is-dragover,
.ticket-dropzone.is-dragover {
    border-color: var(--ticket-primary, #7B3FE4);
    background: #EDE9FE;
    transform: scale(1.005);
}

.file-dropzone-content,
.ticket-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.file-dropzone-icon,
.ticket-dropzone-icon {
    font-size: 30px;
    color: var(--ticket-primary, #7B3FE4);
    margin-bottom: 2px;
}

.file-dropzone-title,
.ticket-dropzone-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--ticket-text-primary, #1E293B);
    margin: 0;
}

.file-dropzone-hint,
.ticket-dropzone-hint {
    font-size: 11px;
    color: var(--ticket-text-muted, #94A3B8);
}

/* Staged File Cards / Previews */
.file-previews,
.ticket-file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.file-card,
.ticket-file-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid var(--ticket-border, #E2E8F0);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    transition: all 0.15s ease;
}

.file-card:hover,
.ticket-file-card:hover {
    border-color: #CBD5E1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.file-thumb,
.ticket-file-thumb {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    background: #F1F5F9;
    flex-shrink: 0;
    border: 1px solid #E2E8F0;
}

.file-thumb-clickable,
.ticket-file-thumb-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.file-thumb-clickable:hover,
.ticket-file-thumb-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(123, 63, 228, 0.3);
    border-color: var(--ticket-primary, #7B3FE4);
}

.file-icon-box,
.ticket-file-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: var(--ticket-primary-light, #EDE9FE);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon-box .material-symbols-outlined,
.ticket-file-icon-box .material-symbols-outlined {
    font-size: 20px;
    color: var(--ticket-primary, #7B3FE4);
}

.file-meta,
.ticket-file-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 240px;
    flex: 1;
}

.file-name,
.ticket-file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ticket-text-primary, #1E293B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.15s ease;
}

.file-name:hover,
.ticket-file-name:hover {
    color: var(--ticket-primary, #7B3FE4);
    text-decoration: underline;
}

.file-size,
.ticket-file-size {
    font-size: 11px;
    color: var(--ticket-text-muted, #94A3B8);
}

.file-actions,
.ticket-file-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 4px;
}

.file-action-btn,
.ticket-file-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--ticket-text-muted, #94A3B8);
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.file-action-btn:hover,
.ticket-file-action-btn:hover {
    background: #F1F5F9;
    color: var(--ticket-text-primary, #1E293B);
}

.file-action-btn.file-remove:hover,
.ticket-file-action-btn.ticket-file-remove:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.file-action-btn.file-rename:hover,
.ticket-file-action-btn.ticket-file-rename:hover {
    background: var(--ticket-primary-light, #EDE9FE);
    color: var(--ticket-primary, #7B3FE4);
}

.file-action-btn.file-open-tab:hover,
.ticket-file-action-btn.ticket-file-open-tab:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.file-pdf-clickable,
.ticket-file-pdf-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.file-pdf-clickable:hover,
.ticket-file-pdf-clickable:hover {
    transform: scale(1.05);
    background: #FEE2E2 !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.file-pdf-clickable:hover .material-symbols-outlined,
.ticket-file-pdf-clickable:hover .material-symbols-outlined {
    color: #DC2626 !important;
}

.file-text-clickable,
.ticket-file-text-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.file-text-clickable:hover,
.ticket-file-text-clickable:hover {
    transform: scale(1.05);
    background: #EDE9FE !important;
    box-shadow: 0 2px 6px rgba(123, 63, 228, 0.25);
}

.file-text-clickable:hover .material-symbols-outlined,
.ticket-file-text-clickable:hover .material-symbols-outlined {
    color: var(--ticket-primary, #7B3FE4) !important;
}

.file-action-btn .material-symbols-outlined,
.ticket-file-action-btn .material-symbols-outlined {
    font-size: 16px;
}

/* ==========================================================================
   Image & Code/Text Lightbox Modal
   ========================================================================== */
.file-image-modal,
.ticket-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.file-image-modal-overlay,
.ticket-image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.file-image-modal-content,
.ticket-image-modal-content {
    position: relative;
    z-index: 2;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.file-image-modal-header,
.ticket-image-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
    background: #FFFFFF;
    gap: 16px;
}

.file-image-modal-title,
.ticket-image-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.file-text-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.file-text-copy-btn:hover {
    background: #EDE9FE;
    color: var(--ticket-primary, #7B3FE4);
    border-color: #D2CCEE;
}

.file-text-copy-btn .material-symbols-outlined {
    font-size: 15px;
}

.file-image-modal-close,
.ticket-image-modal-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #64748B;
    cursor: pointer;
    border-radius: 6px;
    padding: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.file-image-modal-close:hover,
.ticket-image-modal-close:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.file-image-modal-body,
.ticket-image-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: auto;
    background: #F8FAFC;
    max-height: calc(90vh - 60px);
}

.file-image-modal-body img,
.ticket-image-modal-body img {
    max-width: 100%;
    max-height: calc(90vh - 90px);
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Code & Text Preview Box */
.file-text-preview-container {
    width: 100%;
    min-width: 340px;
    max-width: 860px;
    max-height: calc(85vh - 100px);
    overflow: auto;
    background: #0F172A;
    color: #E2E8F0;
    border-radius: 8px;
    padding: 16px 20px;
    box-sizing: border-box;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    user-select: text;
    margin: 0;
    border: 1px solid #334155;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}
