﻿/* ==========================================================================
   1. FONT DECLARATIONS
   ========================================================================== */

@font-face {
    font-family: 'Barlow Condensed';
    src: url('fonts/BarlowCondensed-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow Condensed';
    src: url('fonts/BarlowCondensed-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow Condensed';
    src: url('fonts/BarlowCondensed-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow Condensed';
    src: url('fonts/BarlowCondensed-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. GLOBAL RESETS & DEFAULTS
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+ */
    user-select: none;
    -webkit-user-drag: none; /* Safari */
    -khtml-user-drag: none; /* Konqueror HTML */
    -moz-user-drag: none; /* Firefox */
    -o-user-drag: none; /* Opera */
    user-drag: none;
    -webkit-tap-highlight-color: transparent; /* Removes tap highlight */
}

html, body {
    width: 100%;
}

body {
    min-height: 100dvh; /* Dynamic Viewport Height (preferred) */
    min-height: 100svh; /* Small Viewport Height (fallback) */
    background: #000;
    color: #fff;
    font-family: "Barlow Condensed", system-ui, sans-serif;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   3. MAIN LAYOUT STRUCTURE
   ========================================================================== */

/* Main application wrapper */
.doorsign {
    display: flex;
    flex-direction: column;
    min-height: inherit; /* Ensures it fills the body */
}

/* Container for the primary content columns */
.container {
    display: flex;
    flex: 1; /* Makes the container grow to fill available vertical space */
    flex-direction: row;
}

/* The two main content columns */
#room {
    position: relative;
    flex: 2; /* 2 parts of the available space (40%) */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #1c1c1c;
    font-size: 4em;
    overflow: hidden;
}

.teams {
    position: relative;
    flex: 3; /* 3 parts of the available space (60%) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    background-color: #111;
    overflow: hidden;
}

.additional-info {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    background-color: #181818;
}

/* Bottom branding/clock bar */
/* This rule should now target .news-clock, which is the direct container of the clock and moreinfo */
.news-clock {
    display: flex;
    align-items: center;
    padding: 0 1vw; /* Responsive padding */
    width: 100%;
}

/* This is the root container for the footer, ensure it fills the height */
#room-clock {
    display: flex; /* Make it a flex container to center its child */
    align-items: center;
    background-color: #000;
    height: 7vh;
    width: 100%;
}

/* Make the intermediate div take up the full width */
#copyright {
    width: 100%;
}


/* ==========================================================================
   4. COMPONENT-SPECIFIC STYLES
   ========================================================================== */

/* --- Titles (#room-title, #team-name) --- */
#room-title, #team-name {
    display: none;
    position: absolute;
    top: 0;
    width: calc(100% - 20px);
    padding: 10px;
    max-height: 110px;
    color: #000;
    background-color: #ffea00;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

#team-name {
    background-color: #f2de00;
}

/* --- Main Content (Room Name & Team List) --- */
#room-name {
    line-height: 1;
    font-weight: 700;
    margin-top: 10px;
    color: #1dbfd6;
    background: linear-gradient(to bottom, #0fcde6, #266cad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    text-transform: uppercase;
    padding: 0 20px;
}

#teamList {
    list-style: none;
    max-height: 65svh;
    /* margin: 0 0 30px 0; */
    padding: 10px;
    font-size: 13rem;
    line-height: 0.9;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#teamList ul {
    list-style: none;
    padding: 0px 20px;
}

#teamList ul li {
    border-bottom: 11px dotted #333;
    margin-bottom: 30px;
    padding-bottom: 30px;
    background: linear-gradient(to bottom, #ffffff, #cbcbcb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#teamList ul li:last-child,
#teamList ul li:only-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.noteamsassigned {
    font-weight: 500;
    font-size: 8rem;
    margin: 0;
    padding: 10px;
}

/* --- Bottom Bar Components (#clock, .moreinfo) --- */
/* These rules remain the same, but they will now work correctly because their parent (.news-clock) is a flex container */
#clock {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex: 2 1 30%; /* flex-grow: 2, flex-shrink: 1, flex-basis: 30% */
}

.ampm {
    font-size: 0.75em;
    margin-left: 5px;
    margin-bottom: -7px;
    text-transform: uppercase;
}


.moreinfo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 3 1 auto; /* Grow to fill available space */
    column-gap: 30px;
    overflow: hidden; /* Prevent content overflow */
    white-space: nowrap; /* Keep content on one line */
}

/* Target the <p> tag inside .moreinfo */
.moreinfo p.copyright {
    font-size: clamp(1rem, 2vw, 1.75rem); /* Responsive font size */
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copyright {
    margin: 15px 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.webaddress {
    /*display: block;*/
    font-weight: 400;
    font-size: 1.5rem;
    color: rgba(255,255,255, .85);
    text-transform: lowercase;
}

/* --- Sponsor & Promotions --- */
.sponsor {
    padding: 10px;
    max-width: 40%;
    border-radius: 20px 0 0 0;
    display: flex;
    flex-direction: column;
}

#sponsor-image {
    width: 100%;
    max-width: 250px;
    max-height: 100px;
    object-fit: contain;
}

#sponsor-name {
    font-size: .75rem;
    margin-top: 0px;
    padding-bottom: 5px;
    line-height: 1;
    font-weight: 600;
    color: #c8c8c8;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.promotions img,
.promotions video {
    object-fit: cover;
    aspect-ratio: 1;
}

#interface #promotions {
    background-color: #000 !important;
}

/* ==========================================================================
   5. OVERLAYS & MODALS (Emergency, Popup, Spinner)
   ========================================================================== */

#cover, #emergency, #overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#cover {
    background-color: transparent;
    color: white;
    font-size: 5em;
    z-index: 100;
}

#emergency {
    display: none;
    padding: 30px;
    background-color: #000;
    color: white;
    font-size: 5em;
    line-height: 1;
    z-index: 100;
}

#emergency h1, #emergency h2, #emergency h3, #emergency h4, #emergency h5, #emergency h6, #emergency p {
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}
/* #emergency h1 { font-size: 3em; } */
#emergency h2 { font-size: 3em; }
#emergency h3 { font-size: 2em; }
#emergency h4 { font-size: 1.5em; }
#emergency h5 { font-size: 1.2em; }
#emergency h6 { font-size: 1em; }
#emergency p { font-size: 1.5em; }
#emergency p span { font-weight: bold; font-size: 2em; }
#emergency p span.red { color: red; }
#emergency p span.green { color: green; }
#emergency p span.yellow { color: yellow; }
#emergency p span.blue { color: blue; }
#emergency p span.white { color: white; }
#emergency p span.black { color: black; }
#emergency p span.orange { color: orange; }

#overlay {
    display: none;
    background: rgba(0, 0, 0, .9);
    z-index: 90;
}

#popup {
    position: absolute;
    left: 50%;
    bottom: 30%;
    transform: translateX(-50%) translateY(-30%);
    background: #545454;
    padding: 0.5em 1.5em;
    border-radius: 5px;
    font-size: 2em;
    font-weight: 900;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 91;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid white;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ==========================================================================
   6. UTILITY & STATE CLASSES
   ========================================================================== */

.hidden, .d-none {
    display: none !important;
}

#overlay.active {
    display: flex;
}

#popup.show {
    opacity: 1;
}


/* ==========================================================================
   7. MEDIA QUERIES
   ========================================================================== */

@media (min-width: 640px) {
    .team {
        padding-top: 110px;
    }
}
