/* ─────────────────────────────────────────────────────────────────────────
   form_file_upload.css
   Styles for the photo / document upload form field (type file_upload).
   Loaded lazily by class.forms.php only when a form contains one.
───────────────────────────────────────────────────────────────────────── */

/* Dealer themes sometimes center the container holding the form; keep the
   zone's copy and the thumbnails reading left to right like the inputs. */
.gbuc-file-upload-wrap {
    position: relative;
    text-align: left;
}

/* ── Drop zone ───────────────────────────────────────────────────────────── */
.gbuc-file-upload-zone {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 2px dashed #cfd4da;
    border-radius: 0.6rem;
    background: #f6f7f9;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.gbuc-file-upload-zone:hover,
.gbuc-file-upload-zone:focus-visible,
.gbuc-file-upload-wrap.is-dragover .gbuc-file-upload-zone {
    border-color: #0d6efd;
    background: #eef4ff;
    outline: none;
}
/* Layout option "center": the icon-and-text group sits in the middle of the
   zone, as in the Rubio mock; the text itself stays left aligned beside the
   icon so a long note still reads as a block. */
.gbuc-file-upload-zone-center {
    justify-content: center;
}
.gbuc-file-upload-wrap.is-busy .gbuc-file-upload-zone {
    opacity: 0.6;
    cursor: progress;
}

.gbuc-file-upload-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #212529;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.gbuc-file-upload-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.gbuc-file-upload-title {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
}
.gbuc-file-upload-hint {
    font-size: 0.85rem;
    color: #6c757d;
}
.gbuc-file-upload-note {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #8a6d00;
}

/* The real file input only exists to open the OS picker. */
.gbuc-file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ── Selected files ──────────────────────────────────────────────────────── */
.gbuc-file-upload-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.gbuc-file-upload-list:empty {
    display: none;
}
.gbuc-file-upload-count {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: #6c757d;
}
.gbuc-file-upload-item {
    position: relative;
    width: 84px;
}
.gbuc-file-upload-thumb {
    display: block;
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 0.4rem;
    border: 1px solid #dee2e6;
    background: #fff;
}
.gbuc-file-upload-thumb-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #dc3545;
}
.gbuc-file-upload-name {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gbuc-file-upload-size {
    display: block;
    font-size: 0.65rem;
    color: #868e96;
}
.gbuc-file-upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.gbuc-file-upload-remove:hover {
    background: #b02a37;
}

/* ── Errors ──────────────────────────────────────────────────────────────── */
.gbuc-file-upload-error {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #dc3545;
}
