/* ofotfjorden.no — ultra-minimal dark theme.
   The media fills the viewport; controls float in the corners and fade out
   when the pointer is idle. */

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

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: #000;
    color: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

/* When idle, hide the cursor and let controls fade (class toggled by ui.js). */
body.is-idle {
    cursor: none;
}

/* --- Stage / media --------------------------------------------------- */

.stage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.media {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-image,
.media-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* The live figure is clickable to enter fullscreen. */
.media[data-fullscreen-toggle] {
    cursor: pointer;
}

.stage:fullscreen,
.stage:-webkit-full-screen {
    background: #000;
}

/* --- EXIF / camera-info overlay -------------------------------------- */

.exif {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem 0.9rem calc(0.5rem + env(safe-area-inset-bottom));
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    white-space: pre-wrap;
    transition: opacity 0.4s ease;
}

/* --- Corner controls ------------------------------------------------- */

.ui {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem calc(0.6rem + 0.4rem);
    padding-top: calc(0.6rem + env(safe-area-inset-top));
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
    transition: opacity 0.4s ease;
}

/* Fade controls + overlay out when idle, but keep them interactive on hover. */
body.is-idle .ui,
body.is-idle .exif {
    opacity: 0;
}

.ui:hover {
    opacity: 1;
}

.ui-nav,
.ui-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ui a,
.ui button {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ui a:hover,
.ui button:hover,
.ui a:focus-visible,
.ui button:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.ui a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
}

.ui-lang {
    font-variant: small-caps;
    font-weight: 600;
}

.ui-fs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
}

/* Hide the standalone fullscreen button once actually in fullscreen. */
:fullscreen .ui-fs,
:-webkit-full-screen .ui-fs {
    display: none;
}
