/* =============================================
 * Unified Upload System
 * ============================================= */

/* Upload toast — blue theme (complements green download and yellow PDF toasts) */
.ajax-message.wt-upload-toast {
    background: #e8f4fd;
    border-color: #b8d4e8;
    color: #2c5f7c;
}

/* Toast progress bar */
.wt-upload-toast-bar {
    height: 6px;
    background: #d0e4f0;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.wt-upload-toast-fill {
    height: 100%;
    background: #4a90d9;
    border-radius: 3px;
    transition: width 0.2s ease;
}

/* Error banner (inline, within overlays) */
.wt-upload-error {
    background: #fce4e4;
    border: 1px solid #d9534f;
    color: #a94442;
    padding: 8px 12px;
    margin: -12px 0 8px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.4;
}

/* Warning banner (softer than error) */
.wt-upload-warning {
    background: #fcf8e3;
    border: 1px solid #faebcc;
    color: #8a6d3b;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.4;
}

/* Image preview thumbnail */
.wt-upload-preview {
    display: inline-block;
    vertical-align: top;
    margin: 4px 8px 4px 0;
}
.wt-upload-preview img {
    max-width: 80px;
    max-height: 80px;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 1px;
    background: #fff;
    vertical-align: middle;
}
.wt-upload-preview-info {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}
.wt-upload-preview-resize {
    font-size: 11px;
    color: #8a6d3b;
    margin-top: 1px;
    font-style: italic;
}

/* File info display */
.wt-upload-file-info {
    font-size: 12px;
    color: #555;
    padding: 2px 0;
}

/* Audio validation feedback */
.wt-upload-audio-check {
    font-size: 13px;
    padding: 6px 0;
}
.wt-upload-audio-check.checking {
    color: #888;
}
.wt-upload-audio-check.checking:before {
    content: "\25CB  ";
}
.wt-upload-audio-check.valid {
    color: #3c763d;
}
.wt-upload-audio-check.valid:before {
    content: "\2713  ";
}
.wt-upload-audio-check.invalid {
    color: #a94442;
}
.wt-upload-audio-check.invalid:before {
    content: "\2717  ";
}


/* File upload dialog: anchor buttons from top so they don't shift when dialog grows */
.overlay.large .add-file ~ .button.add,
.overlay.large .add-file ~ .button.addWait {
    top: 425px !important;
    bottom: auto !important;
}
.overlay.large .add-file ~ .close {
    top: 426px !important;
    bottom: auto !important;
}
.overlay:has(.add-file .wt-upload-error) {
    height: 620px;
}
.overlay:has(.add-file .wt-upload-error) .main {
    height: 620px;
}

/* Upload status container — below the buttons, near dialog bottom */
.edit-image .wt-upload-status {
    position: absolute;
    bottom: 10px;
    left: 20px;
    right: 20px;
}

/* Position buttons next to dropdown area */
.overlay .edit-image #buttonUpload,
.overlay .edit-image #buttonClose {
    bottom: 100px !important;
}

/* Tighten file input in profile edit overlay and hide native tooltip */
.edit-image #photo_file_upload {
    width: auto;
    color: transparent;
    max-width: 260px;
}
.edit-image #photo_file_upload::-webkit-file-upload-button {
    color: initial;
}
