/* Football Matches Widget - Frontend Styles */

/* ===== RESET E BASE ===== */
.fmw-matches-container {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.fmw-matches-container *,
.fmw-matches-container *::before,
.fmw-matches-container *::after {
    box-sizing: inherit;
}

/* ===== LOADING STATE ===== */
.fmw-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.fmw-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: fmw-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes fmw-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fmw-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ===== TÍTULO DO SHORTCODE ===== */
.fmw-shortcode-title {
    margin: 0 0 20px 0;
    padding: 20px 24px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 2px solid #007cba;
    padding-bottom: 12px;
}

/* ===== LISTA DE JOGOS ===== */
.fmw-matches-list {
    padding: 0;
    margin: 0;
}

.fmw-match-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 124, 186, 0.02) 100%);
}

.fmw-match-item:hover {
    background: linear-gradient(135deg, rgba(0, 124, 186, 0.05) 0%, rgba(0, 124, 186, 0.08) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fmw-match-item:last-child {
    border-bottom: none;
}

/* ===== COMPETIÇÃO ===== */
.fmw-competition {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fmw-competition-logo {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border-radius: 2px;
    object-fit: contain;
}

/* ===== TIMES ===== */
.fmw-teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 20px;
}

.fmw-team {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.fmw-team-home {
    justify-content: flex-start;
}

.fmw-team-away {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.fmw-team-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    background: #f8f9fa;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.fmw-team-logo:hover {
    transform: scale(1.1);
}

.fmw-team-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin: 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* ===== PLACAR ===== */
.fmw-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
    position: relative;
    overflow: hidden;
}

.fmw-score::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.fmw-match-item:hover .fmw-score::before {
    left: 100%;
}

.fmw-score-vs {
    margin: 0 8px;
    font-size: 12px;
    opacity: 0.8;
}

/* ===== INFORMAÇÕES DO JOGO ===== */
.fmw-match-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 100px;
}

.fmw-match-time {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.fmw-match-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fmw-status-scheduled {
    background: #e3f2fd;
    color: #1976d2;
}

.fmw-status-live {
    background: #ffebee;
    color: #d32f2f;
    animation: fmw-pulse 2s infinite;
}

.fmw-status-finished {
    background: #e8f5e8;
    color: #2e7d32;
}

.fmw-status-postponed {
    background: #fff3e0;
    color: #f57c00;
}

@keyframes fmw-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== ESTADOS DE ERRO E SEM DADOS ===== */
.fmw-error,
.fmw-no-matches {
    padding: 40px 24px;
    text-align: center;
    color: #666;
}

.fmw-error p,
.fmw-no-matches p {
    margin: 0;
    font-size: 14px;
}

.fmw-error {
    background: #ffebee;
    color: #c62828;
}

/* ===== TEMAS ===== */

/* Tema Escuro */
.fmw-theme-dark {
    background: #1a1a1a;
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fmw-theme-dark .fmw-shortcode-title {
    color: #fff;
    border-bottom-color: #007cba;
}

.fmw-theme-dark .fmw-match-item {
    border-bottom-color: #333;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 124, 186, 0.1) 100%);
}

.fmw-theme-dark .fmw-match-item:hover {
    background: linear-gradient(135deg, rgba(0, 124, 186, 0.15) 0%, rgba(0, 124, 186, 0.2) 100%);
}

.fmw-theme-dark .fmw-team-name {
    color: #e0e0e0;
}

.fmw-theme-dark .fmw-competition {
    color: #aaa;
}

.fmw-theme-dark .fmw-match-time {
    color: #aaa;
}

.fmw-theme-dark .fmw-team-logo {
    background: #333;
}

/* Tema Minimalista */
.fmw-theme-minimal {
    box-shadow: none;
    border: 1px solid #e0e0e0;
    background: #fafafa;
}

.fmw-theme-minimal .fmw-match-item {
    padding: 16px 20px;
    background: none;
}

.fmw-theme-minimal .fmw-match-item:hover {
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.fmw-theme-minimal .fmw-score {
    background: #333;
    box-shadow: none;
}

.fmw-theme-minimal .fmw-team-logo {
    box-shadow: none;
    border: 1px solid #ddd;
}

/* Tema Moderno */
.fmw-theme-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.fmw-theme-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.fmw-theme-modern > * {
    position: relative;
    z-index: 2;
}

.fmw-theme-modern .fmw-shortcode-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.fmw-theme-modern .fmw-match-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.fmw-theme-modern .fmw-match-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fmw-theme-modern .fmw-team-name {
    color: white;
}

.fmw-theme-modern .fmw-competition {
    color: rgba(255, 255, 255, 0.8);
}

.fmw-theme-modern .fmw-match-time {
    color: rgba(255, 255, 255, 0.8);
}

.fmw-theme-modern .fmw-score {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== RESPONSIVIDADE ===== */

/* Tablets */
@media (max-width: 768px) {
    .fmw-matches-container {
        border-radius: 8px;
        margin: 0 -10px;
    }
    
    .fmw-match-item {
        padding: 16px 20px;
        flex-wrap: wrap;
    }
    
    .fmw-competition {
        width: 100%;
        margin-bottom: 12px;
    }
    
    .fmw-teams {
        margin: 0 10px;
        flex: 1;
    }
    
    .fmw-team-name {
        max-width: 100px;
        font-size: 13px;
    }
    
    .fmw-score {
        min-width: 70px;
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .fmw-match-info {
        min-width: 80px;
    }
    
    .fmw-shortcode-title {
        font-size: 20px;
        padding: 16px 20px 0;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    .fmw-matches-container {
        border-radius: 0;
        margin: 0 -15px;
        box-shadow: none;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }
    
    .fmw-match-item {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .fmw-competition {
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .fmw-teams {
        margin: 8px 0;
        justify-content: space-around;
        align-items: center;
    }
    
    .fmw-team {
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex: 0 0 auto;
    }
    
    .fmw-team-away {
        flex-direction: column;
    }
    
    .fmw-team-logo {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }
    
    .fmw-team-name {
        margin: 0;
        max-width: none;
        font-size: 12px;
        white-space: normal;
        text-align: center;
    }
    
    .fmw-score {
        margin: 8px 0;
        align-self: center;
        min-width: 60px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .fmw-match-info {
        align-items: center;
        text-align: center;
        min-width: auto;
    }
    
    .fmw-shortcode-title {
        font-size: 18px;
        padding: 12px 16px 0;
        text-align: center;
    }
}

/* ===== ACESSIBILIDADE ===== */
.fmw-matches-container:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.fmw-match-item:focus {
    outline: 2px solid #007cba;
    outline-offset: -2px;
}

/* Reduzir animações para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    .fmw-matches-container,
    .fmw-match-item,
    .fmw-team-logo,
    .fmw-score,
    .fmw-spinner {
        animation: none;
        transition: none;
    }
    
    .fmw-match-item:hover {
        transform: none;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    .fmw-matches-container {
        box-shadow: none;
        border: 1px solid #000;
        background: white !important;
        color: black !important;
    }
    
    .fmw-match-item {
        break-inside: avoid;
        background: none !important;
    }
    
    .fmw-loading,
    .fmw-error {
        display: none;
    }
    
    .fmw-score {
        background: white !important;
        color: black !important;
        border: 1px solid #000;
    }
}

/* ===== ANIMAÇÕES AVANÇADAS ===== */
.fmw-match-item {
    animation: fmw-fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.fmw-match-item:nth-child(1) { animation-delay: 0.1s; }
.fmw-match-item:nth-child(2) { animation-delay: 0.2s; }
.fmw-match-item:nth-child(3) { animation-delay: 0.3s; }
.fmw-match-item:nth-child(4) { animation-delay: 0.4s; }
.fmw-match-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fmw-fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== EFEITOS ESPECIAIS ===== */
.fmw-theme-modern .fmw-match-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.fmw-theme-modern .fmw-match-item:hover::before {
    left: 100%;
}

