/* =========================== 
   RESET + BASE
=========================== */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f4f6f9;
}

/* ===========================
   
=========================== */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===========================
   HEADER
=========================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
}

.logo {
    height: 50px;
}

.header-text {
    text-align: center;
    flex-grow: 1;
    font-size: 20px;
}

.title-main {
    font-size: 22px;
    font-weight: 600;
    color: #064e3b;
}

.title-sub {
    font-size: 16px;
    color: #064e3b;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #111827;
}

@media (min-width: 1024px) {
    .header-text {
        font-size: 26px;
    }

    .title-main {
        font-size: 30px;
    }

    .title-sub {
        font-size: 20px;
    }
}

/* ===========================
   USER BANNER
=========================== */
.user-banner {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #2563eb, #1e40af);
    color: white;
    padding: 0 14px;
}

.left-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* BOTÓN CALENDARIO BANNER */
.calendariobanner-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    height: 40px; /* igual que avatar-btn */
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px; /* espacio desde avatar */
    transition: transform 0.15s ease, opacity 0.15s ease;
}

    .calendariobanner-btn:hover {
        transform: scale(1.05);
        opacity: 0.9;
    }

.btn-calendario-img {
    height: 100%; /* ocupar altura completa del botón */
    width: auto;
    object-fit: cover;
}

/* NUEVA CLASE: elementos a la derecha del banner */
.right-group {
    display: flex;
    align-items: center;
    gap: 12px; /* separa login/logout si hay más de uno */
}

/* ===========================
   AVATAR
=========================== */
.avatar-btn {
    height: 40px;
    min-width: 40px;
    max-width: 80px;
    border: none;
    background: transparent;
    padding: 0 4px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-img {
    height: 100%;
    width: auto;
    object-fit: cover;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.avatar-btn:hover .avatar-img {
    transform: scale(1.05);
    opacity: 0.9;
}

.user-name {
    font-weight: 600;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===========================
   BOTÓN HANDICAP
=========================== */
.handicap-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-handicap {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
}

.handicap-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

    /* Animación giro botón handicap */
    .handicap-img.girando {
        animation: spinHandicap 0.9s linear infinite;
    }

@keyframes spinHandicap {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.handicap-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
}

/* ===========================
   BOTON QUIENES SOMOS
=========================== */
.quienessomos-btn {
    background: transparent;
    border: none;
    padding: 0;
    height: 40px; /* igual que avatar-btn */
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quienessomos-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.quienessomos-btn:hover .quienessomos-img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ===========================
   LOGOUT / LOGIN
=========================== */
.logout-btn, .login-btn {
    background: transparent;
    border: none;
    padding: 0;
    height: 40px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logout-img, .login-img {
    height: 32px; /* tamaño consistente */
    width: 32px;
    object-fit: contain;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.logout-btn:hover .logout-img,
.login-btn:hover .login-img {
    transform: scale(1.1);
    opacity: 0.85;
}

/* ===========================
   CONTENIDO SCROLLABLE
=========================== */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

/* ===========================
   FOOTER
=========================== */
.footer {
    text-align: center;
    padding: 15px;
    background-color: #003366;
    color: white;
}

    .footer a {
        color: #cce0ff;
        text-decoration: none;
    }

        .footer a:hover {
            text-decoration: underline;
        }

/* ===========================
   LOGIN / PASSWORD CARD
=========================== */
.login-container,
.recover-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 80px);
    padding: 40px 20px 20px 20px;
    background-color: #f4f6f9;
}

.login-card,
.recover-card {
    width: 380px;
    max-width: 92%;
    padding: 28px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.login-title,
h2.text-center {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #003366;
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 12px;
}

.form-label {
    font-weight: 600;
    color: #003366;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    width: 100%;
    height: 42px;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 16px;
}

.password-input-group {
    display: flex;
}

    .password-input-group .form-control {
        flex: 1;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.show-password-btn {
    width: 50px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
}

.btn-primary {
    height: 45px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 10px;
}

.login-extra a,
.recover-card a {
    font-size: 15px;
    color: #003366;
    text-decoration: underline;
}

/* ===========================
   SIDEBAR
=========================== */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    overflow-y: auto;
    background-color: #0f172a;
    color: white;
    padding: 20px;
    transition: left 0.25s ease;
    z-index: 20000;
}

.sidebar-open {
    left: 0;
}

.sidebar-content {
    margin-top: 60px;
}

.menu-list {
    list-style: none;
    padding: 0;
}

    .menu-list li {
        margin-bottom: 14px;
    }

    .menu-list a {
        color: #e5e7eb;
        text-decoration: none;
        font-size: 16px;
        display: block;
        padding: 10px;
        border-radius: 10px;
    }

        .menu-list a:hover {
            background-color: rgba(255,255,255,0.1);
        }

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0);
    pointer-events: none;
    transition: background-color 0.25s ease;
    z-index: 15000;
}

.overlay-open {
    background-color: rgba(0,0,0,0.5);
    pointer-events: auto;
}

#blazor-error-ui {
    display: none;
}

    #blazor-error-ui.blazor-error-visible {
        display: block;
    }




/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
    .login-card,
    .recover-card {
        width: 95%;
        padding: 22px;
    }

    .login-title,
    h2.text-center {
        font-size: 22px;
    }

    .title-main {
        font-size: 18px;
    }

    .title-sub {
        font-size: 13px;
    }

    .show-password-btn {
        width: 45px;
        font-size: 16px;
    }

    /* BOTÓN CALENDARIO RESPONSIVO */
    .calendariobanner-btn {
        height: 36px;
        min-width: 36px;
        margin-left: 6px;
    }

    .btn-calendario-img {
        height: 100%;
        width: auto;
    }

    .quienessomos-btn {
        height: 36px;
        min-width: 36px;
    }
}

@media (max-width: 480px) {
    .calendariobanner-btn {
        height: 32px;
        min-width: 32px;
        margin-left: 4px;
    }

    .btn-calendario-img {
        height: 100%;
        width: auto;
    }
    .quienessomos-btn {
        height: 32px;
        min-width: 32px;
    }


    .campeonato-card {
        border-radius: 12px;
        padding: 16px;
        background: white;
        border: 2px solid #e0e0e0;
        max-width: 420px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        transition: all 0.2s ease;
        cursor: pointer;
    }

        /* Hover */
        .campeonato-card:hover {
            transform: translateY(-2px);
            border-color: #007bff;
        }

        /* ?? Estado seleccionado */
        .campeonato-card.selected {
            border-color: #007bff;
            background: #f0f6ff;
            box-shadow: 0 6px 16px rgba(0,123,255,0.2);
            transform: translateY(-2px);
        }

        .campeonato-card .header {
            font-size: 18px;
            margin-bottom: 10px;
        }

        .campeonato-card .body p {
            margin: 6px 0;
        }
}
