/**
 * World Water Skiers Scoreboard V2 - Stylesheet
 * Copyright (c) 2026 World Water Skiers - All Rights Reserved
 * PROPRIETARY AND CONFIDENTIAL - Unauthorized use prohibited
 */

/* ===== SCOREBOARD V2 STYLES ===== */

body {
    background: #f8f9fa;
    color: #495057;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Current Skier Output Styles */
#currentSkierOutput {
    background-size: 175px;
    background-repeat: no-repeat;
    background-position: left top;
}

#currentSkierOutput::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 175px;
    height: 100%;
    background: linear-gradient(283deg, rgb(60 79 102), rgb(60 79 102 / 60%));
    z-index: 0;
}

#currentSkierOutput > .row {
    position: relative;
    z-index: 1;
}

/* Pulse animation for connection indicator */
@keyframes pulse {
    0%, 100% { background-color: #2ba805; }
    50% { background-color: #49e819; }
}

.pulse {
    animation: pulse 1300ms infinite;
}

/* EyeTrick active pass indicator */
.active-pass {
    position: relative;
}

.active-pass::after {
    content: "LIVE";
    color: #fff;
    background-color: #38a616;
    margin-left: 8px;
    margin-top: -3px;
    padding: 1px 6px 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    animation: pulse 1300ms infinite;
}

/* Profile Modal Styles */
.profileModal .profile img.headshots {
    margin-top: -30px;
    width: 120px !important;
    height: 120px !important;
    display: block !important;
    background: rgb(238, 238, 238);
    border-radius: 50%;
    border-width: 5px;
    border-style: solid;
    border-color: white;
    border-image: initial;
}

.profileModal .name {
    margin-top: 10px;
    font-size: 30px !important;
    display: block !important;
}

.profileModal .modal-content {
    border-width: initial;
    border-style: none;
    border-color: initial;
    border-image: initial;
}

/* CSS Variables */
:root {
    /* Colors */
    --bs-primary: #00a0df;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;

    /* Primary RGB */
    --bs-primary-rgb: 0, 160, 233;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success-rgb: 25, 135, 84;
    --bs-danger-rgb: 220, 53, 69;
    --bs-warning-rgb: 255, 193, 7;

    /* Background Colors */
    --bs-body-bg: #FFF;
    --bs-body-color: #333;

    /* Spacing */
    --bs-spacer: 1rem;
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;

    /* Typography */
    --bs-font-sans-serif: "Arial", sans-serif;
    --bs-font-monospace: "Courier New", monospace;
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.5;
    --bs-body-font-weight: 400;
    --bs-link-color: #00a0df;
    --bs-link-hover-color: #0056b3;

    /* Borders & Shadows */
    --bs-border-width: 1px;
    --bs-border-radius: 10px;
    --bs-border-radius-sm: 5px;
    --bs-border-radius-lg: 15px;
    --bs-border-radius-xl: 30px;
    --bs-border-color: #dee2e6;
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);

    /* Buttons */
    --bs-btn-padding-x: 0.75rem;
    --bs-btn-padding-y: 0.375rem;
    --bs-btn-font-size: 1rem;
    --bs-btn-border-radius: 0.25rem;

    /* Primary Button */
    --bs-btn-bg: #00a0df;
    --bs-btn-border-color: #00a0df;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-bg: #00a0df;
    --bs-btn-hover-border-color: #00a0df;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: #00a0df;
    --bs-btn-active-border-color: #00a0df;
    --bs-btn-active-color: #ffffff;

    /* Link Buttons */
    --bs-btn-link-color: #00a0df;
    --bs-btn-link-hover-color: #00a0df;
    --bs-btn-link-active-color: #00a0df;
    --bs-btn-link-disabled-color: #00a0df;

    /* Nav Links */
    --bs-nav-link-color: #00a0df;

    /* Nav Pills */
    --bs-nav-pills-link-active-bg: #00a0df;
}

/* Button Overrides */
.btn-primary {
    --bs-btn-bg: #00a0df;
    --bs-btn-border-color: #00a0df;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-bg: #00a0df;
    --bs-btn-hover-border-color: #00a0df;
    --bs-btn-hover-color: #ffffff;
}

.btn-outline-primary {
    --bs-btn-color: #00a0df;
    --bs-btn-border-color: #00a0df;
    --bs-btn-hover-bg: #00a0df;
    --bs-btn-hover-color: #ffffff;
}

/* Nav Pills Override */
.nav-pills {
    --bs-nav-pills-link-active-bg: #00a0df;
    --bs-nav-pills-link-active-color: #ffffff;
}

/* Nav Link Hover */
.nav-link {
    --bs-nav-link-hover-color: #00a0df;
}

/* Settings Modal - Slide from Bottom */
.modal-dialog-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    max-width: 100%;
}

.modal-dialog-bottom .modal-content {
    border-radius: 20px 20px 0 0;
    border: none;
}

#settingsModal.fade .modal-dialog-bottom {
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

#settingsModal.show .modal-dialog-bottom {
    transform: translateY(0);
}

/* Responsive Design */
/* Default: Show full first and last name, hide abbreviated */
.athlete-firstname-full {
    display: inline;
}

.athlete-firstname-abbr {
    display: none;
}

.athlete-lastname-full {
    display: inline;
}

.athlete-lastname-abbr {
    display: none;
}

#dataOutput {
    margin-top: 175px !important;
}

/* Adjust for Jump */
body.discipline-jump #dataOutput {
    margin-top: 208px !important;
}

/* Adjust for Tricks */
body.discipline-trick #dataOutput {
    margin-top: 208px !important;
}

body.discipline-trick #currentSkierOutput,
body.discipline-jump #currentSkierOutput {
	height: 150px;
}

img#currentSkierHeadshot {
    width: 100px;
    height: 100px;
}



#profileButton {
   top: 75px;
   right: 10px;
}


@media (max-width: 768px) {
    #dataOutput {
        margin-top: 160px !important;
    }

    img#currentSkierHeadshot {
        width: 50px;
        height: 50px;
    }

	#currentSkierName {
		font-size: 22px;
	}


    #currentSkierOutput {
	    background-size: 150px;
	}

	#currentSkierOutput::before {
	    width: 150px;
	}

	#profileButton {
		top: 44px !important;
		right: -7px;
    }

/*
    .fixed-top {
        position: relative !important;
    }
*/

    #currentSkierOutputString {
        font-size: 0.9rem;
    }

    .altScore .col {
        font-size: 0.85rem;
    }

    /* Show/hide first name versions based on screen size */
    .athlete-firstname-full {
        display: none;
    }

    .athlete-firstname-abbr {
        display: inline;
    }

    /* Show/hide last name versions based on screen size */
    .athlete-lastname-full {
        display: none;
    }

    .athlete-lastname-abbr {
        display: inline;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Current Skier Highlight in Leaderboard */
.athlete-row.current-skier {
    font-weight: bold;
    color: #00A0DC;
}


/* Welcome Screen Styles */
#message:has(#welcomeScreen) {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;

}

#welcomeScreen h2 {
    font-weight: 600;
}

#welcomeScreen .dots-spinner {
    justify-content: center;
}

/* Three Dots Spinner */
.dots-spinner {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
}

.dots-spinner .dot {
    width: 16px;
    height: 16px;
    background-color: #00a0df;
    border-radius: 50%;
    animation: dot-bounce 1.4s infinite ease-in-out both;
}

.dots-spinner .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dots-spinner .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    .btn, .fixed-top > div:first-child {
        display: none !important;
    }

    body {
        background: white;
    }
}
