﻿.cover {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    content: "";
    height: 100%;
    position:absolute;
}

.banner-img {
    z-index: -1;
    object-fit: cover;
}

.event-header {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-header {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    right: -10px;
}

#eventHeader {
    position: relative;
    z-index: 1;
    color: red;
    font-family: Nasalization;
    font-size: 3rem;
    text-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
}

.events-page-tabs2 {
    display: flex;
    flex-direction: row;
    gap: 2px;
    padding: 0 10%;
    background: rgba(230, 230, 230, 0.5);
}

.event-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .event-tab a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        text-decoration: none;
        color: inherit;
    }

    /* Hover state */
    .event-tab:hover {
        background: rgba(240, 240, 240, 1);
    }

    /* Active tab */
    .event-tab.active {
        border-bottom: 2px solid darkred;
        background: rgba(255, 255, 255, 0.8);
    }

    /* Optional: remove duplicate span rule (not needed unless used elsewhere) */
    .event-tab span {
        margin-bottom: 0;
    }

.event-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 3rem 10%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #e30613 #f1f1f1;
    justify-content: center;
    gap: 20px;
    justify-items: center;
}

    .events::-webkit-scrollbar {
        height: 8px;
    }

    .events::-webkit-scrollbar-thumb {
        background: #e30613;
        border-radius: 10px;
    }

.event-card {
    width: 100%;
    max-width: 480px;
    flex: 0 0 380px;
    background: #fff;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-snap-align: center;
    max-height: 400px;
    position: relative;
}

.event-image {
    position: relative;
    height: 230px;
    width: 100%;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: center;
}

    .event-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

.event-card:hover .event-image img {
    transform: scale(1.08);
}

.event-content {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    text-align: left;
    height: 170px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    justify-content: space-between;
}

    .event-content h3 {
        margin: 0 0 7px 0;
        font-weight: 700;
        color: #111;
        width: 100%;
        font-size: 20px;
        line-height: 1.15;
        overflow-wrap: break-word;
        flex-shrink: 0;
    }

    .event-content p {
        font-size: 15px;
    }

    .event-content hr {
        margin: 0;
        border-bottom: 1px solid black;
        width:100%;
    }

#eventTitle {
    padding-right: 20px;
}

.event-date {
    color: #555;
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.sign-up, .options {
    margin-top: auto;
    background: #00b300;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 179, 0, 0.25);
    flex-shrink: 0;
}

    .sign-up:hover {
        background: #00cc00;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 179, 0, 0.35);
    }

.sign-up {
    width: 85%;
}
.options {
    display: flex;
    background: purple;
    gap: 5px;
    justify-content: center;
}

.options-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.event-button-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card .server-info-icon {
    position: relative;
    top: -40%;
    right: -90%;
    width: 20px;
    font-size: 20px;
}
    .event-card .server-info-icon:hover {
        cursor: pointer;
    }

.race-options-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(220, 220, 220, 1);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    z-index: 1;
    border-radius: 16px;
}

.dropdown-option {
    min-width: 190px;
}

.dropdown-option a {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 5px;
    text-decoration: none;
    padding: 0 10px;
    border-radius: 5px;
    margin: 3px 0;
}
    .dropdown-option p {
        margin: 0;
        color: red;
    }

    .dropdown-option i {
        color: black;
    }

    .dropdown-option:hover {
        background: rgba(0, 0, 0, 0.15);
        cursor: pointer;
    }

.options-dropdown-wrapper:hover .race-options-dropdown {
    display: flex;
}

@media (max-width: 1150px) {
    .event-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 750px) {
    .event-cards {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1000px) and (max-width: 1150px), (min-width: 500px) and (max-width: 749px) {
    .options-title {
        display: none;
    }

    .event-button-bar {
        flex-direction: row;
    }
}

@media (min-width: 1151px) and (max-width: 1499px), (min-width: 750px) and (max-width: 1000px), (max-width: 500px) {
    .sign-up,
    .options {
        width: 100%;
    }

    .event-card {
        max-height: 450px;
    }

    .event-content {
        height: 190px;
    }
}

@media (min-width: 1500px) {
    .options-title {
        display: none;
    }

    .event-button-bar {
        flex-direction: row;
    }
}

@media (max-width: 1000px) and (min-width: 749px), (max-width: 500px) {
    .event-card {
        max-height: 460px;
    }
}

@media (max-width: 360px) {
    .race-options-dropdown {
        right: -20px;
    }
}


/* Server Info Modal */

/* Modal Styles - Responsive & Readable */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 15px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
    max-width: 1320px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 85%;
    max-height: 750px;
    overflow-y: auto;
}

.modal-header {
    background-color: #252525;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    position: sticky;
    top:0;
    z-index: 1;
}

    .modal-header h4 {
        margin: 0;
        color: #00ccff;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1.35rem;
    }

.close-modal-button {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

    .close-modal-button:hover {
        color: #ff4444;
        background-color: #333;
    }

.modal-body {
    padding: 20px;
}

/* Server Info Header */
.server-info-header {
    background-color: #2a2a2a;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #444;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

    .info-item:last-child {
        margin-bottom: 0;
    }

.password {
    font-family: monospace;
    color: #ffcc00;
    font-weight: 600;
}

.server-link-and-status {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 10px;
}

/* Status line */
.status-line {
    margin: 0;
    color: #bbb;
    font-size: 1rem;
    text-align: center;
}

.weather-element {
    display: flex;
    align-items: center;
}

/* Weather Link */
#weatherSimulationLink {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #00ccff;
    text-decoration: none;
    font-weight: 500;
}

    #weatherSimulationLink:hover {
        color: #66ddff;
        text-decoration: none;
    }

/* Grid */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px 24px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .field label {
        font-size: 0.9rem;
        color: #aaa;
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
    }

    .field p {
        min-height: 47px;
    }

.readonly-field {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
    min-height: 1.2em;
    word-break: break-word;
}

/* Checkbox / Option Grid */
.checkbox-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.option-group {
    display: flex;
    flex-direction: column;
    background-color: #252525;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #333;
}

    .option-item:last-child {
        border-bottom: none;
    }

    .option-item label {
        color: #ccc;
        margin: 0;
    }

/* Responsive adjustments */
@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        border-radius: 10px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .event-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .readonly-field {
        font-size: 1rem;
    }
}

/* Optional: Nice scrollbar for long content */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

/* BoP Table - Dark Racing Theme (matching Server Info Modal) */
#tables-container {
    width: 100%;
    padding: 20px 15px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    margin-bottom: 3rem;
}

    .table thead.table-dark {
        background-color: #252525;
        color: #00ccff;
    }

    .table th {
        padding: 16px 14px;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.95rem;
        letter-spacing: 0.5px;
        border-bottom: 2px solid #00ccff;
    }

    .table td {
        padding: 14px 14px;
        border-bottom: 1px solid #333;
        vertical-align: middle;
        background-color: #252525;
        color: white;
    }

    .table tbody tr {
        transition: background-color 0.2s;
        background-color: #252525;
    }

    .table .fw-bold {
        font-weight: 700;
        color: #ffffff;
    }

/* Ballast coloring */
.text-danger {
    color: #ff5555 !important;
    font-weight: 600;
}

.text-success {
    color: #44ff88 !important;
    font-weight: 600;
}

/* Button */
button[onclick="downloadScreens()"] {
    background-color: #00ccff;
    color: #111;
    border: none;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(0, 204, 255, 0.3);
}

    button[onclick="downloadScreens()"]:hover {
        background-color: #66ddff;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 204, 255, 0.4);
    }

.table-striped.mb-5 {
    margin-bottom: 0 !important;
}

.download-screenshots-div {
    text-align: center;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .table th,
    .table td {
        padding: 12px 10px;
        font-size: 0.95rem;
    }

    button[onclick="downloadScreens()"] {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Optional: Make tables more compact on very large screens */
@media (min-width: 1200px) {
    .table {
        font-size: 1.05rem;
    }
}

.acm-bop-modal-div {
    display: flex;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #ddd;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}