/* EVE STEP-2 INTERACTIVE STICKY 2D PREVIEW — V12.5 */

/* Exact V8 sticky behavior. */
.eve-v3-stage-card.eve-2d-sticky-stage{
    overflow:visible!important;
}

[data-v3-page="2"],
[data-v3-page-body="2"]{
    overflow:visible!important;
}

[data-v3-page-body="2"] > .eve-2d-card{
    grid-column:1 / -1!important;
    width:100%!important;
}

.eve-2d-card{
    position:sticky;
    top:74px;
    z-index:12;
    width:100%;
    margin:0 0 22px;
    border:1px solid #e8e1d5;
    border-radius:22px;
    background:#fff;
    box-shadow:0 12px 34px rgba(16,32,51,.10);
    overflow:hidden;
}

.eve-2d-head{
    padding:14px 18px 12px;
    border-bottom:1px solid #eee7dc;
    background:linear-gradient(180deg,#fff,#fdfbf7);
}

.eve-2d-head-copy{
    display:flex;
    align-items:center;
    gap:11px;
}

.eve-2d-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:49px;
    height:25px;
    border-radius:999px;
    background:#102033;
    color:#fff;
    font-size:8px;
    font-weight:800;
    letter-spacing:.6px;
}

.eve-2d-head h3{
    margin:0;
    font-size:16px;
    font-weight:800;
    color:#142639;
}

.eve-2d-head p{
    margin:3px 0 0;
    color:#85898e;
    font-size:9px;
    line-height:1.55;
}

.eve-2d-content{
    display:grid;
    grid-template-columns:minmax(0,1.6fr) minmax(205px,.4fr);
    min-height:285px;
}

.eve-2d-stage{
    position:relative;
    min-height:285px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:25px 35px 34px;
    background:
      radial-gradient(
        circle at 50% 46%,
        rgba(255,255,255,.97),
        rgba(248,245,239,.78) 55%,
        rgba(241,236,227,.84)
      );
}

.eve-2d-empty{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;
    text-align:center;
    color:#7b8084;
}

.eve-2d-empty[hidden],
.eve-2d-preview[hidden]{
    display:none!important;
}

.eve-2d-empty strong{
    color:#243648;
    font-size:14px;
}

.eve-2d-empty span{
    font-size:9px;
}

.eve-2d-preview{
    position:relative;
    width:100%;
    min-height:220px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.eve-2d-product-view{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) 145px;
    gap:22px;
    align-items:center;
}

.eve-2d-album-shell{
    position:relative;
    min-width:330px;
    min-height:230px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.eve-2d-book-wrap{
    min-width:300px;
    min-height:225px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.eve-2d-book{
    position:relative;
    transition:width .30s ease,height .30s ease;
    filter:drop-shadow(0 18px 22px rgba(45,37,28,.17));
}

.eve-2d-cover{
    position:absolute;
    inset:0;
    border-radius:4px;
    background-color:#c8b79d;
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.28),
      inset -5px 0 9px rgba(35,28,20,.08),
      0 2px 4px rgba(28,24,20,.12);
    overflow:hidden;
    transition:background-color .24s ease;
}

/*
 * Actual EVE color image / swatch.
 * We repeat rather than stretch a small swatch over the entire cover.
 */
.eve-2d-color-texture{
    position:absolute;
    inset:0;
    z-index:1;
    background-repeat:repeat;
    background-position:center;
    background-size:105px auto;
    opacity:0;
    transition:opacity .24s ease,background-image .24s ease;
}

.eve-2d-color-texture.has-image{
    opacity:.96;
}

/* Material is independent from color, so both can be seen together. */
.eve-2d-material-overlay{
    position:absolute;
    inset:0;
    z-index:2;
    pointer-events:none;
    opacity:.48;
    mix-blend-mode:soft-light;
}

.eve-2d-cover.material-default .eve-2d-material-overlay{
    background:
      repeating-linear-gradient(
        90deg,
        rgba(255,255,255,.08) 0,
        rgba(255,255,255,.08) 1px,
        rgba(40,30,20,.06) 1px,
        rgba(40,30,20,.06) 2px
      );
}

.eve-2d-cover.material-linen .eve-2d-material-overlay{
    opacity:.60;
    background:
      repeating-linear-gradient(
        0deg,
        rgba(255,255,255,.14) 0,
        rgba(255,255,255,.14) 1px,
        rgba(30,24,18,.08) 1px,
        rgba(30,24,18,.08) 3px
      ),
      repeating-linear-gradient(
        90deg,
        rgba(255,255,255,.10) 0,
        rgba(255,255,255,.10) 1px,
        rgba(30,24,18,.07) 1px,
        rgba(30,24,18,.07) 3px
      );
}

.eve-2d-cover.material-leather .eve-2d-material-overlay{
    opacity:.38;
    background:
      radial-gradient(circle at 20% 30%,rgba(255,255,255,.20) 0 1px,transparent 2px),
      radial-gradient(circle at 72% 63%,rgba(30,20,15,.16) 0 1px,transparent 2px);
    background-size:8px 7px,11px 10px;
}

.eve-2d-cover.material-velvet .eve-2d-material-overlay,
.eve-2d-cover.material-suede .eve-2d-material-overlay{
    opacity:.32;
    background:
      linear-gradient(
        115deg,
        rgba(255,255,255,.26),
        transparent 32%,
        rgba(20,15,12,.12) 58%,
        transparent 82%
      );
}

.eve-2d-cover.material-acrylic .eve-2d-material-overlay{
    opacity:.55;
    mix-blend-mode:screen;
    background:
      linear-gradient(
        120deg,
        rgba(255,255,255,.42),
        rgba(255,255,255,.08) 35%,
        transparent 55%,
        rgba(255,255,255,.20) 78%,
        transparent
      );
}

.eve-2d-cover.material-wood .eve-2d-material-overlay{
    opacity:.42;
    background:
      repeating-linear-gradient(
        3deg,
        rgba(75,48,28,.19) 0,
        rgba(75,48,28,.19) 1px,
        transparent 1px,
        transparent 8px
      );
}

.eve-2d-cover-highlight{
    position:absolute;
    inset:0;
    z-index:3;
    background:
      linear-gradient(
        105deg,
        rgba(255,255,255,.14),
        transparent 24%,
        transparent 78%,
        rgba(25,20,15,.055)
      );
    pointer-events:none;
}

.eve-2d-spine{
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    z-index:4;
    width:4px;
    background:rgba(45,35,25,.11);
}

.eve-2d-title-mark{
    position:absolute;
    left:50%;
    top:50%;
    z-index:5;
    transform:translate(-50%,-50%);
    font-size:12px;
    font-weight:700;
    letter-spacing:4px;
    color:rgba(255,255,255,.44);
    text-shadow:0 1px 2px rgba(0,0,0,.10);
}

/* Selected EVE model image appears next to the live album preview. */
.eve-2d-model-ref{
    align-self:stretch;
    min-height:190px;
    padding:10px;
    border:1px solid rgba(205,192,172,.65);
    border-radius:14px;
    background:rgba(255,255,255,.78);
    display:flex;
    flex-direction:column;
    gap:7px;
}

.eve-2d-model-title{
    font-size:8px;
    font-weight:800;
    color:#69747d;
    text-align:center;
}

.eve-2d-model-image-wrap{
    flex:1 1 auto;
    min-height:135px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border-radius:10px;
    background:#f6f4ef;
}

.eve-2d-model-image-wrap img{
    display:block;
    width:100%;
    height:100%;
    max-height:150px;
    object-fit:contain;
    background:#fff;
}

.eve-2d-model-empty{
    padding:13px;
    color:#a0a3a4;
    font-size:8px;
    text-align:center;
    line-height:1.6;
}

.eve-2d-model-ref > strong{
    display:block;
    font-size:8px;
    color:#233648;
    text-align:center;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.eve-2d-dimension{
    position:absolute;
    z-index:7;
    font-size:8px;
    font-weight:800;
    color:#5b6269;
}

.eve-2d-dimension-width{
    left:50%;
    bottom:0;
    transform:translateX(-50%);
    min-width:120px;
    padding-top:8px;
    text-align:center;
    border-top:1px solid #99a2aa;
}

.eve-2d-dimension-height{
    right:4px;
    top:50%;
    transform:translateY(-50%);
    min-height:108px;
    padding-right:8px;
    display:flex;
    align-items:center;
    border-right:1px solid #99a2aa;
    writing-mode:vertical-rl;
}

.eve-2d-info{
    padding:16px;
    border-inline-start:1px solid #eee7dc;
    background:#fffdfa;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.eve-2d-info-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    min-height:36px;
    border-bottom:1px dashed #eae3d8;
    font-size:8px;
}

.eve-2d-info-row span{
    color:#888b8d;
}

.eve-2d-info-row strong{
    max-width:120px;
    color:#203244;
    font-size:9px;
    text-align:left;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.eve-2d-info-row.is-strong{
    margin:6px 0;
    padding:0 8px;
    border:1px solid #dcc8a8;
    border-radius:10px;
    background:#fff8eb;
}

.eve-2d-info-row.is-strong strong{
    font-size:12px;
    color:#5e4725;
}

/* Preserve full-width Step-2 option cards below the sticky preview. */
[data-v3-page-body="2"] .eve-v3-fields{
    width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:16px!important;
}

@media(max-width:1050px){
    .eve-2d-content{
        grid-template-columns:minmax(0,1fr) 185px;
    }

    .eve-2d-product-view{
        grid-template-columns:minmax(0,1fr) 120px;
        gap:14px;
    }

    .eve-2d-album-shell{
        min-width:280px;
    }

    .eve-2d-book-wrap{
        min-width:255px;
    }
}

@media(max-width:900px){
    .eve-2d-card{
        top:62px;
    }

    .eve-2d-content{
        grid-template-columns:1fr;
    }

    .eve-2d-info{
        display:none;
    }

    .eve-2d-stage{
        min-height:245px;
        padding:20px 24px 29px;
    }

    .eve-2d-product-view{
        grid-template-columns:minmax(0,1fr) 105px;
        gap:10px;
    }

    .eve-2d-album-shell{
        min-width:240px;
        transform:scale(.86);
    }

    .eve-2d-model-ref{
        min-height:155px;
        padding:7px;
    }

    .eve-2d-model-image-wrap{
        min-height:105px;
    }

    .eve-2d-model-image-wrap img{
        max-height:115px;
    }
}

@media(max-width:650px){
    .eve-2d-card{
        top:54px;
        border-radius:16px;
        margin-bottom:14px;
    }

    .eve-2d-head{
        padding:9px 11px 8px;
    }

    .eve-2d-head h3{
        font-size:12px;
    }

    .eve-2d-head p{
        font-size:7px;
    }

    .eve-2d-badge{
        min-width:41px;
        height:21px;
        font-size:6px;
    }

    .eve-2d-stage{
        min-height:200px;
        padding:12px 12px 20px;
    }

    .eve-2d-preview{
        min-height:180px;
    }

    .eve-2d-product-view{
        grid-template-columns:minmax(0,1fr) 86px;
        gap:7px;
    }

    .eve-2d-album-shell{
        min-width:185px;
        min-height:170px;
        transform:scale(.72);
        transform-origin:center;
    }

    .eve-2d-model-ref{
        min-height:135px;
        border-radius:9px;
        padding:5px;
    }

    .eve-2d-model-title,
    .eve-2d-model-ref > strong{
        font-size:6px;
    }

    .eve-2d-model-image-wrap{
        min-height:90px;
    }

    [data-v3-page-body="2"] .eve-v3-fields{
        grid-template-columns:1fr!important;
    }
}


/* ============================================================
   V12.6 — Collected UX fixes
   ============================================================ */

/* ------------------------------------------------------------
   A. PREVIEW: Step 2 -> Step 3 -> Step 4
   ------------------------------------------------------------ */

/* The stage card must not clip position:sticky. */
.eve-v3-stage-card.eve-2d-sticky-stage{
    overflow:visible!important;
}

/* Preview always spans the entire active wizard page. */
[data-v3-page-body="2"] > .eve-2d-card,
[data-v3-page-body="3"] > .eve-2d-card,
[data-v3-page-body="4"] > .eve-2d-card{
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    position:sticky!important;
    top:74px!important;
    z-index:14!important;
    margin:0 0 20px!important;
}

/* All pages that can host the preview must allow sticky overflow. */
[data-v3-page="2"],
[data-v3-page="3"],
[data-v3-page="4"],
[data-v3-page-body="2"],
[data-v3-page-body="3"],
[data-v3-page-body="4"]{
    overflow:visible!important;
}

/*
 * Keep Step 3/4 form content at its original width.
 * The preview is simply the first full-width row.
 */
[data-v3-page-body="3"]{
    width:100%;
}
[data-v3-page-body="4"] > .eve-2d-card{
    display:block!important;
}

/* Slightly more compact in later steps so it doesn't dominate the form. */
.eve-2d-card[data-eve2d-active-step="3"] .eve-2d-content,
.eve-2d-card[data-eve2d-active-step="4"] .eve-2d-content{
    min-height:245px;
}
.eve-2d-card[data-eve2d-active-step="3"] .eve-2d-stage,
.eve-2d-card[data-eve2d-active-step="4"] .eve-2d-stage{
    min-height:245px;
}
.eve-2d-card[data-eve2d-active-step="3"] .eve-2d-book-wrap,
.eve-2d-card[data-eve2d-active-step="4"] .eve-2d-book-wrap{
    min-height:195px;
}

/* ------------------------------------------------------------
   B. NAME-WRITING OPTIONS: show the COMPLETE text
   ------------------------------------------------------------ */

/* Give this decision the whole row instead of half the form. */
#name_seperated{
    grid-column:1 / -1!important;
    width:100%!important;
}

/* Do not put the name-writing options inside a small scrolling box. */
#name_seperated .eve-v3-choice-grid,
#name_seperated .eve-v3-choice-grid.is-compact,
#name_seperated .eve-v3-choice-grid.is-scrollable{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    max-height:none!important;
    overflow:visible!important;
    gap:12px!important;
    padding:0!important;
}

/* Larger cards with room for the full Arabic wording. */
#name_seperated .eve-v3-choice{
    min-height:104px!important;
    height:auto!important;
    padding:14px 14px!important;
    align-items:center!important;
}

/* Never truncate or ellipsize the actual option. */
#name_seperated .eve-v3-choice-copy{
    min-width:0!important;
    overflow:visible!important;
}
#name_seperated .eve-v3-choice-copy strong{
    display:block!important;
    width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.75!important;
    font-size:13px!important;
    font-weight:700!important;
}
#name_seperated .eve-v3-choice-copy small{
    white-space:normal!important;
    line-height:1.5!important;
}

/* ------------------------------------------------------------
   C. MODEL IMAGES: compact gallery instead of a very long page
   ------------------------------------------------------------ */

/* Let model selection use a full-width block; gallery itself stays compact. */
#cart_model{
    grid-column:1 / -1!important;
    width:100%!important;
}

/* The PJAX container must not inherit the old vertical form layout. */
#cart_model #model_form{
    width:100%!important;
    max-width:none!important;
}

/*
 * Yii radioList commonly renders:
 * #cart-model_image > div > label > input + img
 * The selectors below intentionally support both wrapped and direct labels.
 */
#cart-model_image{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:10px!important;
    width:100%!important;
    max-height:300px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:5px!important;
    margin:0 0 12px!important;
    background:#faf9f6!important;
    border:1px solid #eee8df!important;
    border-radius:14px!important;
    scrollbar-width:thin;
}

#cart-model_image > div{
    width:auto!important;
    margin:0!important;
    padding:0!important;
}

#cart-model_image label{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:124px!important;
    margin:0!important;
    padding:7px!important;
    border:1px solid #e5e1db!important;
    border-radius:12px!important;
    background:#fff!important;
    cursor:pointer!important;
    overflow:hidden!important;
    transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}

#cart-model_image label:hover{
    transform:translateY(-1px);
    border-color:#9eb3c6!important;
    box-shadow:0 6px 14px rgba(16,32,51,.07)!important;
}

#cart-model_image label img{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:100px!important;
    max-height:100px!important;
    object-fit:contain!important;
    object-position:center!important;
    border-radius:8px!important;
    background:#f7f6f3!important;
}

/* Put radio control inside the image card rather than 21px below it. */
#cart-model_image input[type="radio"]{
    position:absolute!important;
    top:8px!important;
    right:8px!important;
    left:auto!important;
    bottom:auto!important;
    z-index:3!important;
    width:18px!important;
    height:18px!important;
    margin:0!important;
    accent-color:#17324d;
}

/* Modern Chrome: selected model gets a clear outline. */
#cart-model_image label:has(input[type="radio"]:checked){
    border-color:#315f87!important;
    box-shadow:0 0 0 2px rgba(49,95,135,.12)!important;
    background:#f6faff!important;
}

/* The custom-upload field sits under the gallery, not mixed into it. */
#cart_model .field-cart-album_model{
    margin-top:10px!important;
    padding-top:10px!important;
    border-top:1px dashed #e8e2da!important;
}

/* ------------------------------------------------------------
   Responsive refinements
   ------------------------------------------------------------ */

@media(max-width:1150px){
    #cart-model_image{
        grid-template-columns:repeat(4,minmax(0,1fr))!important;
    }
}

@media(max-width:900px){
    [data-v3-page-body="2"] > .eve-2d-card,
    [data-v3-page-body="3"] > .eve-2d-card,
    [data-v3-page-body="4"] > .eve-2d-card{
        top:60px!important;
    }

    #cart-model_image{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        max-height:280px!important;
    }

    #name_seperated .eve-v3-choice-grid,
    #name_seperated .eve-v3-choice-grid.is-compact,
    #name_seperated .eve-v3-choice-grid.is-scrollable{
        grid-template-columns:1fr!important;
    }
}

@media(max-width:600px){
    [data-v3-page-body="2"] > .eve-2d-card,
    [data-v3-page-body="3"] > .eve-2d-card,
    [data-v3-page-body="4"] > .eve-2d-card{
        top:54px!important;
    }

    #cart-model_image{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:8px!important;
        max-height:245px!important;
    }

    #cart-model_image label{
        height:108px!important;
        padding:5px!important;
    }

    #cart-model_image label img{
        height:86px!important;
        max-height:86px!important;
    }

    #name_seperated .eve-v3-choice{
        min-height:88px!important;
    }
}


/* ============================================================
   V12.7 — Name writing, compact catalogs, dual-color preview
   ============================================================ */

/* ------------------------------------------------------------
   1. "طريقة كتابة الأسماء" = drilling_type_id
   The previous patch mainly targeted name_seperated; this is the
   actual block shown in the user's screenshot.
   ------------------------------------------------------------ */

#drilling_type_id,
#name_seperated{
    grid-column:1 / -1!important;
    width:100%!important;
}

/* Kill the old scrollable-choice behavior completely. */
#drilling_type_id .eve-v3-choice-grid,
#drilling_type_id .eve-v3-choice-grid.is-compact,
#drilling_type_id .eve-v3-choice-grid.is-scrollable,
#name_seperated .eve-v3-choice-grid,
#name_seperated .eve-v3-choice-grid.is-compact,
#name_seperated .eve-v3-choice-grid.is-scrollable{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    max-height:none!important;
    height:auto!important;
    overflow:visible!important;
    gap:12px!important;
    padding:0!important;
}

/* Full sentence cards rather than tall narrow columns. */
#drilling_type_id .eve-v3-choice,
#name_seperated .eve-v3-choice{
    min-height:92px!important;
    height:auto!important;
    padding:13px 14px!important;
    grid-template-columns:30px minmax(0,1fr) 28px!important;
    align-items:center!important;
}

#drilling_type_id .eve-v3-choice-copy,
#name_seperated .eve-v3-choice-copy{
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
}

#drilling_type_id .eve-v3-choice-copy strong,
#name_seperated .eve-v3-choice-copy strong{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-height:1.65!important;
    font-size:13px!important;
    font-weight:700!important;
}

#drilling_type_id .eve-v3-choice-copy small,
#name_seperated .eve-v3-choice-copy small{
    white-space:normal!important;
    overflow:visible!important;
    line-height:1.45!important;
}

/* ------------------------------------------------------------
   2. Compact product color / material / cover catalogs
   ------------------------------------------------------------ */

/* Select-based groups: compact 3/4 column galleries with internal scroll. */
#cart_type_id .eve-v3-choice-grid,
#cover_type .eve-v3-choice-grid,
#cart_type_id2 .eve-v3-choice-grid,
#cover_type2 .eve-v3-choice-grid,
#orher_color .eve-v3-choice-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
    max-height:215px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:4px!important;
    scrollbar-width:thin;
}

#cart_type_id .eve-v3-choice,
#cover_type .eve-v3-choice,
#cart_type_id2 .eve-v3-choice,
#cover_type2 .eve-v3-choice,
#orher_color .eve-v3-choice{
    min-height:70px!important;
    height:auto!important;
    padding:9px 10px!important;
}

/* Actual radio-image color galleries. */
#cart-color_id,
#cart-color_id2{
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    max-height:205px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:5px!important;
    margin:0!important;
    border:1px solid #eee7df!important;
    border-radius:13px!important;
    background:#faf9f7!important;
    scrollbar-width:thin;
}

#cart-color_id > div,
#cart-color_id2 > div{
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
}

#cart-color_id label,
#cart-color_id2 label{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:96px!important;
    margin:0!important;
    padding:6px!important;
    border:1px solid #e6e1db!important;
    border-radius:11px!important;
    background:#fff!important;
    cursor:pointer!important;
    overflow:hidden!important;
}

#cart-color_id label img,
#cart-color_id2 label img{
    display:block!important;
    width:100%!important;
    height:68px!important;
    max-height:68px!important;
    object-fit:cover!important;
    object-position:center!important;
    border-radius:8px!important;
    background:#f2f1ee!important;
}

#cart-color_id input[type="radio"],
#cart-color_id2 input[type="radio"]{
    position:absolute!important;
    top:6px!important;
    right:6px!important;
    z-index:3!important;
    width:16px!important;
    height:16px!important;
    margin:0!important;
    accent-color:#17324d;
}

#cart-color_id label:has(input[type="radio"]:checked),
#cart-color_id2 label:has(input[type="radio"]:checked){
    border-color:#315f87!important;
    box-shadow:0 0 0 2px rgba(49,95,135,.11)!important;
    background:#f6faff!important;
}

/* Keep the whole material/color group from taking a huge page section. */
#color_id,
#color_id2,
#cover_type,
#cover_type2,
#cart_type_id,
#cart_type_id2{
    min-width:0!important;
}

/* ------------------------------------------------------------
   3. Two-color album representation in the CLOSED 2D preview
   ------------------------------------------------------------ */

.eve-2d-book{
    isolation:isolate;
}

/*
 * The outer cover stays truthful: it shows the EXTERNAL color.
 * The internal color appears as a slightly offset layer behind the
 * closed cover, like a visible inner lining / board edge.
 */
.eve-2d-inner-layer{
    position:absolute;
    z-index:0;
    top:7px;
    bottom:7px;
    left:7px;
    right:-10px;
    border-radius:4px;
    background-color:#d7cab8;
    overflow:hidden;
    box-shadow:4px 5px 8px rgba(20,18,15,.12);
    transition:
        background-color .22s ease,
        opacity .22s ease,
        transform .22s ease;
}

.eve-2d-inner-layer[hidden]{
    display:none!important;
}

.eve-2d-cover{
    z-index:2;
}

.eve-2d-inner-texture{
    position:absolute;
    inset:0;
    background-repeat:repeat;
    background-position:center;
    background-size:105px auto;
    opacity:0;
}

.eve-2d-inner-texture.has-image{
    opacity:.96;
}

.eve-2d-inner-material{
    position:absolute;
    inset:0;
    opacity:.42;
    mix-blend-mode:soft-light;
}

/* Same material language as the outer cover. */
.eve-2d-inner-layer.material-linen .eve-2d-inner-material{
    background:
      repeating-linear-gradient(
        0deg,
        rgba(255,255,255,.13) 0,
        rgba(255,255,255,.13) 1px,
        rgba(30,24,18,.08) 1px,
        rgba(30,24,18,.08) 3px
      ),
      repeating-linear-gradient(
        90deg,
        rgba(255,255,255,.10) 0,
        rgba(255,255,255,.10) 1px,
        rgba(30,24,18,.07) 1px,
        rgba(30,24,18,.07) 3px
      );
}

.eve-2d-inner-layer.material-leather .eve-2d-inner-material{
    background:
      radial-gradient(circle at 20% 30%,rgba(255,255,255,.18) 0 1px,transparent 2px),
      radial-gradient(circle at 72% 63%,rgba(30,20,15,.14) 0 1px,transparent 2px);
    background-size:8px 7px,11px 10px;
}

.eve-2d-inner-layer.material-velvet .eve-2d-inner-material,
.eve-2d-inner-layer.material-suede .eve-2d-inner-material{
    background:
      linear-gradient(
        115deg,
        rgba(255,255,255,.25),
        transparent 32%,
        rgba(20,15,12,.12) 58%,
        transparent 82%
      );
}

.eve-2d-inner-layer.material-acrylic .eve-2d-inner-material{
    opacity:.52;
    mix-blend-mode:screen;
    background:
      linear-gradient(
        120deg,
        rgba(255,255,255,.42),
        rgba(255,255,255,.08) 35%,
        transparent 55%,
        rgba(255,255,255,.20) 78%,
        transparent
      );
}

.eve-2d-inner-layer.material-wood .eve-2d-inner-material{
    background:
      repeating-linear-gradient(
        3deg,
        rgba(75,48,28,.18) 0,
        rgba(75,48,28,.18) 1px,
        transparent 1px,
        transparent 8px
      );
}

/* Visually explain the second color without pretending it is the front cover. */
.eve-2d-card.has-inner-color .eve-2d-book:after{
    content:"داخلي";
    position:absolute;
    z-index:5;
    top:50%;
    right:-34px;
    transform:translateY(-50%);
    padding:4px 6px;
    border-radius:999px;
    background:#fff;
    border:1px solid #ded5c8;
    color:#746b60;
    font-size:7px;
    font-weight:700;
    box-shadow:0 4px 10px rgba(16,32,51,.08);
}

/* Internal color rows are subtly highlighted in the specification panel. */
.eve-2d-inner-info{
    background:#f8f5ef;
    padding-inline:7px;
    border-radius:7px;
}

.eve-2d-inner-info[hidden]{
    display:none!important;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media(max-width:1000px){
    #cart-color_id,
    #cart-color_id2{
        grid-template-columns:repeat(5,minmax(0,1fr))!important;
    }
}

@media(max-width:800px){
    #drilling_type_id .eve-v3-choice-grid,
    #drilling_type_id .eve-v3-choice-grid.is-compact,
    #drilling_type_id .eve-v3-choice-grid.is-scrollable,
    #name_seperated .eve-v3-choice-grid,
    #name_seperated .eve-v3-choice-grid.is-compact,
    #name_seperated .eve-v3-choice-grid.is-scrollable{
        grid-template-columns:1fr!important;
    }

    #cart-color_id,
    #cart-color_id2{
        grid-template-columns:repeat(4,minmax(0,1fr))!important;
        max-height:190px!important;
    }

    #cart_type_id .eve-v3-choice-grid,
    #cover_type .eve-v3-choice-grid,
    #cart_type_id2 .eve-v3-choice-grid,
    #cover_type2 .eve-v3-choice-grid,
    #orher_color .eve-v3-choice-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

@media(max-width:550px){
    #cart-color_id,
    #cart-color_id2{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        max-height:175px!important;
    }

    #cart-color_id label,
    #cart-color_id2 label{
        height:84px!important;
        padding:4px!important;
    }

    #cart-color_id label img,
    #cart-color_id2 label img{
        height:57px!important;
        max-height:57px!important;
    }

    #drilling_type_id .eve-v3-choice,
    #name_seperated .eve-v3-choice{
        min-height:84px!important;
    }

    .eve-2d-card.has-inner-color .eve-2d-book:after{
        right:-29px;
        font-size:6px;
    }
}


/* ============================================================
   V12.8 — Restore model gallery / readable materials /
           larger internal-color edge
   ============================================================ */

/* ------------------------------------------------------------
   A. MODEL CATALOG — rebuild a reliable visual gallery
   ------------------------------------------------------------ */

/*
 * Keep original Yii radios in DOM for submission/validation, but hide the
 * legacy visual markup after the V12.8 gallery has been built.
 */
#cart-model_image.eve-model-original-hidden{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
    border:0!important;
    padding:0!important;
    margin:-1px!important;
}

.eve-model-gallery-fixed{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:10px;
    width:100%;
    max-height:310px;
    overflow-y:auto;
    overflow-x:hidden;
    padding:5px;
    border:1px solid #ece6dd;
    border-radius:14px;
    background:#faf9f6;
    scrollbar-width:thin;
}

.eve-model-card-fixed{
    position:relative;
    appearance:none;
    border:1px solid #e3dfd8;
    border-radius:12px;
    background:#fff;
    min-width:0;
    min-height:132px;
    padding:7px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    gap:7px;
    cursor:pointer;
    transition:
      border-color .16s ease,
      box-shadow .16s ease,
      transform .16s ease,
      background .16s ease;
}

.eve-model-card-fixed:hover{
    transform:translateY(-1px);
    border-color:#9eb3c6;
    box-shadow:0 6px 14px rgba(16,32,51,.07);
}

.eve-model-card-fixed.is-selected{
    border-color:#315f87;
    box-shadow:0 0 0 2px rgba(49,95,135,.12);
    background:#f6faff;
}

.eve-model-card-media{
    width:100%;
    height:96px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border-radius:9px;
    background:#f5f4f1;
}

.eve-model-card-media img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
    background:#fff;
}

.eve-model-card-missing{
    padding:8px;
    text-align:center;
    color:#9a9d9f;
    font-size:8px;
    line-height:1.5;
}

.eve-model-card-fixed strong{
    display:block;
    width:100%;
    min-width:0;
    font-size:9px;
    line-height:1.45;
    font-weight:700;
    color:#243648;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
}

.eve-model-card-tick{
    position:absolute;
    top:7px;
    right:7px;
    width:20px;
    height:20px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#17324d;
    color:#fff;
    font-size:9px;
    opacity:0;
    transform:scale(.85);
    transition:opacity .15s ease,transform .15s ease;
}

.eve-model-card-fixed.is-selected .eve-model-card-tick{
    opacity:1;
    transform:scale(1);
}

/* ------------------------------------------------------------
   B. MATERIAL TYPE — wide cards, full names, no cramped scrollbar
   ------------------------------------------------------------ */

/* Primary and internal material groups should prioritize readability. */
#cover_type,
#cover_type2,
#cart_type_id,
#cart_type_id2{
    grid-column:1 / -1!important;
    width:100%!important;
}

#cover_type .eve-v3-choice-grid,
#cover_type .eve-v3-choice-grid.is-compact,
#cover_type .eve-v3-choice-grid.is-scrollable,
#cover_type2 .eve-v3-choice-grid,
#cover_type2 .eve-v3-choice-grid.is-compact,
#cover_type2 .eve-v3-choice-grid.is-scrollable,
#cart_type_id .eve-v3-choice-grid,
#cart_type_id .eve-v3-choice-grid.is-compact,
#cart_type_id .eve-v3-choice-grid.is-scrollable,
#cart_type_id2 .eve-v3-choice-grid,
#cart_type_id2 .eve-v3-choice-grid.is-compact,
#cart_type_id2 .eve-v3-choice-grid.is-scrollable{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:11px!important;
    max-height:none!important;
    height:auto!important;
    overflow:visible!important;
    padding:0!important;
}

#cover_type .eve-v3-choice,
#cover_type2 .eve-v3-choice,
#cart_type_id .eve-v3-choice,
#cart_type_id2 .eve-v3-choice{
    min-height:82px!important;
    height:auto!important;
    padding:11px 13px!important;
    align-items:center!important;
}

#cover_type .eve-v3-choice-copy,
#cover_type2 .eve-v3-choice-copy,
#cart_type_id .eve-v3-choice-copy,
#cart_type_id2 .eve-v3-choice-copy{
    min-width:0!important;
    overflow:visible!important;
}

#cover_type .eve-v3-choice-copy strong,
#cover_type2 .eve-v3-choice-copy strong,
#cart_type_id .eve-v3-choice-copy strong,
#cart_type_id2 .eve-v3-choice-copy strong{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    line-height:1.55!important;
    font-size:12px!important;
}

/* ------------------------------------------------------------
   C. INTERNAL COLOR — same idea, noticeably larger
   ------------------------------------------------------------ */

/*
 * V12.7 exposed ~10px. V12.8 exposes ~24px so a second color is immediately
 * readable while the album still clearly looks CLOSED.
 */
.eve-2d-inner-layer{
    top:10px!important;
    bottom:10px!important;
    left:10px!important;
    right:-24px!important;
    border-radius:5px!important;
    box-shadow:6px 6px 11px rgba(20,18,15,.15)!important;
}

.eve-2d-card.has-inner-color .eve-2d-book:after{
    right:-49px!important;
    padding:5px 8px!important;
    font-size:8px!important;
    font-weight:800!important;
}

@media(max-width:1100px){
    .eve-model-gallery-fixed{
        grid-template-columns:repeat(4,minmax(0,1fr));
    }
}

@media(max-width:850px){
    .eve-model-gallery-fixed{
        grid-template-columns:repeat(3,minmax(0,1fr));
        max-height:285px;
    }

    #cover_type .eve-v3-choice-grid,
    #cover_type2 .eve-v3-choice-grid,
    #cart_type_id .eve-v3-choice-grid,
    #cart_type_id2 .eve-v3-choice-grid{
        grid-template-columns:1fr!important;
    }
}

@media(max-width:560px){
    .eve-model-gallery-fixed{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px;
        max-height:245px;
    }

    .eve-model-card-fixed{
        min-height:112px;
        padding:5px;
    }

    .eve-model-card-media{
        height:80px;
    }

    .eve-2d-inner-layer{
        right:-17px!important;
    }

    .eve-2d-card.has-inner-color .eve-2d-book:after{
        right:-38px!important;
        font-size:6px!important;
        padding:4px 6px!important;
    }
}


/* ============================================================
   V12.9.1 SAFE RECOVERY FEATURES
   Stable V12.8 wizard core + isolated V12.9 enhancements
   ============================================================ */

/* Processing and page-design share one slot AFTER the core has initialized. */
.eve-process-design-stack{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:12px;
    align-self:start;
}

.eve-process-design-stack > #with_process,
.eve-process-design-stack > #with_design{
    width:100%!important;
    margin:0!important;
    grid-column:auto!important;
}

/* Cart/order couple-name identity */
.eve-cart-couple,
.eve-checkout-couple,
.eve-order-couple-name,
.eve-order-heading-couple{
    display:flex;
    align-items:center;
    gap:9px;
    flex-wrap:wrap;
}

.eve-cart-couple{
    margin:7px 0 11px;
    padding:8px 10px;
    border-radius:10px;
    background:#fff8eb;
    border:1px solid #ead8bb;
}

.eve-cart-couple span,
.eve-checkout-couple span,
.eve-order-couple-name span,
.eve-order-heading-couple span{
    font-size:9px;
    color:#8a7c69;
}

.eve-cart-couple strong,
.eve-checkout-couple strong,
.eve-order-couple-name strong,
.eve-order-heading-couple strong{
    color:#193047;
    font-weight:800;
}

.eve-cart-item-actions{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.eve-cart-edit-link{
    color:#315f87!important;
    font-size:10px;
    font-weight:700;
    text-decoration:none!important;
}

.eve-cart-edit-link:hover{
    text-decoration:underline!important;
}

.eve-cart-couples-summary{
    margin:13px 0 16px;
    padding:10px;
    border-radius:12px;
    background:#f8f6f1;
    border:1px solid #ebe4da;
}

.eve-cart-couples-label{
    display:block;
    margin-bottom:7px;
    font-size:9px;
    color:#7c7469;
    font-weight:700;
}

.eve-cart-couples-summary > div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:6px 0;
    border-top:1px dashed #e3ddd3;
}

.eve-cart-couples-summary > div:first-of-type{border-top:0;}

.eve-cart-couples-summary small{
    color:#9b948b;
    font-size:8px;
}

.eve-cart-couples-summary strong{
    color:#24384c;
    font-size:9px;
}

.eve-checkout-couple{
    margin:9px 0 12px;
    padding:8px 10px;
    border-radius:10px;
    background:#fff8eb;
    border:1px solid #ead8bb;
}

.eve-order-couple-name{margin:5px 0 8px;}
.eve-order-couple-name strong{font-size:12px;}
.eve-order-heading-couple{margin:6px 0 4px;}
.eve-order-heading-couple strong{font-size:13px;}

@media(max-width:700px){
    .eve-cart-item-actions{
        width:100%;
        justify-content:flex-end;
    }
    .eve-process-design-stack{gap:9px;}
}


/* ============================================================
   V12.9.2 — Persistent Cart Button + Count
   ============================================================ */

.eve-cart-nav-link{
    position:relative;
}

.eve-cart-nav-link .eve-cart-symbol{
    font-size:15px;
    border:1px solid rgba(255,255,255,.16);
}

.eve-cart-count-badge{
    margin-inline-start:auto;
    min-width:24px;
    height:24px;
    padding:0 6px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.13);
    color:#fff;
    border:1px solid rgba(255,255,255,.12);
    font-size:10px;
    font-weight:800;
    line-height:1;
}

.eve-cart-nav-link.is-active .eve-cart-count-badge{
    background:#fff;
    color:#244261;
}

.eve-topbar-cart{
    min-height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:0 10px;
    border-radius:10px;
    border:1px solid #ded7cd;
    background:#fff;
    color:#34485c!important;
    font-size:10px;
    font-weight:700;
    box-shadow:0 3px 10px rgba(16,32,51,.035);
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}

.eve-topbar-cart:hover{
    border-color:#aebdca;
    box-shadow:0 5px 14px rgba(16,32,51,.07);
}

.eve-topbar-cart.is-active{
    background:#102033;
    border-color:#102033;
    color:#fff!important;
}

.eve-topbar-cart-icon{
    width:20px;
    height:20px;
    border-radius:6px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    background:#eef3f7;
    color:#17324d;
}

.eve-topbar-cart.is-active .eve-topbar-cart-icon{
    background:rgba(255,255,255,.14);
    color:#fff;
}

.eve-topbar-cart strong{
    min-width:21px;
    height:21px;
    padding:0 5px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#c79f57;
    color:#fff;
    font-size:9px;
    font-weight:800;
    line-height:1;
}

/* Mobile/WebView: cart remains visible even though wallet is hidden. */
@media(max-width:680px){
    .eve-topbar-cart{
        min-width:42px;
        height:38px;
        padding:0 7px;
        gap:4px;
    }

    .eve-topbar-cart-label{
        display:none;
    }

    .eve-topbar-cart strong{
        min-width:18px;
        height:18px;
        padding:0 4px;
        font-size:8px;
    }

    .eve-topbar-cart-icon{
        width:19px;
        height:19px;
    }
}


/* ============================================================
   V12.9.3 — Local AutoSave Draft (test phase)
   ============================================================ */

.eve-draft-status{
    margin:12px 0 16px;
    min-height:52px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:9px 12px;
    border:1px solid #e5e0d8;
    border-radius:12px;
    background:#fbfaf7;
    color:#405264;
    transition:background .18s ease,border-color .18s ease;
}

.eve-draft-status-main{
    min-width:0;
    display:flex;
    align-items:center;
    gap:9px;
}

.eve-draft-dot{
    width:9px;
    height:9px;
    flex:0 0 auto;
    border-radius:50%;
    background:#97a2ab;
    box-shadow:0 0 0 4px rgba(151,162,171,.10);
}

.eve-draft-status-main > div{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
}

.eve-draft-status strong{
    font-size:10px;
    color:#263b50;
}

.eve-draft-status small{
    font-size:8px;
    line-height:1.55;
    color:#858b90;
}

.eve-draft-status-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:9px;
    flex:0 0 auto;
}

.eve-draft-status-actions > span{
    font-size:8px;
    color:#8b8f92;
    white-space:nowrap;
}

.eve-draft-status button{
    appearance:none;
    border:0;
    background:transparent;
    color:#806f58;
    font-size:8px;
    font-weight:700;
    padding:6px 7px;
    border-radius:7px;
    cursor:pointer;
}

.eve-draft-status button:hover{
    background:#f0ece5;
}

.eve-draft-status.is-saving{
    background:#f7f9fb;
    border-color:#d8e0e7;
}

.eve-draft-status.is-saving .eve-draft-dot{
    background:#6c89a2;
    animation:eveDraftPulse 1s ease-in-out infinite;
}

.eve-draft-status.is-saved{
    background:#f7fbf8;
    border-color:#d3e5d8;
}

.eve-draft-status.is-saved .eve-draft-dot{
    background:#5c8a68;
    box-shadow:0 0 0 4px rgba(92,138,104,.10);
}

.eve-draft-status.is-restored{
    background:#fff9ee;
    border-color:#eadbbf;
}

.eve-draft-status.is-restored .eve-draft-dot{
    background:#b38a4c;
    box-shadow:0 0 0 4px rgba(179,138,76,.11);
}

.eve-draft-status.is-error{
    background:#fff5f5;
    border-color:#ecd2d2;
}

.eve-draft-status.is-error .eve-draft-dot{
    background:#a85f5f;
}

@keyframes eveDraftPulse{
    0%,100%{transform:scale(1);opacity:.7}
    50%{transform:scale(1.25);opacity:1}
}

@media(max-width:700px){
    .eve-draft-status{
        align-items:flex-start;
        flex-direction:column;
        gap:7px;
        margin:9px 0 12px;
        padding:8px 10px;
    }

    .eve-draft-status-actions{
        width:100%;
        justify-content:space-between;
        padding-inline-start:18px;
    }

    .eve-draft-status small{
        font-size:7px;
    }
}


/* ============================================================
   V12.10 — CUSTOMER UX PACK
   Duplicate / cart readiness / cart visuals / edit price delta
   ============================================================ */

/* ---------- Add-to-cart confirmation actions ---------- */

.eve-cart-added-banner{
    margin:0 0 18px;
    padding:14px 16px;
    border:1px solid #d8e5d9;
    border-radius:14px;
    background:#f7fbf8;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.eve-cart-added-copy{
    display:flex;
    align-items:center;
    gap:11px;
    min-width:0;
}

.eve-cart-added-check{
    width:36px;
    height:36px;
    flex:0 0 auto;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#e3f1e6;
    color:#427a50;
    font-size:17px;
    font-weight:800;
}

.eve-cart-added-copy > div{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.eve-cart-added-copy strong{
    color:#244234;
    font-size:11px;
}

.eve-cart-added-copy small{
    color:#718078;
    font-size:8px;
    line-height:1.55;
}

.eve-cart-added-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
}

.eve-cart-added-actions .eve-primary-button,
.eve-cart-added-actions .eve-secondary-button{
    min-height:38px;
    padding:0 13px;
    white-space:nowrap;
}

/* ---------- Cart completeness ---------- */

.eve-cart-status-stack{
    display:flex;
    align-items:flex-end;
    flex-direction:column;
    gap:6px;
}

.eve-cart-readiness{
    max-width:240px;
    padding:5px 8px;
    border-radius:999px;
    font-size:8px;
    line-height:1.4;
    font-weight:700;
    text-align:center;
}

.eve-cart-readiness.is-ready{
    background:#edf7ef;
    color:#467454;
    border:1px solid #d3e8d7;
}

.eve-cart-readiness.is-warning{
    background:#fff7e9;
    color:#946f34;
    border:1px solid #ecd9b6;
}

/* ---------- Model/material visual identity ---------- */

.eve-cart-media{
    position:relative;
}

.eve-cart-media-label{
    position:absolute;
    z-index:2;
    top:7px;
    right:7px;
    padding:4px 7px;
    border-radius:999px;
    background:rgba(16,32,51,.86);
    color:#fff;
    font-size:7px;
    font-weight:700;
    backdrop-filter:blur(5px);
}

.eve-cart-material-card{
    margin:9px 0 2px;
    max-width:320px;
    display:flex;
    align-items:center;
    gap:9px;
    padding:7px 9px;
    border:1px solid #e9e3da;
    border-radius:10px;
    background:#fbfaf7;
}

.eve-cart-material-swatch{
    width:46px;
    height:46px;
    flex:0 0 46px;
    border-radius:9px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#efede8;
    color:#77828b;
}

.eve-cart-material-swatch img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.eve-cart-material-card > div:last-child{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:1px;
}

.eve-cart-material-card span{
    color:#8c857b;
    font-size:7px;
}

.eve-cart-material-card strong{
    color:#273a4d;
    font-size:9px;
    white-space:normal;
}

.eve-cart-material-card small{
    color:#716d67;
    font-size:8px;
}

/* ---------- Edit Cart price comparison ---------- */

.eve-v3-price-delta:not([hidden]){
    margin-top:9px;
    padding:8px 9px;
    border-radius:9px;
    display:flex!important;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:6px;
    background:#f7f8fa;
    border:1px solid #e1e5e9;
    font-size:7px;
    line-height:1.5;
}

.eve-v3-price-delta span{
    display:inline-flex;
    align-items:center;
    gap:3px;
    color:#6e7780;
}

.eve-v3-price-delta span b{
    color:#455767;
    font-weight:700;
}

.eve-v3-price-delta span strong{
    color:#17324d;
    font-weight:800;
}

.eve-v3-price-delta i{
    font-style:normal;
    color:#a0a7ad;
}

.eve-v3-price-delta em{
    padding:3px 6px;
    border-radius:999px;
    font-style:normal;
    font-weight:800;
}

.eve-v3-price-delta.is-up em{
    background:#fff0ed;
    color:#9b5749;
}

.eve-v3-price-delta.is-down em{
    background:#edf7ef;
    color:#4b7656;
}

/* ---------- Duplicate order ---------- */

.eve-order-card-shell{
    position:relative;
    min-width:0;
}

.eve-order-card-shell .eve-order-card-v2{
    height:100%;
}

.eve-order-duplicate-button{
    position:absolute;
    z-index:4;
    left:18px;
    bottom:12px;
    min-height:29px;
    padding:0 9px;
    border:1px solid #d8dfe5;
    border-radius:8px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    color:#315f87!important;
    font-size:8px;
    font-weight:700;
    text-decoration:none!important;
    box-shadow:0 3px 9px rgba(16,32,51,.05);
}

.eve-order-duplicate-button:hover{
    border-color:#aebdca;
    background:#f7fafc;
}

.eve-order-heading-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

/* My Orders filter/search must also hide shells. */
.eve-order-card-shell[hidden]{
    display:none!important;
}

@media(max-width:800px){
    .eve-cart-added-banner{
        align-items:flex-start;
        flex-direction:column;
    }

    .eve-cart-added-actions{
        width:100%;
    }

    .eve-cart-added-actions a{
        flex:1 1 0;
    }

    .eve-cart-status-stack{
        align-items:flex-start;
    }

    .eve-cart-readiness{
        max-width:100%;
        text-align:right;
    }

    .eve-order-duplicate-button{
        position:static;
        margin:7px 10px 10px;
        width:calc(100% - 20px);
    }

    .eve-order-heading-actions{
        width:100%;
    }
}

@media(max-width:560px){
    .eve-cart-added-actions{
        flex-direction:column;
    }

    .eve-cart-added-actions a{
        width:100%;
    }

    .eve-cart-material-card{
        max-width:none;
        width:100%;
    }
}


/* ============================================================
   V12.10.1 — Clear Draft vs Add-to-Cart CTA
   ============================================================ */

/*
 * The original Yii submit remains in the DOM and is programmatically clicked
 * by the prominent Step-4 CTA, preserving validation and server-side logic.
 */
.eve-v3-real-submit-proxy{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    opacity:0!important;
    pointer-events:none!important;
    margin:-1px!important;
    padding:0!important;
    border:0!important;
}

.eve-final-submit-bar{
    grid-column:1 / -1!important;
    width:100%;
    position:sticky;
    bottom:10px;
    z-index:35;
    margin:18px 0 4px;
    padding:12px 14px;
    border:1px solid #d9dfe5;
    border-radius:14px;
    background:rgba(255,255,255,.97);
    box-shadow:0 12px 30px rgba(16,32,51,.13);
    backdrop-filter:blur(10px);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}

.eve-final-submit-bar[hidden]{
    display:none!important;
}

.eve-final-submit-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}

.eve-final-submit-copy strong{
    color:#17324d;
    font-size:12px;
    font-weight:800;
}

.eve-final-submit-copy small{
    max-width:620px;
    color:#7d858c;
    font-size:8px;
    line-height:1.6;
}

.eve-final-submit-button{
    appearance:none;
    min-width:210px;
    min-height:46px;
    flex:0 0 auto;
    padding:0 18px;
    border:1px solid #17324d;
    border-radius:11px;
    background:#17324d;
    color:#fff;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 7px 16px rgba(23,50,77,.17);
    transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease;
}

.eve-final-submit-button:hover{
    transform:translateY(-1px);
    box-shadow:0 9px 20px rgba(23,50,77,.22);
}

.eve-final-submit-button:disabled,
.eve-final-submit-button.is-loading{
    cursor:wait;
    opacity:.72;
    transform:none;
}

@media(max-width:700px){
    .eve-final-submit-bar{
        bottom:72px;
        flex-direction:column;
        align-items:stretch;
        gap:9px;
        margin-top:12px;
        padding:10px;
    }

    .eve-final-submit-copy small{
        font-size:7px;
    }

    .eve-final-submit-button{
        width:100%;
        min-width:0;
        min-height:48px;
    }
}


/* V12.10.3 — explicit Cart-save server error */
.eve-cart-save-error{
    width:100%;
    flex:1 0 100%;
    margin-top:2px;
    padding:8px 10px;
    border:1px solid #edcece;
    border-radius:9px;
    background:#fff4f4;
    color:#914c4c;
    font-size:8px;
    font-weight:700;
    line-height:1.55;
}



/* ============================================================
   V12.10.4 — cache-proof original Cart submit + diagnostics
   ============================================================ */

.eve-v12104-submit-note{
    margin:12px 0 7px;
    padding:9px 11px;
    border:1px solid #e5dfd6;
    border-radius:10px;
    background:#faf8f4;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.eve-v12104-submit-note strong{
    color:#7a6647;
    font-size:8px;
}

.eve-v12104-submit-note span{
    color:#7f858a;
    font-size:8px;
}

.eve-v12104-cart-submit{
    display:block!important;
    position:relative!important;
    width:100%!important;
    height:auto!important;
    min-height:48px!important;
    clip:auto!important;
    clip-path:none!important;
    opacity:1!important;
    pointer-events:auto!important;
    margin:0!important;
    padding:0 16px!important;
    border:1px solid #17324d!important;
    border-radius:10px!important;
    background:#17324d!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:800!important;
    cursor:pointer!important;
}

.eve-v12104-cart-submit.is-loading,
.eve-v12104-cart-submit:disabled{
    opacity:.68!important;
    cursor:wait!important;
}

.eve-cart-v4-error{
    grid-column:1 / -1!important;
    width:100%;
    margin:10px 0 4px;
    padding:10px 12px;
    border:1px solid #e5bcbc;
    border-radius:10px;
    background:#fff2f2;
    display:flex;
    flex-direction:column;
    gap:4px;
    direction:rtl;
}

.eve-cart-v4-error strong{
    color:#8b3f3f;
    font-size:10px;
    line-height:1.55;
}

.eve-cart-v4-error small{
    color:#986767;
    font-size:8px;
    line-height:1.55;
    direction:ltr;
    text-align:left;
    overflow-wrap:anywhere;
}

@media(max-width:700px){
    .eve-v12104-submit-note{
        flex-direction:column;
        align-items:flex-start;
        gap:3px;
    }
}


/* ============================================================
   V12.10.5 — DUPLICATE ORDER EDIT MODE
   ============================================================ */

.eve-duplicate-edit-banner{
    margin:0 0 14px;
    padding:12px 14px;
    border:1px solid #d8e2ea;
    border-radius:13px;
    background:#f7fafc;
    display:flex;
    align-items:center;
    gap:11px;
}

.eve-duplicate-edit-icon{
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#e6eef5;
    color:#315f87;
    font-size:17px;
    font-weight:800;
}

.eve-duplicate-edit-banner > div:last-child{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}

.eve-duplicate-edit-banner strong{
    color:#213a51;
    font-size:11px;
    font-weight:800;
}

.eve-duplicate-edit-banner span{
    color:#71808d;
    font-size:8px;
    line-height:1.6;
}

.eve-duplicate-progress-hint{
    margin:-3px 0 12px;
    padding:7px 10px;
    border-radius:9px;
    background:#fff8eb;
    border:1px solid #ead9b8;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    text-align:center;
}

.eve-duplicate-progress-hint strong{
    color:#87692e;
    font-size:8px;
}

.eve-duplicate-progress-hint span{
    color:#9b855f;
    font-size:7px;
}

/*
 * In duplicate mode the order already has saved data.
 * All four progress buttons must look and behave as available.
 */
.eve-is-duplicate-edit [data-v3-step-button]{
    pointer-events:auto!important;
    cursor:pointer!important;
    opacity:1!important;
    filter:none!important;
}

.eve-is-duplicate-edit [data-v3-step-button]:not(.is-active){
    color:#54697c!important;
}

.eve-is-duplicate-edit [data-v3-step-button].eve-duplicate-step-open{
    visibility:visible!important;
}

/* Make the direct-edit nature obvious. */
.eve-is-duplicate-edit .eve-v3-progress{
    border-color:#d8e2ea;
}

@media(max-width:700px){
    .eve-duplicate-edit-banner{
        align-items:flex-start;
        padding:10px;
    }

    .eve-duplicate-progress-hint{
        align-items:flex-start;
        flex-direction:column;
        text-align:right;
    }
}


/* ============================================================
   V12.10.6 — EDIT FIELD HYDRATION
   ============================================================ */

.eve-is-cart-edit .eve-v3-field-block{
    transition:opacity .15s ease,transform .15s ease;
}

/*
 * Some legacy blocks carry display:none from _formtest.php.
 * The V12.10.6 hydrator writes inline display:block only for the fields
 * that belong to the copied order. Never force all blocks globally.
 */
.eve-is-cart-edit .eve-v3-fields > .eve-v3-field-block[style*="display: block"]{
    opacity:1;
    visibility:visible;
}

.eve-is-duplicate-edit .eve-v3-choice-grid,
.eve-is-cart-edit .eve-v3-choice-grid{
    pointer-events:auto!important;
}



/* ============================================================
   V12.10.7 — STAGE-GATED MANUAL DRAFT
   ============================================================ */

.eve-stage-gate-error{
    grid-column:1 / -1!important;
    width:100%;
    margin:0 0 12px;
    padding:10px 12px;
    border:1px solid #ebcfad;
    border-radius:10px;
    background:#fff8ed;
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.eve-stage-gate-error strong{
    color:#8a632e;
    font-size:10px;
}

.eve-stage-gate-error span{
    color:#987b55;
    font-size:8px;
}

.eve-manual-draft-bar{
    margin:10px 0 14px;
    padding:9px 11px;
    border:1px solid #e1ddd6;
    border-radius:11px;
    background:#faf9f6;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.eve-manual-draft-bar[hidden]{
    display:none!important;
}

.eve-manual-draft-copy{
    min-width:0;
    display:flex;
    align-items:center;
    gap:9px;
}

.eve-manual-draft-icon{
    width:30px;
    height:30px;
    flex:0 0 30px;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#ece8df;
    color:#6d665d;
    font-size:15px;
}

.eve-manual-draft-copy > div{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.eve-manual-draft-copy strong{
    color:#31465a;
    font-size:9px;
}

.eve-manual-draft-copy small{
    color:#868b8f;
    font-size:7px;
    line-height:1.55;
}

.eve-manual-draft-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
}

.eve-manual-draft-actions > span{
    color:#92969a;
    font-size:7px;
    white-space:nowrap;
}

.eve-manual-draft-actions button{
    min-height:34px;
    padding:0 10px;
    border:1px solid #cfd7de;
    border-radius:8px;
    background:#fff;
    color:#315f87;
    font-size:8px;
    font-weight:800;
    cursor:pointer;
}

.eve-manual-draft-bar.is-dirty{
    border-color:#e5cfaa;
    background:#fffaf1;
}

.eve-manual-draft-bar.is-dirty .eve-manual-draft-actions > span{
    color:#9b7337;
}

.eve-manual-draft-bar.is-saved{
    border-color:#d2e3d6;
    background:#f7fbf8;
}

.eve-manual-draft-bar.is-saved .eve-manual-draft-actions > span{
    color:#4f7659;
}

/* Exit choice modal */
.eve-draft-exit-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.eve-draft-exit-modal[hidden]{
    display:none!important;
}

.eve-draft-exit-backdrop{
    position:absolute;
    inset:0;
    background:rgba(10,23,35,.48);
    backdrop-filter:blur(3px);
}

.eve-draft-exit-dialog{
    position:relative;
    z-index:1;
    width:min(520px,100%);
    padding:20px;
    border-radius:16px;
    background:#fff;
    border:1px solid #e2ddd5;
    box-shadow:0 24px 60px rgba(10,23,35,.22);
    direction:rtl;
}

.eve-draft-exit-kicker{
    color:#c39b55;
    font-size:8px;
    font-weight:800;
    letter-spacing:.12em;
}

.eve-draft-exit-dialog h3{
    margin:7px 0 5px;
    color:#17324d;
    font-size:17px;
}

.eve-draft-exit-dialog p{
    margin:0 0 16px;
    color:#798189;
    font-size:9px;
    line-height:1.65;
}

.eve-draft-exit-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}

.eve-draft-exit-actions button{
    min-height:42px;
    border-radius:9px;
    border:1px solid #d9dfe4;
    background:#fff;
    color:#4e5f70;
    font-size:9px;
    font-weight:700;
    cursor:pointer;
}

.eve-draft-exit-actions button.is-primary{
    border-color:#17324d;
    background:#17324d;
    color:#fff;
}

.eve-draft-exit-actions button.is-quiet{
    grid-column:1 / -1;
    border-color:transparent;
    background:#f6f5f2;
    color:#777b7e;
}

@media(max-width:700px){
    .eve-manual-draft-bar{
        align-items:flex-start;
        flex-direction:column;
    }

    .eve-manual-draft-actions{
        width:100%;
        justify-content:space-between;
    }

    .eve-manual-draft-actions button{
        min-height:40px;
    }

    .eve-draft-exit-actions{
        grid-template-columns:1fr;
    }

    .eve-draft-exit-actions button.is-quiet{
        grid-column:auto;
    }
}


/* ============================================================
   V12.10.8 — DRAFT RESUME + CART VISUAL + DUPLICATE CLARITY
   ============================================================ */

/* Draft CTA should look like an intentional primary secondary-action. */
.eve-manual-draft-bar{
    border:2px solid #caa45f!important;
    background:#fffaf0!important;
    box-shadow:0 8px 20px rgba(110,82,36,.08);
}

.eve-manual-draft-icon{
    background:#f3e4c5!important;
    color:#8a692c!important;
    font-weight:800;
}

.eve-manual-draft-copy strong{
    font-size:10px!important;
    color:#6f5425!important;
}

.eve-manual-draft-actions button[data-eve-save-draft]{
    min-height:42px!important;
    padding:0 14px!important;
    border:1px solid #b38a42!important;
    background:#c89f58!important;
    color:#fff!important;
    font-size:9px!important;
    font-weight:800!important;
    box-shadow:0 5px 12px rgba(179,138,66,.16);
}

.eve-draft-saved-actions{
    width:100%;
    margin-top:8px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
}

.eve-draft-saved-actions button{
    min-height:34px;
    padding:0 10px;
    border-radius:8px;
    border:1px solid #d7d2ca;
    background:#fff;
    color:#526273;
    font-size:8px;
    font-weight:700;
    cursor:pointer;
}

.eve-draft-saved-actions button[data-eve-draft-exit-now]{
    border-color:#17324d;
    background:#17324d;
    color:#fff;
}

/* Resume Draft navigation */
.eve-draft-resume-link{
    border:1px solid rgba(200,159,88,.28);
    background:rgba(200,159,88,.08);
}

.eve-draft-resume-link .eve-draft-nav-icon{
    color:#e5bf7b;
}

.eve-draft-resume-dot{
    margin-inline-start:auto;
    color:#e5bf7b;
    font-size:16px;
    line-height:1;
}

.eve-topbar-draft{
    min-height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:0 10px;
    border-radius:10px;
    border:1px solid #dec99d;
    background:#fff9ec;
    color:#7c612d!important;
    font-size:9px;
    font-weight:800;
}

/* Cart icon should visually read as a cart, not a generic square. */
.eve-cart-symbol,
.eve-topbar-cart-icon{
    font-family:"Segoe UI Emoji","Apple Color Emoji",sans-serif!important;
    font-size:16px!important;
    line-height:1;
}

/* Duplicate action explanation */
.eve-order-duplicate-note{
    display:block;
    margin:5px 18px 12px;
    color:#8b9095;
    font-size:7px;
    line-height:1.5;
}

.eve-order-duplicate-detail-note{
    display:block;
    margin:6px 0 3px;
    color:#7d858d;
    font-size:8px;
    line-height:1.55;
}

@media(max-width:700px){
    .eve-draft-saved-actions{
        align-items:stretch;
        flex-direction:column;
    }

    .eve-draft-saved-actions button{
        width:100%;
        min-height:40px;
    }

    .eve-topbar-draft{
        padding:0 7px;
    }

    .eve-topbar-draft span:last-child{
        display:none;
    }
}


/* ============================================================
   V12.10.9 — DRAFT SAVE CONFIRMATION
   ============================================================ */

.eve-manual-draft-actions button[data-eve-save-draft].is-confirmed{
    border-color:#4f795a!important;
    background:#568562!important;
    color:#fff!important;
    box-shadow:0 5px 14px rgba(86,133,98,.18)!important;
}

.eve-manual-draft-bar.is-saved{
    border-color:#91b49a!important;
    background:#f4faf5!important;
}

.eve-manual-draft-bar.is-saved .eve-manual-draft-icon{
    background:#dcecdf!important;
    color:#4d7758!important;
}

.eve-manual-draft-bar.is-saved .eve-manual-draft-copy strong{
    color:#365d40!important;
}



/* ============================================================
   V12.11 — SERVER-SIDE DRAFTS
   ============================================================ */

.eve-server-draft-banner{
    margin:0 0 14px;
    padding:11px 13px;
    border:1px solid #dbc58e;
    border-radius:12px;
    background:#fff9eb;
    display:flex;
    align-items:center;
    gap:10px;
}

.eve-server-draft-banner-icon{
    width:36px;
    height:36px;
    flex:0 0 36px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f0dfb8;
    color:#795d25;
    font-size:16px;
}

.eve-server-draft-banner > div:last-child{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.eve-server-draft-banner strong{
    color:#634b1f;
    font-size:10px;
}

.eve-server-draft-banner span{
    color:#887451;
    font-size:8px;
}

.eve-server-draft-bar{
    margin:10px 0 14px;
    padding:10px 12px;
    border:2px solid #c79f57;
    border-radius:12px;
    background:#fffaf0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    box-shadow:0 7px 18px rgba(133,96,35,.08);
}

.eve-server-draft-bar[hidden]{display:none!important;}

.eve-server-draft-copy{
    min-width:0;
    display:flex;
    align-items:center;
    gap:9px;
}

.eve-server-draft-icon{
    width:32px;
    height:32px;
    flex:0 0 32px;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f1dfb9;
    color:#765923;
    font-size:15px;
}

.eve-server-draft-copy > div{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.eve-server-draft-copy strong{
    color:#684f20;
    font-size:10px;
}

.eve-server-draft-copy small{
    color:#8b7d64;
    font-size:7px;
    line-height:1.55;
}

.eve-server-draft-actions{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:8px;
}

.eve-server-draft-actions > span{
    color:#907a53;
    font-size:7px;
}

.eve-server-draft-actions button{
    min-height:40px;
    padding:0 13px;
    border:1px solid #ae8440;
    border-radius:8px;
    background:#c79f57;
    color:#fff;
    font-size:9px;
    font-weight:800;
    cursor:pointer;
}

.eve-server-draft-bar.is-saved{
    border-color:#8db397;
    background:#f5faf6;
}

.eve-server-draft-bar.is-saved .eve-server-draft-actions > span{
    color:#4e7658;
}

.eve-server-draft-bar.is-dirty{
    border-color:#d1ad6a;
    background:#fffaf0;
}

.eve-server-draft-after{
    width:100%;
    flex:1 0 100%;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    margin-top:7px;
}

.eve-server-draft-after a,
.eve-server-draft-after button{
    min-height:32px;
    padding:0 9px;
    border-radius:7px;
    font-size:8px;
    font-weight:700;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.eve-server-draft-after a{
    border:1px solid #17324d;
    background:#17324d;
    color:#fff!important;
}

.eve-server-draft-after button{
    border:1px solid #d5d9dd;
    background:#fff;
    color:#566676;
}

.eve-server-draft-error{
    width:100%;
    flex:1 0 100%;
    margin-top:6px;
    padding:8px 10px;
    border:1px solid #e4baba;
    border-radius:8px;
    background:#fff1f1;
    display:flex;
    flex-direction:column;
    gap:3px;
}

.eve-server-draft-error strong{
    color:#8b4545;
    font-size:8px;
}

.eve-server-draft-error small{
    color:#956c6c;
    font-size:7px;
}

/* Dedicated Drafts page */
.eve-drafts-intro{
    align-items:center;
}

.eve-drafts-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}

.eve-draft-card{
    min-width:0;
    padding:16px;
    border:1px solid #e5dfd6;
    border-radius:15px;
    background:#fff;
    box-shadow:0 8px 20px rgba(16,32,51,.045);
}

.eve-draft-card-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}

.eve-draft-id{
    display:block;
    margin-bottom:4px;
    color:#c39b55;
    font-size:8px;
    font-weight:800;
}

.eve-draft-card h2{
    margin:0;
    color:#1f354a;
    font-size:16px;
}

.eve-draft-card-top small{
    color:#8a8f93;
    font-size:8px;
}

.eve-draft-step-badge{
    flex:0 0 auto;
    padding:5px 8px;
    border-radius:999px;
    border:1px solid #dcc79e;
    background:#fff8e9;
    color:#7d622e;
    font-size:8px;
    font-weight:800;
}

.eve-draft-progress-mini{
    margin:14px 0;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:5px;
}

.eve-draft-progress-mini span{
    min-width:0;
    padding:7px 4px;
    border-radius:8px;
    border:1px solid #ece8e1;
    background:#faf9f7;
    text-align:center;
    opacity:.55;
}

.eve-draft-progress-mini span.is-done{
    opacity:1;
    border-color:#d9c28f;
    background:#fff9ec;
}

.eve-draft-progress-mini b{
    display:block;
    color:#34485b;
    font-size:9px;
}

.eve-draft-progress-mini small{
    display:block;
    margin-top:2px;
    color:#858a8e;
    font-size:6px;
}

.eve-draft-card-meta{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
}

.eve-draft-card-meta > div{
    padding:8px;
    border-radius:9px;
    background:#f8f7f4;
    display:flex;
    flex-direction:column;
    gap:2px;
}

.eve-draft-card-meta span{
    color:#99918a;
    font-size:7px;
}

.eve-draft-card-meta strong{
    color:#34485b;
    font-size:8px;
}

.eve-draft-card-actions{
    margin-top:13px;
    display:flex;
    align-items:center;
    gap:8px;
}

.eve-danger-outline-button{
    min-height:38px;
    padding:0 11px;
    border:1px solid #e1b7b7;
    border-radius:8px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    color:#9c5454!important;
    font-size:8px;
    font-weight:700;
}

.eve-drafts-empty{
    min-height:280px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
}

.eve-drafts-empty-icon{
    width:54px;
    height:54px;
    margin-bottom:10px;
    border-radius:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f2e8d3;
    color:#8a692e;
    font-size:25px;
}

.eve-drafts-empty h2{
    margin:0 0 5px;
    color:#273d51;
}

.eve-drafts-empty p{
    max-width:440px;
    margin:0 0 14px;
    color:#858b90;
    font-size:9px;
}

.eve-topbar-draft strong{
    min-width:19px;
    height:19px;
    padding:0 4px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#c79f57;
    color:#fff;
    font-size:8px;
}

.eve-topbar-draft.is-active{
    background:#17324d;
    border-color:#17324d;
    color:#fff!important;
}

.eve-server-draft-exit-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px;
}

.eve-server-draft-exit-modal[hidden]{display:none!important;}

.eve-server-draft-exit-backdrop{
    position:absolute;
    inset:0;
    background:rgba(12,27,40,.48);
    backdrop-filter:blur(3px);
}

.eve-server-draft-exit-dialog{
    position:relative;
    z-index:1;
    width:min(500px,100%);
    padding:19px;
    border-radius:15px;
    background:#fff;
    border:1px solid #e3ddd4;
    box-shadow:0 22px 58px rgba(12,27,40,.2);
    direction:rtl;
}

.eve-server-draft-exit-dialog > span{
    color:#c39b55;
    font-size:8px;
    font-weight:800;
}

.eve-server-draft-exit-dialog h3{
    margin:6px 0 4px;
    color:#17324d;
    font-size:16px;
}

.eve-server-draft-exit-dialog p{
    margin:0 0 14px;
    color:#7d858c;
    font-size:9px;
}

.eve-server-draft-exit-dialog > div:last-child{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}

.eve-server-draft-exit-dialog button{
    min-height:40px;
    border-radius:8px;
    border:1px solid #d8dde1;
    background:#fff;
    color:#526273;
    font-size:8px;
    font-weight:700;
    cursor:pointer;
}

.eve-server-draft-exit-dialog button.is-primary{
    border-color:#17324d;
    background:#17324d;
    color:#fff;
}

.eve-server-draft-exit-dialog button.is-quiet{
    grid-column:1 / -1;
    border-color:transparent;
    background:#f5f4f1;
}

@media(max-width:850px){
    .eve-drafts-grid{
        grid-template-columns:1fr;
    }

    .eve-draft-card-meta{
        grid-template-columns:1fr 1fr;
    }
}

@media(max-width:650px){
    .eve-server-draft-bar{
        align-items:flex-start;
        flex-direction:column;
    }

    .eve-server-draft-actions{
        width:100%;
        justify-content:space-between;
    }

    .eve-server-draft-actions button{
        min-height:44px;
    }

    .eve-draft-card-meta{
        grid-template-columns:1fr;
    }

    .eve-draft-card-actions{
        align-items:stretch;
        flex-direction:column;
    }

    .eve-draft-card-actions a{
        width:100%;
    }

    .eve-server-draft-exit-dialog > div:last-child{
        grid-template-columns:1fr;
    }

    .eve-server-draft-exit-dialog button.is-quiet{
        grid-column:auto;
    }
}
