/* Base styles - Mobile-first approach */
/* Font family removed - using Barlow from worldcurling.css */
html {
    height: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 100px; /* Account for fixed navbar */
}

main {
    flex: 1 0 auto; /* Allow main to grow and push footer down */
}

footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
}

h1:focus {
    outline: none;
}

/* Link and button colors removed - using World Curling brand colors from worldcurling.css */

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none !important; /* Force hide - we'll use custom error handling */
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    visibility: hidden !important;
    opacity: 0 !important;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Blazor reconnection UI customization - FORCE HIDE ALL DEFAULT UI */
#components-reconnect-modal,
#components-reconnect-show,
#components-reconnect-hide,
#components-reconnect-failed,
#components-reconnect-rejected {
    display: none !important; /* Hide all default reconnection UI */
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide any Blazor reconnection overlays */
div[style*="position: fixed"][style*="bottom: 0"] {
    display: none !important;
}

/* Additional catch-all for Blazor's default reconnection UI */
body > div :not(#app):not(#blazor-error-ui):not(#reconnection-indicator) {
    /* This targets potential reconnection UI divs */
}

/* Specifically target the yellow bar if it appears */
div[style*="background: lightyellow"],
div[style*="background: yellow"] {
    display: none !important;
}

/* Custom reconnection indicator */
.reconnection-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #0047AB 0%, #00CED1 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.reconnection-indicator.show {
    display: flex;
}

.reconnection-indicator .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.reconnection-indicator .icon {
    font-size: 20px;
}

.reconnection-indicator .message {
    font-weight: 500;
}

.reconnection-indicator.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.reconnection-indicator.error {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOT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bGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Empty state icon styling */
.empty-state-icon {
    font-size: 3rem;
    color: #adb5bd;
}

/* Instructions list styling */
.instructions-list {
    padding-left: 1.5rem;
}

.instructions-list li {
    line-height: 1.6;
}

/* Tablet and Desktop styles (768px+) */
@media (min-width: 768px) {
    .empty-state-icon {
        font-size: 4rem;
    }
}

/* StatWeb Custom Styles - World Curling Branding Extensions */

/* Banner classes for page headers */
.results-banner {
    min-height: 100px;
}

.local-main-banner {
    min-height: 60px;
}

/* Fix z-index for banner image visibility */
.local-main-banner .img-banner {
    z-index: 0;
}

.local-main-banner .container-xxl {
    position: relative;
    z-index: 1;
}

.local-main-banner h2 {
    color: #ffffff;
}

/* Country/Association text styling */
/* Note: This class is used for more than just country text */
.country {
    color: rgba(5, 24, 57);
    font-size: 20px;
    font-weight: bold;
    font-style: italic;
    height: 35px;
    text-transform: uppercase;
}

.country-text {
    color: rgba(5, 24, 57);
    font-size: 20px;
    font-weight: bold;
    height: 35px;
    text-transform: uppercase;
}

/* Larger text utility class */
.bigger-text {
    font-size: 20px;
}

/* Responsive display classes for mobile/desktop */
/* Desktop: show flag and name, hide code */
.show-flag {
    display: flex;
}

.show-name {
    display: flex;
}

.show-code {
    display: none;
}

/* Mobile: hide flag and name, show code */
@media (max-width: 767px) {
    .show-flag {
        display: none;
    }

    .show-name {
        display: none;
    }

    .show-code {
        display: flex;
    }
}

/* Header/Navbar Styles - Matching Old Site (Bootstrap 5) */
.navbar-custom {
    background-color: #222641;
    min-height: 100px;
    font-size: 16px;
}

.navbar-custom .navbar-collapse {
    align-items: flex-start;
}

.navbar-custom .navbar-brand {
    color: white;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus {
    color: white;
}

.navbar-brand-text {
    font-size: 32px;
    font-style: oblique;
    position: relative;
    top: 5px;
}

.navbar-custom .nav-link {
    color: white;
    font-size: 16px;
    text-transform: uppercase;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
    color: gainsboro;
}

.navbar-custom .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile menu - ensures collapsed menu is visible on narrow screens */
@media (max-width: 991.98px) {
    .navbar-custom .navbar-collapse {
        background-color: #ecfafe;
        padding: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        border-radius: 0 0 0.25rem 0.25rem;
    }
}

/* Footer Styles - Matching World Curling Website */
.page-footer,
.footer {
    background-color: #ecfafe;
    color: black;
    margin-top: 50px;
}

.partners-section {
    background: linear-gradient(90deg, #0047AB 0%, #00CED1 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav {
    margin-bottom: 20px;
}

.footer-nav .nav-title {
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 10px;
    color: black;
    text-transform: uppercase;
}

.footer-nav .nav-item {
    margin-bottom: 8px;
    font-size: 20px;
}

.footer-nav .nav-item a {
    color: #999;
    text-decoration: none;
}

.footer-nav .nav-item a:hover {
    color: black;
    text-decoration: underline;
}

.newsletter-section input {
    background-color: white;
    border: none;
    border-radius: 4px 0 0 4px;
    flex: 1 1 auto;
    margin-bottom: 10px;
}

.newsletter-section .btn-info {
    background-color: #0047AB;
    border: none;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    flex: 0 0 auto;
    width: 100%;
}

.newsletter-section .btn-info:hover {
    background-color: #0047AB;
}

.social-icons a {
    transition: opacity 0.3s;
}

.social-icons a:hover {
    opacity: 0.7;
}

.contact-info a {
    color: #999;
    text-decoration: none;
}

.contact-info a:hover {
    color: black;
    text-decoration: underline;
}

