/* Desktop device mockup, see inc/device-mockup.php */

:root {
    --primary-color: #1C1C2D; /* Deep Cosmos */
    --secondary-color: #D4AF37; /* Antique Gold */
    --primary-background: #F1ECE1; /* Time Dust */

    /* iPhone 15 / 16 viewport */
    --screen-width: 393px;
    --screen-height: 852px;
    --status-bar-height: 54px;
    --bezel: 12px;
    --device-radius: 68px;
    --screen-radius: calc(var(--device-radius) - var(--bezel));
    --device-scale: 1; /* set by device-mockup.js to fit the window */

    --status-bar-background: var(--primary-background);
    --status-bar-color: var(--primary-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    overflow: hidden;
    background-color: var(--primary-color);
    background-image:
        radial-gradient(ellipse 60% 50% at 50% 45%, rgba(212, 175, 55, 0.14), transparent 70%),
        radial-gradient(ellipse 90% 70% at 50% 110%, rgba(241, 236, 225, 0.08), transparent 70%);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

.device-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.device {
    position: relative;
    flex: none;
    width: calc(var(--screen-width) + var(--bezel) * 2);
    height: calc(var(--screen-height) + var(--bezel) * 2);
    padding: var(--bezel);
    border-radius: var(--device-radius);
    background: #0b0b0f;
    /* Titanium band, then shadow on the backdrop */
    box-shadow:
        0 0 0 1.5px #3a3a42,
        0 0 0 4px #8d8b87,
        0 0 0 5px #4a4944,
        0 40px 80px -20px rgba(0, 0, 0, 0.6),
        0 20px 40px -10px rgba(0, 0, 0, 0.4);
    transform: scale(var(--device-scale));
    transform-origin: center center;
}

.device__button {
    position: absolute;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #5b5a56, #9c9a95 50%, #5b5a56);
}

.device__button--action { left: -8px; top: 120px; height: 34px; }
.device__button--volume-up { left: -8px; top: 180px; height: 62px; }
.device__button--volume-down { left: -8px; top: 256px; height: 62px; }
.device__button--power { right: -8px; top: 210px; height: 100px; }

.device__screen {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--screen-radius);
    background: var(--primary-background);
    /* Keeps the rounded clip on the iframe in Safari */
    isolation: isolate;
}

.device__status-bar {
    position: relative;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--status-bar-height);
    padding: 4px 26px 0 42px;
    background: var(--status-bar-background);
    color: var(--status-bar-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.device__time {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.device__island {
    position: absolute;
    top: 11px;
    left: 50%;
    width: 124px;
    height: 36px;
    border-radius: 18px;
    background: #000;
    transform: translateX(-50%);
}

.device__indicators {
    display: flex;
    align-items: center;
    gap: 6px;
}

.device__frame {
    display: block;
    flex: 1;
    width: 100%;
    border: 0;
    background: var(--primary-background);
}

.device__home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 134px;
    height: 5px;
    border-radius: 3px;
    background: rgba(28, 28, 45, 0.85);
    box-shadow: 0 0 0 1px rgba(241, 236, 225, 0.35);
    transform: translateX(-50%);
    pointer-events: none;
}

/* Small windows and touch devices that slipped past wp_is_mobile(): show the site full-bleed */
@media (max-width: 599px), (hover: none) and (pointer: coarse) {
    .device {
        width: 100%;
        height: 100%;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        transform: none;
    }

    .device__button,
    .device__status-bar,
    .device__home-indicator {
        display: none;
    }

    .device__screen {
        border-radius: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .device__status-bar {
        transition: none;
    }
}
