/* WooCommerce Product File Upload — Frontend */
/* ✅ Fixed: No z-index, no position:fixed/sticky, no overflow:hidden on body/html
   — যাতে theme-এর sticky header-এ কোনো effect না পড়ে */

.wcpfu-wrapper {
    margin: 0 0 20px;
    position: relative;       /* self-contained, শুধু নিজের children affect করে */
    z-index: auto;            /* কোনো stacking context তৈরি করবে না */
    isolation: auto;          /* নতুন stacking context তৈরি করবে না */
}

/* ── Main box ── */
.wcpfu-box {
    background: #f2f2f2;
    border: 1.5px solid #d8d8d8;
    border-radius: 6px;
    padding: 20px 22px 18px;
    transition: background .18s, border-color .18s;
    position: static;         /* fixed/sticky/absolute নয় */
    z-index: auto;
    isolation: auto;
    transform: none;          /* transform নতুন stacking context বানায় — তাই নেই */
    will-change: auto;        /* will-change:transform ও stacking context বানায় */
    overflow: visible;        /* overflow:hidden থাকলে child stacking context হয় */
}

.wcpfu-box.dragging {
    background: #eef4ff;
    border-color: #3b82f6;
    border-style: dashed;
}

/* ── Header row ── */
.wcpfu-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.wcpfu-box-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.wcpfu-star {
    color: #cc0000;
    font-style: normal;
    font-weight: 900;
    margin-left: 2px;
}

/* ── Formats hint ── */
.wcpfu-formats {
    font-size: 12.5px;
    color: #666;
    margin: 0 0 16px 30px !important;
    padding: 0 !important;
    line-height: 1.5;
}

/* ── Input row ── */
.wcpfu-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* hide native input — position:absolute কিন্তু size 1px তাই layout affect করে না */
.wcpfu-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);  /* accessibility-safe hide */
    z-index: -1;
}

/* CHOOSE FILE button */
.wcpfu-btn-choose {
    display: inline-block;
    padding: 9px 20px;
    background: #ffffff;
    color: #111111 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .6px;
    border: 1.5px solid #444444;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none !important;
    text-transform: uppercase;
    position: static;        /* z-index যাতে inherit না হয় */
    z-index: auto;
}

.wcpfu-btn-choose:hover {
    background: #111111;
    color: #ffffff !important;
    border-color: #111111;
}

/* Selected file name */
.wcpfu-selected-name {
    flex: 1;
    font-size: 13px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.wcpfu-selected-name.has-file {
    color: #1a7a1a;
    font-weight: 500;
}

/* Remove × button */
.wcpfu-btn-remove {
    background: none;
    border: none;
    color: #999;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    transition: background .12s, color .12s;
    position: static;
    z-index: auto;
}

.wcpfu-btn-remove:hover {
    background: #ffe0e0;
    color: #cc0000;
}

/* ── Progress bar ── */
.wcpfu-progress-bar {
    margin-top: 12px;
    height: 3px;
    background: #ddd;
    border-radius: 2px;
    overflow: hidden;
    position: static;
    z-index: auto;
}

.wcpfu-progress-fill {
    height: 100%;
    width: 0;
    background: #cc0000;
    border-radius: 2px;
    transition: width .25s;
}

/* ── Status message ── */
.wcpfu-status {
    margin-top: 8px;
    font-size: 12.5px;
    min-height: 16px;
    line-height: 1.4;
    position: static;
    z-index: auto;
}

.wcpfu-status.ok    { color: #1a7a1a; }
.wcpfu-status.err   { color: #cc0000; }
.wcpfu-status.info  { color: #888;    }

/* ── Order page (customer) ── */
.wcpfu-order-file-info {
    margin: 6px 0 0 !important;
    padding: 5px 10px !important;
    background: #f0f6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 3px;
    font-size: 13px;
    color: #333;
    position: static;
    z-index: auto;
}
