/* Enwinz Embroidery Live Preview v1.0.2 */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600&display=swap');

/* ── Utility ───────────────────────────── */
.eep-hidden { display: none !important; }

/* ── Gallery overlay ───────────────────── */
.woocommerce-product-gallery { position: relative !important; }

.eep-overlay {
    position: absolute;
    inset: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 99;
}

.eep-preview-text {
    position: absolute;
    pointer-events: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.4;
    white-space: pre-line;
    text-shadow: 0 1px 4px rgba(0,0,0,0.45);
    transform: translateX(-50%);
    transition: color .2s, left .3s, top .3s;
    z-index: 100;
}

.eep-pos-left   { left: 27%; top: 30%; }
.eep-pos-right  { left: 73%; top: 30%; }
.eep-pos-center { left: 50%; top: 37%; }
.eep-pos-sleeve { left: 15%; top: 48%; }

.eep-font-block  { font-family: 'Arial Black', Impact, sans-serif; }
.eep-font-script { font-family: 'Dancing Script', cursive; font-size: 18px; font-weight: 600; }

@keyframes eep-pop {
    0%   { opacity:.4; transform:translateX(-50%) scale(.95); }
    60%  { opacity:1;  transform:translateX(-50%) scale(1.04); }
    100% { opacity:1;  transform:translateX(-50%) scale(1); }
}
.eep-preview-text.eep-pop { animation: eep-pop .3s ease forwards; }

/* ── Wrap ──────────────────────────────── */
.eep-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}
.eep-wrap * { box-sizing: border-box; }

/* ── Toggle switch ─────────────────────── */
.eep-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px; height: 24px;
    background: #ccc;
    border-radius: 12px;
    flex-shrink: 0;
    transition: background .25s;
}
.eep-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: left .25s;
}
.eep-toggle-checkbox:checked ~ .eep-toggle-switch { background: #111; }
.eep-toggle-checkbox:checked ~ .eep-toggle-switch::after { left: 22px; }

/* ── Panel ─────────────────────────────── */
.eep-panel {
    background: #f9f9f9;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 14px;
}
.eep-panel-hidden { display: none !important; }

@keyframes eep-slide {
    from { opacity:0; transform:translateY(-6px); }
    to   { opacity:1; transform:translateY(0); }
}
.eep-panel:not(.eep-panel-hidden) { animation: eep-slide .2s ease; }

/* ── Live badge ────────────────────────── */
.eep-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 16px;
}
.eep-live-dot {
    width: 7px; height: 7px;
    background: #4caf50;
    border-radius: 50%;
    animation: eep-blink 1.4s ease-in-out infinite;
}
@keyframes eep-blink {
    0%,100% { opacity:1; }
    50%     { opacity:.2; }
}

/* ── Fields ────────────────────────────── */
.eep-field { margin-bottom: 16px; }

.eep-field-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #222;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.eep-char-count { font-weight: 400; color: #999; letter-spacing:0; text-transform:none; font-size:11px; }
.eep-optional   { font-weight: 400; color: #aaa; letter-spacing:0; text-transform:none; font-size:11px; }
.eep-sel-label  { font-weight: 400; color: #666; letter-spacing:0; text-transform:none; font-size:11px; }

/* ── Input ─────────────────────────────── */
.eep-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 14px;
    color: #111;
    background: #fff;
    outline: none;
    transition: border-color .2s;
    display: block;
}
.eep-input:focus { border-color: #111; }

/* ── Button group ──────────────────────── */
.eep-btn-group { display: flex; flex-wrap: wrap; gap: 7px; }

.eep-btn {
    padding: 8px 16px;
    border: 1.5px solid #ccc;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all .15s;
    line-height: 1.2;
}
.eep-btn:hover { border-color: #888; background: #f0f0f0; }
.eep-btn.eep-btn-on { background: #111; border-color: #111; color: #fff; }
.eep-btn-script { font-family: 'Dancing Script', cursive; font-size: 16px; }

/* ── Swatches ──────────────────────────── */
.eep-swatches { display: flex; flex-wrap: wrap; gap: 9px; }

.eep-swatch {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(0,0,0,.18);
    transition: transform .15s, box-shadow .15s;
    padding: 0;
}
.eep-swatch:hover { transform: scale(1.12); }
.eep-swatch.eep-sw-on { box-shadow: 0 0 0 3px #111; transform: scale(1.1); }
.eep-swatch[data-value="White"]        { box-shadow: 0 0 0 1px #bbb; }
.eep-swatch[data-value="White"].eep-sw-on { box-shadow: 0 0 0 3px #333; }

.eep-chk {
    font-size: 13px; font-weight: 900;
    color: #fff; display: none;
    text-shadow: 0 1px 2px rgba(0,0,0,.5); line-height:1;
}
.eep-swatch[data-value="White"] .eep-chk { color: #333; text-shadow: none; }
.eep-swatch.eep-sw-on .eep-chk { display: block; }

/* ── Reset ─────────────────────────────── */
.eep-reset-btn {
    margin-top: 6px;
    padding: 9px 22px;
    border: 1.5px solid #ccc;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all .15s;
}
.eep-reset-btn:hover { border-color: #888; color: #111; }

/* ── Mobile ─────────────────────────────── */
@media (max-width: 600px) {
    .eep-panel { padding: 14px; }
    .eep-preview-text { font-size: 10px; }
    .eep-font-script  { font-size: 14px; }
    .eep-btn { padding: 7px 11px; font-size: 12px; }
}
