/* Base Element Specifications */
* {
    box-sizing: border-box;
    color: #dbdbdb;
    font-family: "Eurostile", "Microgramma", sans-serif;
}

body {
    background-color: #2e2e2e;
    margin: 0;
    padding: 0;
    overflow: auto;
}

h1 {
    margin-top: 20px;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 10px;
    position: relative;
}

a {
    text-decoration: none;
    padding: 10px;
    margin: 0;
    border-radius: 4px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #222;
}

button {
    display: block;
    width: 80%;
    padding: 10px 14px;
    border: none;
    border-radius: 4px;
    background-color: #444;
    margin: 10% auto 0;
    font-size: 14px;
    cursor: pointer;
}

button:hover {
    background-color: #666;
}

/*// Class Specifications //*/
.iframe-wrapper {
    position: relative;
    display: flex;
    width: 100vw;
    height: 100vh;
    align-items: left;
}

/* Left menu ribbon */
.menu-ribbon {
    position: relative;
    left: 0;
    top: 0;
    width: 15%;
    height: 100%;
    background: rgba(30, 30, 30, 0.9);
    border: 2px solid #333;
    padding: 1%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.menu-ribbon h1 {
    font-size: 50px;
    margin-bottom: 0;
}

.menu-content {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-content a {
    font-size: medium;
}

.menu-content a:hover {
    background-color: #444;
}

.page {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    flex: 1;
    border: none;
    overflow-y: auto;
}

.page h1 {
    text-align: center;
}

.box-grid {
    position: auto;
    width: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 5%;
    margin-inline: 10%;
    margin-block: 2%;
}

/* Individual camera tile */
.camera-box {
    background: #222;
    border: 2px solid #444;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    border-radius: 20px;
    transition: 0.2s;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.camera-box:hover {
    background: #333;
    border-color: #667;
}

/* Login (full-viewport overlay when visible) */
#login-panel {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

#login-panel .login-inner {
    width: 100%;
    max-width: 360px;
    padding: 24px;
}

#login-error {
    color: #e88;
    font-size: 14px;
    margin-top: 8px;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

/*// ^^^ //*/

/* Field Specifications */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(80%) sepia(20%) saturate(200%) hue-rotate(180deg);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/*// ^^^ //*/

/*// ID Specifications //*/
/* Iframe (hidden until camera selected) */
#stream-frame.page {
    background: transparent;
}

#archive-interface {
    padding: 20px;
    max-width: 720px;
    margin: 0 auto;
}

#archive-form {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
}

.archive-section-title {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: normal;
    text-align: center;
    color: #bbb;
}

#archive-search-form {
    width: 100%;
    margin: 0 auto;
}

#archive-search-form button[type="submit"],
#archive-form button[type="submit"] {
    width: 100%;
    max-width: 280px;
    margin: 1rem auto 0;
}

.archive-range-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 520px) {
    .archive-range-grid {
        grid-template-columns: 1fr;
    }
}

.archive-status {
    text-align: center;
    font-size: 14px;
    margin: 0 auto 1rem;
    max-width: 40rem;
}

.archive-status-error {
    color: #e88;
}

.archive-timeline-wrap {
    position: relative;
    margin-top: 1.25rem;
}

.archive-timeline-wrap--scrollable .archive-timeline {
    scrollbar-gutter: stable;
}

.archive-timeline {
    margin-top: 0;
    max-height: min(50vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #444;
    border-radius: 8px;
    background: #141414;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #666 #1a1a1a;
}

.archive-timeline::-webkit-scrollbar {
    width: 10px;
}

.archive-timeline::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 0 8px 8px 0;
    margin: 4px 0;
}

.archive-timeline::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 6px;
    border: 2px solid #1a1a1a;
}

.archive-timeline::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.archive-timeline-hint {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    pointer-events: none;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9a9a9a;
    padding: 8px 10px;
}

.archive-timeline-hint--bottom {
    bottom: 0;
    padding-bottom: 10px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(to top, #141414 55%, rgba(20, 20, 20, 0));
}

.archive-timeline-empty {
    margin: 12px 16px;
    color: #888;
    font-size: 14px;
}

.timeline-day-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 16px 6px;
    margin: 0;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.02em;
    color: #dbdbdb;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

button.timeline-clip-row {
    display: block;
    width: calc(100% - 24px);
    max-width: none;
    margin: 6px 12px;
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    background-color: #2a2a2a;
    border: 1px solid #444;
}

button.timeline-clip-row:hover {
    background-color: #353535;
    border-color: #667;
}

button.timeline-clip-row:focus {
    outline: 2px solid #6aa;
    outline-offset: 2px;
}

#archive-video-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    box-sizing: border-box;
}

.archive-video-toolbar {
    flex-shrink: 0;
    margin-bottom: 12px;
}

button.archive-back-btn {
    display: inline-block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 10px 18px;
}

#archive-video-page video {
    width: 100%;
    max-height: calc(100vh - 120px);
    background: #000;
}

.archive-playback-error {
    color: #e88;
    font-size: 14px;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #2a2020;
    border: 1px solid #633;
    border-radius: 6px;
}

#footage-menu {
    position: relative;
}

/*// ^^^ //*/