﻿
/* ============================
   BACKGROUND AND FONT SETTINGS
   ============================ */

html {
    font-size: clamp(10px, 0.8vw, 14px);
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    /*margin-bottom: 60px;*/
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('/images/Crossfit Wallpaper Image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.logo {
    width: 100px;
    height: auto;
}

.admin-hidden {
    display: none !important;
}

select option.admin-hidden {
    display: none !important;
}

.updated {
    animation: flash 0.8s ease-out;
}

@keyframes flash {
    0% {
        background-color: rgba(255, 255, 0, 0.6);
    }

    100% {
        background-color: transparent;
    }
}

@media (max-width: 600px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/**MULTI SELECT**/
/* Container */
.multi-select {
    position: relative;
    width: 100%;
    font-size: 14px;
}

/* Trigger (closed dropdown look) */
.multi-select-trigger {
    padding: 10px 12px;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, background 0.2s;
}

    .multi-select-trigger:hover {
        border-color: #888;
        background: #252525;
    }

/* Dropdown panel */
.multi-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #1b1b1b;
    border: 1px solid #444;
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    animation: fadeIn 0.15s ease-out;
}

/* Open state */
.multi-select.open .multi-select-options {
    display: block;
}

/* Option rows */
.multi-select-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #e0e0e0;
    cursor: pointer;
    transition: background 0.15s;
}

    .multi-select-options label:hover {
        background: #2a2a2a;
    }

/* Checkbox styling */
.multi-select-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00c3ff; /* matches your bright blue buttons */
}

/* Scrollbar styling */
.multi-select-options::-webkit-scrollbar {
    width: 8px;
}

.multi-select-options::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

    .multi-select-options::-webkit-scrollbar-thumb:hover {
        background: #666;
    }

/* Smooth fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Remove floating label entirely */
.text-input label {
    display: none;
}

.text-input {
    margin-top: 40px;
}

input::placeholder {
    color: #bbbbbb;
    opacity: 1;
}



/* ============================
   WEEK SELECTOR DROP DOWN
   ============================ */

.week-selector {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

    .week-selector select {
        background-color: #1e1e1e;
        color: #ffffff;
        border: 1px solid #444;
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 0.95rem;
        cursor: pointer;
    }

    .week-selector label {
        color: #fff;
        font-weight: bold;
        margin-right: 10px;
    }

#weekSelect {
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    transition: 0.2s ease;
}

    #weekSelect:hover {
        border-color: #28a2a2;
    }

    #weekSelect:focus {
        border-color: #28a2a2;
        box-shadow: 0 0 6px rgba(0, 188, 212, 0.5);
    }

label[for="weekSelect"] {
    margin-top: 10px;
}


.week-selector-container {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

    .week-selector-container label {
        color: #fff;
        font-weight: bold;
        margin-right: 10px;
    }





/* ============================
   ALERT AND CONFIRM MODALS
   ============================ */

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.confirm-overlay.hidden {
    display: none;
}

.confirm-box {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    width: 90%; /* was 280px */
    max-width: 360px; /* keeps it tidy on desktop */
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid #444;
    box-sizing: border-box; /* prevents overflow */
}

.confirm-box p {
    margin-bottom: 20px;
    color: #fff;
    font-size: 16px;
}

.confirm-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.confirm-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

#confirm-cancel {
    background: #555;
    color: #fff;
}

#confirm-ok {
    background: #c0392b;
    color: #fff;
}

@media (max-width: 420px) {
    .confirm-box {
        padding: 16px;
    }

        .confirm-box p {
            font-size: 15px;
            margin-bottom: 16px;
        }

    .confirm-buttons button {
        padding: 9px;
        font-size: 14px;
    }
}





/* ============================
   EFFECTS
   ============================ */

@keyframes updatePulse {
    0% {
        background-color: rgba(255, 255, 0, 0.35);
    }

    50% {
        background-color: rgba(255, 255, 0, 0.15);
    }

    100% {
        background-color: transparent;
    }
}



/* ============================
   SEARCH FILTER
   ============================ */
.filter-input {
    width: 25%;
    height: 45px;
    padding: 10px 15px;
    margin: 20px auto;
    display: block;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .filter-input:focus {
        border-color: #28a2a2;
        box-shadow: 0 0 10px rgba(40, 162, 162, 0.3);
        transform: translateY(-2px);
    }



/* ============================
   SUBMIT BUTTON
   ============================ */
.submit-btn {
    margin-top: 10px;
    padding: 14px 30px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #28a2a2, #1a7b7b);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(40, 162, 162, 0.2);
    transition: all 0.3s ease;
    width: 25%;
    outline: none;
}

    .submit-btn:hover {
        background: linear-gradient(135deg, #249393, #166a6a);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(40, 162, 162, 0.3);
    }

    .submit-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(40, 162, 162, 0.2);
    }

.submit-form {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    text-align: center;
}

@media (max-width: 768px) {
    .filter-input,
    .submit-btn {
        width: 90%;
        font-size: 1.1rem;
        padding: 14px 20px;
        border-radius: 8px;
    }
}


/* ============================
   DELETE BUTTON
   ============================ */
.delete-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
    float: right;
}

    .delete-btn:hover {
        color: #ff6b6b;
        background: rgba(255, 0, 0, 0.1);
    }

.delete-score-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: transparent;
    color: #888;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

    .delete-score-btn:hover {
        color: #ff6b6b;
        background: rgba(255, 0, 0, 0.1);
    }



/* ============================
   Dropdown
   ============================ */
.drop-down {
    position: relative;
    margin-top: 0;
}

    .drop-down select,
    .text-input input[type="text"],
    .division-dropdown,
    .score-input {
        width: 25%;
        height: 54px;
        padding: 15px 20px;
        box-sizing: border-box;
        border: 1px solid #444;
        border-radius: 8px;
        outline: none;
        background: #2a2a2a;
        color: #ffffff;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

        .drop-down select:focus,
        .text-input input[type="text"]:focus,
        .division-dropdown:focus,
        .score-input:focus {
            border-color: #28a2a2;
            box-shadow: 0 0 10px rgba(40, 162, 162, 0.3);
            transform: translateY(-2px);
        }







/* ============================
   ADD ATHLETE / ADD TEAM
   ============================ */

.addathlete-container,
.addteam-container {
    max-width: 420px; /* was width: 420px */
    width: 100%;
    margin: 40px auto;
    padding: 30px;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    text-align: center;
    box-sizing: border-box;
}

.addathlete-title,
.addteam-title {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
}

.addathlete-label,
.addteam-label {
    display: block;
    text-align: left;
    margin-top: 18px;
    margin-bottom: 6px;
    color: #cccccc;
    font-size: 0.95rem;
}

.addathlete-form,
.addteam-form {
    width: 100%;
}

.addathlete-textinput input,
.addteam-textinput input {
    width: 100%;
    height: 50px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

    .addathlete-textinput input:focus,
    .addteam-textinput input:focus {
        border-color: #28a2a2;
        box-shadow: 0 0 10px rgba(40, 162, 162, 0.3);
        transform: translateY(-2px);
    }

.addathlete-dropdown select {
    width: 100%;
    height: 50px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

    .addathlete-dropdown select:focus {
        border-color: #28a2a2;
        box-shadow: 0 0 10px rgba(40, 162, 162, 0.3);
        transform: translateY(-2px);
    }

.addathlete-submitbtn,
.addteam-submitbtn {
    margin-top: 25px;
    width: 100%;
    height: 50px;
    background: #28a2a2;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .addathlete-submitbtn:hover,
    .addteam-submitbtn:hover {
        background: #1f7f7f;
        transform: translateY(-2px);
    }

    .addathlete-submitbtn:active,
    .addteam-submitbtn:active {
        transform: translateY(0);
    }

@media (max-width: 500px) {
    .addathlete-container,
    .addteam-container {
        margin: 20px auto;
        padding: 20px;
    }

    .addathlete-title,
    .addteam-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .addathlete-label,
    .addteam-label {
        font-size: 0.9rem;
        margin-top: 14px;
    }

    .addathlete-submitbtn,
    .addteam-submitbtn {
        height: 48px;
        font-size: 1rem;
    }
}