/* Tournament Widget Styles */
.tournament-widget {
    background: var(--theme-surface-1);
    border: 1px solid var(--theme-border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--theme-shadow);
}

.tournament-widget:hover {
    box-shadow: var(--theme-shadow-hover);
}

/* Widget Header */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--theme-surface-2);
    border-bottom: 1px solid var(--theme-border-color);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title i {
    color: var(--theme-accent);
    font-size: 1.1rem;
}

.widget-view-all {
    color: var(--theme-link);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.widget-view-all:hover {
    color: var(--theme-link-hover);
    gap: 0.5rem;
}

/* Tournament List */
.tournament-list {
    padding: 0.5rem;
}

.tournament-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--theme-bg-primary);
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tournament-item:last-child {
    margin-bottom: 0;
}

.tournament-item:hover {
    background: var(--theme-surface-1);
    border-color: var(--theme-border-color);
    transform: translateY(-1px);
    box-shadow: var(--theme-shadow-sm);
}

/* Tournament Date */
.tournament-date {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--theme-accent);
    color: white;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.date-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.9;
}

.date-day {
    font-size: 1.25rem;
    line-height: 1;
}

/* Tournament Details */
.tournament-details {
    flex: 1;
    min-width: 0;
}

.tournament-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin: 0 0 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
    margin-bottom: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.info-item i {
    font-size: 0.75rem;
    color: var(--theme-text-muted);
}

.distance-badge {
    background: var(--theme-info);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

.spots-available {
    color: var(--theme-success);
    font-weight: 500;
}

.spots-available.low-spots {
    color: var(--theme-warning);
}

/* Registration Status */
.registration-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
}

.registration-status.registered {
    background: var(--theme-success-bg);
    color: var(--theme-success);
    border: 1px solid var(--theme-success-border);
}

.division-info {
    color: var(--theme-text-secondary);
    font-size: 0.813rem;
}

/* Tournament Actions */
.tournament-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-register,
.btn-details {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.813rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-register {
    background: var(--theme-primary);
    color: white;
    border: 1px solid var(--theme-primary);
}

.btn-register:hover {
    background: var(--theme-primary-hover);
    border-color: var(--theme-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-details {
    background: transparent;
    color: var(--theme-link);
    border: 1px solid var(--theme-border-color);
}

.btn-details:hover {
    background: var(--theme-surface-1);
    border-color: var(--theme-link);
}

/* No Tournaments State */
.no-tournaments {
    padding: 2rem;
    text-align: center;
}

.no-tournaments p {
    color: var(--theme-text-secondary);
    margin-bottom: 1rem;
}

.btn-browse-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--theme-surface-2);
    color: var(--theme-link);
    border: 1px solid var(--theme-border-color);
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-browse-all:hover {
    background: var(--theme-surface-3);
    border-color: var(--theme-link);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tournament-item {
        padding: 0.75rem;
    }
    
    .tournament-date {
        width: 3rem;
        height: 3rem;
    }
    
    .date-day {
        font-size: 1.125rem;
    }
    
    .tournament-info {
        font-size: 0.813rem;
        gap: 0.75rem;
    }
    
    .tournament-actions {
        flex-direction: column;
    }
    
    .btn-register,
    .btn-details {
        width: 100%;
        text-align: center;
    }
}

/* Dark Mode Color Overrides */
[data-theme="dark"] .tournament-widget {
    background: var(--surface-1);
    border-color: var(--border-color-subtle);
}

[data-theme="dark"] .widget-header {
    background: var(--surface-2);
}

[data-theme="dark"] .tournament-item {
    background: var(--bg-primary);
}

[data-theme="dark"] .tournament-item:hover {
    background: var(--surface-1);
}

[data-theme="dark"] .tournament-date {
    background: var(--accent-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .distance-badge {
    background: var(--info-dark);
}

[data-theme="dark"] .registration-status.registered {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}