/* EmbossPressGallery – Main Stylesheet v1.0.0 */

/* ── Root ──────────────────────────────────────────────────────────────── */
.epg-widget-wrap {
    position: relative;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Canvas Wrapper ────────────────────────────────────────────────────── */
.epg-canvas-wrap {
    position: relative;
    width: 100%;
    height: 550px;
    max-height: 50vh;
    overflow: hidden;
    background: #1a1510;
    border-radius: 4px;
    cursor: crosshair;
}

.epg-three-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

/* ── HUD ────────────────────────────────────────────────────────────────── */
.epg-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 16px;
}

/* Pressure gauge */
.epg-pressure-gauge {
    position: absolute;
    top: 12px;
    left: 16px;
    width: 110px;
    background: rgba(255,250,235,0.88);
    border: 1px solid #c0a060;
    border-radius: 6px;
    padding: 8px 8px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.epg-gauge-svg { display: block; width: 100%; }
.epg-gauge-arc {
    transition: stroke-dasharray 0.3s ease;
    stroke-linecap: round;
}
.epg-gauge-label {
    font-size: 10px;
    font-weight: 600;
    fill: #3a2a0a;
}
.epg-gauge-title {
    display: block;
    text-align: center;
    font-size: 9px;
    color: #6a5020;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Depth indicator */
.epg-depth-indicator {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255,250,235,0.88);
    border: 1px solid #c0a060;
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    text-align: right;
}
.epg-depth-label {
    display: block;
    font-size: 9px;
    color: #6a5020;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.epg-depth-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #3a2a0a;
    font-variant-numeric: tabular-nums;
}

/* Matrix info bar */
.epg-matrix-info {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,250,235,0.90);
    border: 1px solid #c0a060;
    border-radius: 20px;
    padding: 4px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    white-space: nowrap;
}
.epg-matrix-name  { font-size: 12px; font-weight: 600; color: #3a2a0a; }
.epg-matrix-material { font-size: 10px; color: #6a5020; }

/* ── Help bar ───────────────────────────────────────────────────────────── */
.epg-help-bar {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    background: rgba(20,14,6,0.72);
    border: 1px solid rgba(192,160,96,0.4);
    border-radius: 20px;
    padding: 4px 16px;
    pointer-events: none;
}
.epg-help-bar span {
    font-size: 10px;
    color: rgba(255,240,200,0.85);
    letter-spacing: 0.06em;
}

/* ── Mobile force slider ────────────────────────────────────────────────── */
.epg-mobile-controls {
    display: none;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
    background: rgba(255,250,235,0.90);
    border: 1px solid #c0a060;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    pointer-events: all;
}
.epg-slider-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6a5020;
    margin-bottom: 6px;
}
.epg-force-slider {
    width: 100%;
    accent-color: #8b6914;
    cursor: pointer;
}
@media (max-width: 768px) {
    .epg-mobile-controls { display: block; }
    .epg-help-bar { display: none; }
}

/* ── Batch stack ────────────────────────────────────────────────────────── */
.epg-batch-stack {
    margin-top: 8px;
    padding: 6px 14px;
    background: #f5f0e5;
    border: 1px solid #c0a060;
    border-radius: 4px;
    font-size: 12px;
    color: #5a4020;
    text-align: center;
}
.epg-batch-count {
    font-weight: 700;
    font-size: 16px;
    color: #3a2a0a;
}

/* ── Preview placeholder ────────────────────────────────────────────────── */
.epg-canvas-wrap.epg-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2015;
}
.epg-preview-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #c0a060;
    opacity: 0.7;
}
.epg-preview-label span { font-size: 14px; font-weight: 600; }
.epg-preview-label small { font-size: 11px; opacity: 0.7; }

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.epg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.epg-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(245,240,229,0.94);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.epg-lightbox-inner {
    position: relative;
    z-index: 1;
    width: min(92vw, 840px);
    max-height: 90vh;
    background: #faf7f0;
    border: 1px solid rgba(139,105,20,0.35);
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(139,105,20,0.15),
        0 32px 80px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Shadow-line frame style */
.epg-lightbox-inner.frame-shadow_line {
    box-shadow:
        0 4px 6px -1px rgba(90,64,20,0.12),
        0 12px 32px rgba(90,64,20,0.14),
        0 0 0 1px rgba(139,105,20,0.2),
        inset 3px 3px 6px rgba(255,255,255,0.5),
        inset -3px -3px 6px rgba(139,105,20,0.08);
}
/* Depth-profile frame style */
.epg-lightbox-inner.frame-depth_profile {
    background: linear-gradient(160deg, #faf7f0 0%, #ede8da 100%);
    box-shadow:
        0 0 0 2px rgba(139,105,20,0.3),
        0 24px 64px rgba(0,0,0,0.22),
        inset 0 1px 0 #fff,
        inset 0 -1px 0 rgba(139,105,20,0.1);
}

.epg-lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    background: rgba(245,240,229,0.85);
    border: 1px solid #c0a060;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #5a4020;
    transition: background 0.15s, transform 0.15s;
}
.epg-lightbox-close:hover {
    background: #c0a060;
    color: #fff;
    transform: scale(1.05);
}

.epg-lightbox-canvas-wrap {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 0;
}
.epg-lightbox-canvas {
    flex: 1;
    display: block;
    min-height: 300px;
}

/* Depth panel */
.epg-lightbox-depth-panel {
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: rgba(220,210,185,0.4);
    border-left: 1px solid rgba(139,105,20,0.15);
}
.epg-lb-depth-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6a5020;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    margin-bottom: 8px;
}
.epg-lb-depth-scale {
    flex: 1;
    width: 18px;
    border-radius: 9px;
    background: linear-gradient(to bottom,
        rgba(139,105,20,0.9) 0%,
        rgba(200,180,120,0.6) 50%,
        rgba(245,240,229,0.3) 100%
    );
}

/* Lightbox footer */
.epg-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(139,105,20,0.15);
    background: rgba(220,210,185,0.3);
}
.epg-next-matrix {
    background: #8b6914;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.epg-next-matrix:hover { background: #6a5010; }
.epg-lb-matrix-title {
    font-size: 12px;
    color: #6a5020;
    font-style: italic;
}

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes epg-press-down {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(8px); }
    100% { transform: translateY(0); }
}
.epg-pressing { animation: epg-press-down 0.35s ease-in-out; }

@keyframes epg-crinkle {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.7; }
}
.epg-crinkling { animation: epg-crinkle 0.15s ease; }

/* ── Accessibility ──────────────────────────────────────────────────────── */
.epg-three-canvas:focus-visible {
    outline: 2px solid #8b6914;
    outline-offset: 2px;
}
