/* Custom CSS - 11º Campeonato Brejo Seguro */

:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #065f46;
    --secondary-light: #10b981;
    --accent: #f59e0b;
    --dark: #1e293b;
    --danger: #ef4444;
    --purple: #7c3aed;
    --indigo: #6366f1;
}

body {
    font-family: 'Inter', sans-serif;
    color: #334155;
    background-color: #f8fafc;
}

/* Card Hover Micro-animations */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Mobile Navigation App Bar */
.mobile-bottom-nav {
    z-index: 1040;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(17, 24, 39, 0.95) !important;
}

.mobile-nav-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    padding: 4px 8px;
    border-radius: 8px;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    color: #f59e0b !important;
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .mobile-content-pad {
        padding-bottom: 80px !important;
    }
}

/* App Admin Layout Grid */
.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

@media (min-width: 992px) {
    .app-sidebar {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1020;
        overflow-y: auto;
    }
    .app-main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
        min-width: 0; /* Prevents overflow */
        min-height: 100vh;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        display: none !important;
    }
    .app-main-content {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 0;
        padding-top: 70px !important;
        padding-bottom: 85px !important;
    }
}

/* Sidebar Custom Styling */
.sidebar .nav-link {
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
}
.sidebar .nav-link:hover, .hover-bg:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Table styling */
.table-success-light {
    background-color: #f0fdf4 !important;
}
.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* Pulsing Badge for Live games */
.pulse-badge {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Custom background colors */
.bg-primary-light {
    background-color: rgba(59, 130, 246, 0.1) !important;
}
.bg-success-light {
    background-color: rgba(16, 185, 129, 0.1) !important;
}
.bg-warning-light {
    background-color: rgba(245, 158, 11, 0.1) !important;
}
.bg-danger-light {
    background-color: rgba(239, 68, 68, 0.1) !important;
}
.bg-purple {
    background-color: var(--purple) !important;
}
.bg-indigo {
    background-color: var(--indigo) !important;
}

/* Brand logo styling */
.team-logo-wrapper img {
    object-fit: cover;
}

/* Font weight overrides */
.fw-extrabold {
    font-weight: 800;
}
.fw-black {
    font-weight: 900;
}
.text-xs {
    font-size: 0.75rem;
}
.text-sm {
    font-size: 0.875rem;
}

/* Playoff Bracket visual connectors */
.playoff-bracket-wrapper {
    user-select: none;
}
.playoff-match-card {
    position: relative;
    border-left: 4px solid var(--primary-light) !important;
}

/* Timeline Custom Styles */
.timeline {
    position: relative;
    padding-left: 10px;
}

/* Print Styling */
@media print {
    .sidebar, nav, footer, button, .btn {
        display: none !important;
    }
    main {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Mobile App-like Optimizations */
@media (max-width: 991px) {
    body {
        padding-bottom: 80px !important; /* Spacing for sticky bottom nav */
    }
    
    .card {
        border-radius: 16px !important; /* Premium rounded cards for mobile */
    }

    /* Make input fields and buttons taller for easier touch on mobile */
    .form-control, .form-select, .btn {
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 16px; /* Avoid iOS auto-zoom on inputs */
    }
    
    .btn-sm {
        padding-top: 6px;
        padding-bottom: 6px;
        font-size: 13px;
    }
    
    /* Touch optimization for form spacing */
    .row.g-3 > [class*="col-"] {
        margin-bottom: 5px;
    }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(30, 41, 59, 0.96); /* Dark blue/gray glassmorphic bg */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1050;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color 0.2s ease;
    flex-grow: 1;
    height: 100%;
}

.mobile-bottom-nav-item i {
    font-size: 19px;
    margin-bottom: 3px;
}

.mobile-bottom-nav-item.active {
    color: #f59e0b !important; /* Gold accent color */
    font-weight: 700;
}

.mobile-bottom-nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Live Match Pulse Animation
   ========================================================================== */
@keyframes pulseLive {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.03);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.pulse-badge {
    animation: pulseLive 1.8s infinite;
}

/* ==========================================================================
   Sponsors Marquee & Carousel (CONFIGURAÇÃO DO TEMPO DO CARROSSEL)
   ========================================================================== */
:root {
    /* Altere aqui o tempo total para percorrer o carrossel (ex: 20s = mais rápido, 60s = mais suave) */
    --sponsors-carousel-speed: 60s;
}

.sponsors-section {
    position: relative;
    overflow: hidden;
}

.sponsors-marquee-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 14px 0;
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.sponsors-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: scrollSponsors var(--sponsors-carousel-speed, 60s) linear infinite;
}

.sponsors-track:hover {
    animation-play-state: paused;
}

@keyframes scrollSponsors {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.sponsor-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 290px;
    max-width: 350px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    flex-shrink: 0;
}

.sponsor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    border-color: #f59e0b;
}

.sponsor-card .sponsor-img-wrap {
    width: 100px;
    height: 72px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 6px;
    border: 1px solid #f1f5f9;
}

.sponsor-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
    transition: transform 0.3s ease;
}

.sponsor-card:hover img {
    transform: scale(1.08);
}

/* ==========================================================================
   Mobile Responsive Sponsors (Grade de 3 Linhas / Colunas com Animação Contínua)
   ========================================================================== */
@media (max-width: 768px) {
    .sponsors-marquee-container {
        padding: 10px 0;
        mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    }

    .sponsors-track {
        display: grid;
        grid-template-rows: repeat(3, 72px);
        grid-auto-flow: column;
        grid-auto-columns: 200px;
        gap: 12px;
        width: max-content;
        animation: scrollSponsors var(--sponsors-carousel-speed, 60s) linear infinite;
    }

    .sponsor-card {
        min-width: 200px;
        max-width: 200px;
        height: 72px;
        padding: 8px 12px;
        gap: 10px;
        border-radius: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .sponsor-card:hover {
        transform: translateY(-2px);
    }

    .sponsor-card .sponsor-img-wrap {
        width: 64px;
        height: 52px;
        min-width: 64px;
        padding: 4px;
        border-radius: 10px;
    }

    .sponsor-card strong {
        font-size: 11.5px !important;
        max-width: 115px !important;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sponsor-card .badge {
        font-size: 9.5px !important;
        padding: 1px 6px !important;
        margin-top: 2px;
    }
}


/* =========================================================
   Alvos de toque (mobile-first)
   Usado nas telas do sistema para evitar toques acidentais
   em botoes pequenos e colados uns nos outros.
   ========================================================= */
.btn-touch {
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    line-height: 1.2;
}

/* Filtros em pilulas: rolagem horizontal em vez de quebrar linha */
.filter-pills-scroll {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-pills-scroll::-webkit-scrollbar {
    display: none;
}

.filter-pills-scroll .nav-link {
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 575.98px) {
    /* Campos maiores e sem zoom automatico no iOS */
    .card-body .form-control,
    .card-body .form-select,
    #teamSearchInput {
        font-size: 16px;
        min-height: 48px;
    }

    .btn-touch {
        width: 100%;
        min-height: 50px;
        font-size: 0.95rem;
    }
}
