/**
 * Copyright © ProPlayerFC. All rights reserved.
 * Cards de torneio - mesma estilização da página de profile
 * Banner no topo, conteúdo abaixo (cards quadradinhos)
 */

.tournaments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.tournament-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.tournament-card__overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
}

.tournament-card:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tournament-card__banner {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 140px;
    min-height: 140px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

.tournament-card__banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tournament-card__banner--placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #9ca3af;
    font-size: 48px;
}

.tournament-card__content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
    min-width: 0;
    box-sizing: border-box;
    pointer-events: none;
}

.tournament-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    pointer-events: none;
}

.tournament-card__name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    pointer-events: none;
}

.tournament-card__header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
    pointer-events: none;
}

.tournament-card__organizer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    pointer-events: none;
}

.tournament-card__organizer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.tournament-card__organizer i {
    color: #6b7280;
    font-size: 12px;
}

.tournament-card__organizer-link,
.tournament-card__organizer-text {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
}

.tournament-card__organizer-link:hover {
    color: #059669;
    text-decoration: underline;
}

.tournament-card__contact-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.tournament-card__contact-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.tournament-card__contact-icon:hover {
    background: rgba(5, 150, 105, 0.18);
    color: #047857;
    transform: translateY(-1px);
}

.tournament-card__contact-icon--group {
    background: rgba(31, 41, 55, 0.08);
    color: #1f2937;
}

.tournament-card__contact-icon--group:hover {
    background: rgba(31, 41, 55, 0.14);
    color: #111827;
}

.tournament-card__type {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.tournament-card__status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.tournament-card__status--pending,
.tournament-card__status--draft {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.tournament-card__status--drawn,
.tournament-card__status--active,
.tournament-card__status--in_progress {
    background: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.tournament-card__status--finished,
.tournament-card__status--completed,
.tournament-card__status--cancelled {
    background: #e5e7eb;
    color: #374151;
}

.tournament-card__stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    pointer-events: none;
}

.tournament-card__footer {
    position: relative;
    z-index: 2;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    pointer-events: auto;
}

.tournament-card__cta,
.tournament-card__state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
}

.tournament-card__state--pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.tournament-card__state--confirmed {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}

.tournament-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tournament-stat__label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
}

.tournament-stat__value {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
}

/* Mobile - cards quadradinhos */
@media (max-width: 768px) {
    .tournaments-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tournament-card__banner {
        height: 160px;
        min-height: 160px;
    }

    .tournament-card__content {
        padding: 14px 16px;
    }

    .tournament-card__header {
        flex-direction: column;
        gap: 10px;
    }

    .tournament-card__stats {
        gap: 16px;
    }

    .tournament-stat {
        flex: 1;
        min-width: 0;
    }
}
