/**
 * THX Upload Component - Unified Styles
 */

.thx-upload-zone {
    position: relative;
    border: 2px dashed #dfe6e9;
    border-radius: 10px;
    padding: 15px;
    background: #fafbfc;
    transition: border-color 0.2s, background 0.2s;
}

.thx-upload-zone.dragover {
    border-color: #0984e3;
    background: #edf5ff;
}

.thx-upload-zone .thx-upload-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0984e3;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.1s;
}

.thx-upload-zone .thx-upload-trigger-btn:hover {
    background: #0770c2;
    transform: translateY(-1px);
}

.thx-upload-zone .thx-upload-trigger-btn:disabled {
    background: #b2bec3;
    cursor: not-allowed;
    transform: none;
}

.thx-upload-zone .thx-upload-hint {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.8rem;
    color: #b2bec3;
}

/* Progress Container */
.thx-upload-progress {
    display: none;
    margin-top: 10px;
    height: 6px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.thx-upload-progress .thx-upload-progress-fill {
    height: 100%;
    width: 0%;
    background: #0984e3;
    border-radius: 4px;
    transition: width 0.15s ease, background 0.3s;
}

.thx-upload-progress .thx-upload-progress-fill.processing {
    background: #f39c12;
}

.thx-upload-progress .thx-upload-progress-fill.complete {
    background: #27ae60;
}

/* File Preview List */
.thx-upload-file-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.thx-upload-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: #2d3436;
    animation: thxUploadFadeIn 0.25s ease;
}

.thx-upload-file-item .thx-upload-file-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.thx-upload-file-item .thx-upload-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.thx-upload-file-item .thx-upload-file-name a {
    color: inherit;
    text-decoration: none;
}

.thx-upload-file-item .thx-upload-file-name a:hover {
    text-decoration: underline;
}

.thx-upload-file-item .thx-upload-file-remove {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.thx-upload-file-item .thx-upload-file-remove:hover {
    opacity: 1;
}

@keyframes thxUploadFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* THX Lightbox Custom Popup */
#thx-lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#thx-lightbox.active {
    display: flex;
    animation: thxLightboxFadeIn 0.3s ease;
}
#thx-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#thx-lightbox.active img {
    transform: scale(1);
}
#thx-lightbox .thx-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    font-weight: 300;
}
#thx-lightbox .thx-lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes thxLightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
