/**
 * WPH Helper – Monitor Showcase
 * assets/css/monitor-showcase.css
 */

/* ── Custom Properties (alle überschreibbar per Elementor) ── */
.wph-ms {
    --ms-fg:              #f5f5f7;
    --ms-muted:           #a1a1aa;
    --ms-accent:          #e85d3a;
    --ms-arrow-bg:        rgba(30, 30, 35, 0.85);
    --ms-arrow-border:    rgba(255, 255, 255, 0.18);
    --ms-dot-inactive:    rgba(255, 255, 255, 0.25);
    --ms-chrome-h:        26px;

    position: relative;
    color: var(--ms-fg);
    /* kein background – erbt vom Elternelement */
}

.wph-ms *,
.wph-ms *::before,
.wph-ms *::after { box-sizing: border-box; }

/* ── Container ── */
.wph-ms__container {
    position: relative;
    width: 100%;
}

/* ── Header ── */
.wph-ms__header {
    text-align: center;
    margin-bottom: 48px;
}

.wph-ms__eyebrow-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.wph-ms__line {
    width: 32px; height: 1px;
    background: var(--ms-accent);
    display: inline-block;
    flex-shrink: 0;
}

.wph-ms__eyebrow {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ms-accent);
}

.wph-ms__title {
    font-size: clamp(26px, 3.5vw, 48px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: var(--ms-fg);
}

.wph-ms-accent,
.wph-ms__title .wph-ms-accent { color: var(--ms-accent); }

.wph-ms__subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ms-muted);
    max-width: 520px;
    margin: 0 auto;
}

/* ── Stage ── */
.wph-ms__stage {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    user-select: none;
    /* Kein isolate/stacking context hier – Controls liegen daneben, nicht darunter */
}

/* Monitor-PNG: z-index 3, liegt über den Slides.
   Screen-Bereich ist transparent → Slides scheinen durch. */
.wph-ms__monitor-img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 3;
    pointer-events: none;
}

/* ── Screen (hinter Monitor-PNG) ── */
.wph-ms__screen {
    position: absolute;
    z-index: 1;
    overflow: hidden;
    background: #000;
    border-radius: 2px;
}

/* ── Browser Chrome ── */
.wph-ms__chrome {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: var(--ms-chrome-h);
    background: #1c1c20;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    z-index: 2;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.wph-ms__chrome-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wph-ms__chrome-dot:nth-child(1) { background: #ff5f56; }
.wph-ms__chrome-dot:nth-child(2) { background: #ffbd2e; }
.wph-ms__chrome-dot:nth-child(3) { background: #27c93f; }

.wph-ms__chrome-bar {
    flex: 1;
    height: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    margin-left: 6px;
}

/* ── Track ── */
.wph-ms__track {
    position: absolute;
    inset: 0;
    top: var(--ms-chrome-h);
}

/* ── Slides ── */
.wph-ms__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

.wph-ms__slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.wph-ms__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* ── Slide Hover-Overlay ── */
.wph-ms__slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10,10,14,0.95) 0%,
        rgba(10,10,14,0.3)  50%,
        transparent         100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.wph-ms__slide.is-active:hover .wph-ms__slide-overlay { opacity: 1; }

.wph-ms__slide-cat {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ms-accent);
    margin-bottom: 3px;
}

.wph-ms__slide-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.wph-ms__slide-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 5px;
    width: fit-content;
    transition: border-color 0.2s, background 0.2s;
}

.wph-ms__slide-link:hover {
    border-color: var(--ms-accent);
    background: rgba(232,93,58,0.12);
    color: #ffffff;
}

/* ── Controls: eigener Stacking-Kontext, immer sichtbar ── */
.wph-ms__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    position: relative;
    z-index: 10;   /* sicher über allem */
}

/* Pfeil-Buttons */
.wph-ms__arrow {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--ms-arrow-border);
    background: var(--ms-arrow-bg);
    color: var(--ms-fg);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    flex-shrink: 0;
    /* Schatten damit auf hellem Hintergrund sichtbar */
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.wph-ms__arrow svg {
    width: 18px; height: 18px;
    display: block;
    flex-shrink: 0;
}

.wph-ms__arrow:hover {
    border-color: var(--ms-accent);
    background: var(--ms-accent);
    transform: scale(1.08);
}

.wph-ms__arrow:active { transform: scale(0.94); }

/* Dots */
.wph-ms__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wph-ms__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ms-dot-inactive);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, width 0.3s, border-radius 0.3s;
    /* Schatten für Sichtbarkeit auf hellem bg */
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.wph-ms__dot.is-active {
    background: var(--ms-accent);
    width: 24px;
    border-radius: 4px;
}

/* ── Fortschrittsbalken ── */
.wph-ms__progress {
    width: 100%;
    max-width: 900px;
    margin: 12px auto 0;
    height: 2px;
    background: var(--ms-dot-inactive);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.wph-ms__progress-bar {
    height: 100%;
    width: 0%;
    background: var(--ms-accent);
    transition: width linear;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .wph-ms__stage { max-width: 100%; }
    .wph-ms__slide-overlay { opacity: 1; }
    .wph-ms__slide-link { display: none; }
    .wph-ms__chrome { --ms-chrome-h: 18px; }
    .wph-ms__chrome-dot { width: 6px; height: 6px; }
    .wph-ms__chrome-bar { height: 9px; }
}
