/* WFEPS frontend styles v1.2.8 - adjusted: images left (45%) / fields right (55%) on desktop,
   stacked on mobile/tablet with images first, then fields.
   (Everything else unchanged from previous version.)
*/

/* Base helpers */
.wfeps-form .wfeps-full {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
}

/* Layout columns:
   - Desktop/large: images (uploads) on the LEFT with 45%, fields on the RIGHT with 55%
   - Tablet/mobile: stacked column with images first, then fields
*/
.wfeps-columns {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: nowrap;
    margin-bottom: 18px;
}

/* images (uploads) placed visually left at desktop: .wfeps-right is uploads area */
.wfeps-right { order: 1; width: 45%; min-width: 300px; box-sizing: border-box; }
/* fields placed visually right at desktop */
.wfeps-left  { order: 2; width: 55%; min-width: 320px; box-sizing: border-box; }

/* Inputs: transparent background (per request) */
.wfeps-form input[type="text"],
.wfeps-form input[type="url"],
.wfeps-form textarea,
.wfeps-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    box-sizing: border-box;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: #fff;
    font-size: 14px;
}

/* Labels */
.wfeps-form label {
    color: #fff;
    display: inline-block;
    margin-bottom: 6px;
}

/* Featured header */
.wfeps-featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.wfeps-featured-label {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

/* Upload button */
.wfeps-featured-upload-btn {
    background: #2d2d2d;
    color:#fff;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.wfeps-featured-upload-btn .wfeps-btn-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
    margin: 0;
    padding: 0;
}

/* Dropzone */
.wfeps-dropzone {
    border-radius: 18px;
    padding: 18px;
    background: #111;
    color: #d0d0d0;
    border: 1px solid rgba(255,255,255,0.03);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    min-height: 200px;
}

/* Center the drop instructions vertically above each other (icon above text) */
.wfeps-drop-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column; /* ICON above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    pointer-events: none;
    z-index: 5;
}
.wfeps-drop-icon { margin-bottom: 10px; display:block; }
.wfeps-drop-instructions { color: #a8a8a8; font-size: 14px; line-height: 1.2; }
.wfeps-drop-sub { color: #8a8a8a; font-size: 12px; display:block; margin-top:6px; }

/* Preview container */
.wfeps-featured-preview {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-sizing: border-box;
    padding: 6px;
}

/* Hide instructions when preview exists */
#wfeps-featured-drop.wfeps-has-preview .wfeps-drop-content {
    display: none;
}

/* Make preview image centered/scaled */
.wfeps-featured-preview img.wfeps-preview-featured-img {
    max-width: 80%;
    max-height: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    object-fit: contain;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

/* Remove button above flow */
.wfeps-featured-remove {
    position: relative;
    z-index: 20;
    margin-top: 8px;
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* Gallery thumbs */
.wfeps-gallery-preview {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: nowrap;
}
.wfeps-gallery-thumb {
    width: calc((100% - 36px) / 4);
    background: #0f0f0f;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wfeps-gallery-thumb img { width:100%; height:auto; display:block; object-fit:cover; }

/* gallery delete button */
.wfeps-gallery-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255,255,255,0.96);
    color: #111;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    opacity: 0;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.wfeps-gallery-thumb:hover .wfeps-gallery-remove { opacity: 1; transform: translateY(-2px); }

/* Drag state */
.wfeps-dropzone.wfeps-dragover {
    outline: 2px dashed rgba(255,255,255,0.06);
    background: #0b0b0b;
}

/* Progress */
.wfeps-progress-area { margin-top: 12px; }
.wfeps-uploads-ui { margin-bottom: 12px; }
.wfeps-upload-row { margin-bottom: 8px; color:#fff; font-size:13px; }
.wfeps-upload-label { margin-bottom:6px; color:#ddd; }
.wfeps-upload-progress { width: 100%; height: 10px; }

/* Modal */
.wfeps-modal { display:none; position:fixed; inset:0; background: rgba(0,0,0,0.6); z-index:9999; align-items:center; justify-content:center; }
.wfeps-modal-show { display:flex; }
.wfeps-modal-inner { background:#111; padding:22px; border-radius:10px; color:#fff; max-width:420px; width:90%; box-shadow:0 8px 30px rgba(0,0,0,0.6); position:relative; }
.wfeps-modal-close { position:absolute; right:8px; top:8px; background:transparent; border:none; color:#fff; font-size:20px; cursor:pointer; }
.wfeps-modal-content h3 { margin-top:0; }
#wfeps-slots-modal-message { color:#ddd; margin-top:8px; }

/* Attribute blocks */
.wfeps-attribute-block { margin-bottom: 12px; }
.wfeps-attr-term { display: inline-block; margin-right: 8px; color:#fff; }

/* Submit */
.wfeps-submit-button {
    background: #0071a1;
    color: #fff;
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
}

/* Hide inline legacy message */
.wfeps-message { display:none; }

/* Accessibility focus */
.wfeps-featured-upload-btn:focus,
.wfeps-featured-upload-btn:hover {
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6), 0 0 0 3px rgba(0,113,161,0.12);
}

/* Responsive: stack columns on tablet/mobile (image first, then fields) */
@media (max-width: 900px) {
    .wfeps-columns { flex-direction: column; }
    /* image (uploads) first */
    .wfeps-right { order: 0; width: 100%; }
    .wfeps-left  { order: 1; width: 100%; }
    .wfeps-gallery-thumb { width: calc((100% - 36px) / 4); }
}

/* Small screens adjustments */
@media (max-width: 480px) {
    .wfeps-featured-preview img.wfeps-preview-featured-img { max-width: 95%; }
    .wfeps-right { width: 100%; }
}

/* End */