/* ==========================================================================
   Screenshots and documentation components (documentation.php, features.php)
   Uses the tokens defined in styles.css; adds nothing to it.
   ========================================================================== */

/* ---- A screenshot in an app-window frame ---------------------------------- */

.shot {
    margin: 28px 0 32px;
}

.shot--dialog {
    /* A dialog is shown at its real size on a desktop, never stretched to the column. */
    max-width: min(100%, var(--shot-max, 100%));
}

.shot--center {
    margin-left: auto;
    margin-right: auto;
}

.app-window,
.shot-crop {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 24px 64px -24px rgba(0, 0, 0, 0.75),
        0 12px 32px -12px rgba(0, 122, 255, 0.18);
    container-type: inline-size;
}

.app-window__bar {
    display: flex;
    align-items: center;
    gap: 9px;
    /* The real title bar is 32 px on a window --lw px wide: scale it with the picture. */
    height: 30px;
    height: clamp(22px, calc(32 / var(--lw, 1200) * 100cqi), 32px);
    padding: 0 0 0 12px;
    background: #202020;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(10px, calc(12 / var(--lw, 1200) * 100cqi), 12.5px);
    color: #e6e6e6;
    user-select: none;
}

.app-window__icon {
    width: clamp(12px, calc(16 / var(--lw, 1200) * 100cqi), 16px);
    height: clamp(12px, calc(16 / var(--lw, 1200) * 100cqi), 16px);
    flex-shrink: 0;
}

.app-window__title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-window__controls {
    display: flex;
    height: 100%;
}

.app-window__controls span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(30px, calc(46 / var(--lw, 1200) * 100cqi), 46px);
    height: 100%;
}

.app-window__controls svg {
    width: 10px;
    height: 10px;
    stroke: #d6d6d6;
    stroke-width: 1;
    fill: none;
}

.shot-media {
    position: relative;
    display: block;
    line-height: 0;
}

.shot-media img {
    display: block;
    width: 100%;
    height: auto;
    background: #1f1f1f;
}

a.shot-media {
    cursor: zoom-in;
}

a.shot-media::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(10, 10, 15, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 18px no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    pointer-events: none;
}

a.shot-media:hover::after,
a.shot-media:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

a.shot-media:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: -2px;
}

.shot figcaption {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-muted);
    text-align: center;
}

.shot--dialog figcaption {
    text-align: left;
}

/* Two pictures side by side (a dialog and what it opens, before and after). */
.shot-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    margin: 28px 0 32px;
}

.shot-pair .shot {
    margin: 0;
}

/* ---- Numbered hotspots on the workspace overview ------------------------- */

.hotspot {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    background: var(--blue-primary);
    color: #fff;
    font: 700 12px/22px 'Inter', -apple-system, sans-serif;
    text-align: center;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.28), 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.hotspot-legend {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 28px;
    margin: 4px 0 28px !important;
    padding: 0 !important;
}

.hotspot-legend li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 !important;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.hotspot-legend li b {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.16);
    border: 1px solid rgba(0, 122, 255, 0.4);
    color: var(--blue-light);
    font-size: 12px;
    line-height: 22px;
    text-align: center;
}

.hotspot-legend li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Small pieces ------------------------------------------------------- */

.new-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.22), rgba(88, 86, 214, 0.22));
    border: 1px solid rgba(90, 200, 250, 0.35);
    color: var(--blue-light);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

h2 .new-pill,
h3 .new-pill {
    margin-left: 10px;
    position: relative;
    top: -2px;
}

.menu-path {
    display: inline;
    font-weight: 600;
    color: var(--text-primary);
    white-space: normal;
}

.menu-path i {
    font-style: normal;
    color: var(--text-muted);
    margin: 0 0.35em;
    font-weight: 400;
}

.callout {
    display: flex;
    gap: 14px;
    margin: 20px 0;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--blue-primary);
    background: rgba(0, 122, 255, 0.07);
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.callout svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke: var(--blue-light);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.callout strong {
    color: var(--text-primary);
}

.callout p {
    margin: 0 !important;
}

.callout--tip {
    border-left-color: var(--green);
    background: rgba(52, 199, 89, 0.07);
}

.callout--tip svg {
    stroke: var(--green);
}

.callout--caution {
    border-left-color: var(--orange);
    background: rgba(255, 149, 0, 0.07);
}

.callout--caution svg {
    stroke: var(--orange);
}

/* ---- Lightbox additions (the base .lightbox styles are in styles.css) ----- */

.lightbox {
    flex-direction: column;
    gap: 14px;
}

.lightbox-img {
    cursor: default;
}

.lightbox-caption {
    max-width: min(900px, 92vw);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.lightbox-caption:empty {
    display: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(0, 122, 255, 0.35);
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

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

@media (max-width: 768px) {
    .shot-pair {
        grid-template-columns: 1fr;
    }

    .hotspot-legend {
        grid-template-columns: 1fr;
    }

    .hotspot {
        width: 18px;
        height: 18px;
        margin: -9px 0 0 -9px;
        font-size: 10px;
        line-height: 18px;
        box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.5);
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        margin-top: -20px;
        font-size: 18px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    a.shot-media::after {
        transition: none;
    }
}

/* The hero's decorative orbs reach about 100 px past the right edge, which let these pages
   scroll sideways on a desktop. Clip them there: the glow beyond the edge was never visible. */
.features-hero {
    overflow-x: clip;
}
