/**
 * TSB Core Frontend Styles
 * 
 * @package TSB_Core
 */

/* ==========================================================================
   Tournament Styles
   ========================================================================== */

.tsb-tournaments--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.tsb-tournaments--list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Tournament Card - Complete Styles */
.tsb-tournament-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid #D84315;
}

.tsb-tournament-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tsb-tournament-card__header {
    background: linear-gradient(135deg, #D84315 0%, #FF5722 100%);
    color: #fff;
    padding: 1rem;
    position: relative;
}

/* Status Badge */
.tsb-tournament-card__status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.tsb-status--upcoming {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tsb-status--registration {
    background: #FFB74D;
    color: #333;
}

.tsb-status--ongoing,
.tsb-status--in_progress {
    background: #4CAF50;
    color: #fff;
}

.tsb-status--completed {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.tsb-status--cancelled {
    background: #f44336;
    color: #fff;
}

.tsb-tournament-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.tsb-tournament-card__title a {
    color: #fff;
    text-decoration: none;
}

.tsb-tournament-card__title a:hover {
    text-decoration: underline;
}

.tsb-tournament-card__body {
    padding: 1rem;
    background: #fff;
}

.tsb-tournament-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tsb-tournament-card__tag {
    background: #f5f5f5;
    color: #757575;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.tsb-tournament-card__tag--boys {
    background: #e3f2fd;
    color: #1565c0;
}

.tsb-tournament-card__tag--girls {
    background: #fce4ec;
    color: #c2185b;
}

.tsb-tournament-card__date,
.tsb-tournament-card__venue {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #424242;
}

.tsb-tournament-card__date strong,
.tsb-tournament-card__venue strong {
    color: #212121;
}

.tsb-tournament-card__actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Age badges in cards */
.tsb-tournament-card .tsb-age-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    min-width: auto;
    height: auto;
}

.tsb-age-badge--10,
.tsb-age-badge--10s {
    background: #FFCCBC;
    color: #BF360C;
}

.tsb-age-badge--12 {
    background: #FFE0B2;
    color: #E65100;
}

.tsb-age-badge--14 {
    background: #FFCC80;
    color: #EF6C00;
}

.tsb-age-badge--16 {
    background: #FFAB91;
    color: #D84315;
}

.tsb-age-badge--18 {
    background: #FF8A65;
    color: #BF360C;
}

.tsb-age-badge--senior,
.tsb-age-badge--seniori {
    background: #BCAAA4;
    color: #4E342E;
}

/* List layout specific styles */
.tsb-tournaments--list .tsb-tournament-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-left: 4px solid #D84315;
}

.tsb-tournaments--list .tsb-tournament-card__header {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.tsb-tournaments--list .tsb-tournament-card__body {
    border-left: 1px solid #eee;
}

@media (max-width: 600px) {
    .tsb-tournaments--list .tsb-tournament-card {
        grid-template-columns: 1fr;
    }
    
    .tsb-tournaments--list .tsb-tournament-card__body {
        border-left: none;
        border-top: 1px solid #eee;
    }
}

.tsb-no-results {
    text-align: center;
    padding: 2rem;
    color: #757575;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ==========================================================================
   Document Styles
   ========================================================================== */

.tsb-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.tsb-download-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: #212121;
    transition: all 0.3s ease;
}

.tsb-download-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
    transform: translateY(-2px);
}

.tsb-download-item__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #D84315;
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tsb-download-item__icon--pdf {
    background: #d32f2f;
}

.tsb-download-item__icon--doc {
    background: #1976d2;
}

.tsb-download-item__icon--xls {
    background: #388e3c;
}

.tsb-download-item__info {
    flex: 1;
    min-width: 0;
}

.tsb-download-item__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tsb-download-item__meta {
    font-size: 0.875rem;
    color: #757575;
}

/* ==========================================================================
   Club Styles
   ========================================================================== */

.tsb-clubs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.tsb-club-item {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #D84315;
}

.tsb-club-item__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #BF360C;
    margin: 0 0 0.75rem 0;
}

.tsb-club-item__info {
    font-size: 0.875rem;
    color: #757575;
}

.tsb-club-item__info p {
    margin: 0.25rem 0;
}

.tsb-club-item__info a {
    color: #D84315;
    text-decoration: none;
}

.tsb-club-item__info a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Contact Grid Styles
   ========================================================================== */

.tsb-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tsb-contact-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.tsb-contact-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tsb-contact-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: #D84315;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tsb-contact-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #BF360C;
    margin: 0 0 0.5rem 0;
}

.tsb-contact-card__desc {
    font-size: 0.875rem;
    color: #757575;
    margin: 0 0 1rem 0;
}

.tsb-contact-card__email a,
.tsb-contact-card__phone a {
    color: #D84315;
    text-decoration: none;
}

.tsb-contact-card__email a:hover,
.tsb-contact-card__phone a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.tsb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
}

.tsb-btn--primary {
    background: #2e7d32;
    color: #fff;
}

.tsb-btn--primary:hover {
    background: #1b5e20;
}

.tsb-btn--secondary {
    background: #ffc107;
    color: #212121;
}

.tsb-btn--secondary:hover {
    background: #ff8f00;
}

.tsb-btn--register {
    background: #ffc107;
    color: #212121;
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

.tsb-btn--register:hover {
    background: #ff8f00;
    transform: scale(1.02);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .tsb-tournaments--grid {
        grid-template-columns: 1fr;
    }

    .tsb-downloads {
        grid-template-columns: 1fr;
    }

    .tsb-clubs-list {
        grid-template-columns: 1fr;
    }

    .tsb-contact-grid {
        grid-template-columns: 1fr;
    }

    .tsb-tournaments--list .tsb-tournament-card {
        flex-direction: column;
    }

    .tsb-tournaments--list .tsb-tournament-card__header {
        flex: none;
    }
}
