﻿/*
 * TempoReal Admin - Estilos Compartilhados
 * Use este arquivo para estilos reutilizáveis em todas as páginas do admin
 */

/* ============================================
   Layout e Containers
   ============================================ */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================
   Navegação Sticky
   ============================================ */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
}

.sticky-header {
    position: sticky;
    top: 70px;
    z-index: 50;
    background: #343a40;
    color: #fff;
    padding: 8px 12px;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
}

/* ============================================
   Cards e Painéis
   ============================================ */
.admin-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.admin-card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-header.primary {
    background: #007bff;
    color: #fff;
    border-bottom-color: #0069d9;
}

.admin-card-header.success {
    background: #28a745;
    color: #fff;
}

.admin-card-header.warning {
    background: #ffc107;
    color: #212529;
}

.admin-card-header.danger {
    background: #dc3545;
    color: #fff;
}

.admin-card-body {
    padding: 16px;
}

.admin-card-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 12px 16px;
    border-radius: 0 0 8px 8px;
}

/* ============================================
   Seções Colapsáveis
   ============================================ */
.collapsible-section {
    margin-bottom: 15px;
}

.collapsible-header {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.collapsible-header:hover {
    background: #dee2e6;
}

.collapsible-header .toggle-icon {
    transition: transform 0.2s;
}

.collapsible-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 16px;
    background: #fff;
}

/* ============================================
   Formulários Melhorados
   ============================================ */
.form-section {
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.form-row-compact {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.form-row-compact .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-label-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-label-inline label {
    margin-bottom: 0;
    white-space: nowrap;
}

.form-label-inline .form-control {
    flex: 1;
}

/* Inputs menores para campos numéricos */
.form-control-sm-width {
    max-width: 120px;
}

/* ============================================
   Tabelas
   ============================================ */
.table-admin {
    font-size: 0.875rem;
}

.table-admin th,
.table-admin td {
    vertical-align: middle;
    padding: 0.5rem;
}

.table-admin tbody tr:hover {
    background-color: #f8f9fa;
}

/* ============================================
   Badges e Tags
   ============================================ */
.status-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.canal-badge {
    display: inline-flex;
    align-items: center;
    background: #e9ecef;
    border-radius: 4px;
    padding: 2px 8px;
    margin: 2px;
    font-size: 0.75rem;
}

.canal-badge img {
    height: 16px;
    max-width: 32px;
    object-fit: contain;
    margin-right: 4px;
}

/* ============================================
   Imagens e Ícones
   ============================================ */
.escudo-img {
    height: 24px;
    width: 24px;
    object-fit: contain;
}

.escudo-img-lg {
    height: 48px;
    width: 48px;
    object-fit: contain;
}

.canal-icon {
    height: 20px;
    max-width: 40px;
    object-fit: contain;
}

.provider-logo {
    height: 20px;
    opacity: 0.7;
}

/* ============================================
   Botões
   ============================================ */
.btn-group-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

/* ============================================
   Placar / Scoreboard
   ============================================ */
.scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 20px;
}

.scoreboard-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 120px;
}

.scoreboard-team img {
    height: 64px;
    width: 64px;
    object-fit: contain;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    padding: 8px;
}

.scoreboard-team-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.scoreboard-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scoreboard-score input {
    width: 60px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.scoreboard-score input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255,255,255,0.2);
}

.scoreboard-vs {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.8;
}

.scoreboard-info {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* ============================================
   Transmissões
   ============================================ */
.transmissoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.transmissao-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.transmissao-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.transmissao-item.selected {
    background: #d4edda;
    border-color: #28a745;
}

.transmissao-item input[type="checkbox"] {
    margin-right: 8px;
}

.transmissao-item img {
    height: 20px;
    max-width: 36px;
    object-fit: contain;
    margin-right: 8px;
}

.transmissao-item span {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Search Box
   ============================================ */
.search-box {
    max-width: 300px;
}

.search-box-inline {
    position: relative;
}

.search-box-inline input {
    padding-left: 35px;
}

.search-box-inline .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* ============================================
   Alertas e Notificações
   ============================================ */
.admin-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

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

/* ============================================
   Date Navigation
   ============================================ */
.btn-day {
    min-width: 90px;
    position: relative;
}

.btn-day.active {
    font-weight: 600;
}

.btn-day .badge {
    position: absolute;
    top: 2px;
    right: 2px;
}

/* ============================================
   Utilities
   ============================================ */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.match-info {
    font-size: 0.7rem;
    color: #6c757d;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .scoreboard {
        flex-direction: column;
        gap: 10px;
    }
    
    .scoreboard-team {
        flex-direction: row;
        gap: 10px;
    }
    
    .scoreboard-team img {
        height: 40px;
        width: 40px;
    }
    
    .form-row-compact {
        flex-direction: column;
        gap: 10px;
    }
    
    .transmissoes-grid {
        grid-template-columns: 1fr;
    }
}
