/* ============================================
   BUNDESLIGA PORTAL - CUP STYLES
   Styling for DFB-Pokal and cup competitions
   Error Logging: CSS loaded successfully
   ============================================ */

/* Cup Header */
.cup-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cup-header-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.cup-icon {
    font-size: 3rem;
    line-height: 1;
}

.cup-info {
    flex: 1;
}

.cup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.cup-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Round Navigation */
.round-navigation {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.round-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.round-btn:hover {
    border-color: var(--accent-green);
    background: rgba(34, 197, 94, 0.1);
}

.round-btn.active {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--bg-primary);
}

.round-btn-num {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.round-btn.active .round-btn-num {
    color: var(--bg-primary);
}

.round-btn-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    white-space: nowrap;
}

.round-btn.active .round-btn-name {
    color: var(--bg-primary);
}

/* Cup Match */
.cup-match {
    border-bottom: 1px solid var(--border-color);
    padding: 0;
}

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

.cup-match.is-live {
    background: rgba(239, 68, 68, 0.05);
}

.cup-match.is-finished {
    opacity: 0.9;
}

/* Match Date Header */
.match-date-header {
    background: var(--bg-tertiary);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

/* Cup Match Content */
.cup-match-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

/* Cup Team */
.cup-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cup-team-home {
    justify-content: flex-end;
    text-align: right;
}

.cup-team-away {
    justify-content: flex-start;
    text-align: left;
}

.cup-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.cup-team-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.cup-team.is-winner .cup-team-name {
    font-weight: 700;
    color: var(--accent-green);
}

/* Cup Score */
.cup-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
}

.live-badge {
    background: var(--live-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    animation: pulse 1.5s infinite;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.score-separator {
    color: var(--text-muted);
}

.match-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.extra-info {
    font-size: 0.7rem;
    color: var(--accent-green);
    font-weight: 500;
}

/* Cup Match Footer */
.cup-match-footer {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.match-venue {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* No Matches */
.no-matches {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-matches p {
    font-size: 1rem;
}

/* Cup Info List */
.cup-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cup-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.cup-info-list li:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Rounds Timeline */
.rounds-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.rounds-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding: 0.5rem 0;
    padding-left: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
}

.timeline-item.is-current .timeline-marker {
    background: var(--accent-green);
    border-color: var(--accent-green);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.timeline-item.is-past .timeline-marker {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

.timeline-round {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.timeline-item.is-current .timeline-round {
    color: var(--accent-green);
    font-weight: 600;
}

/* Bracket Info */
.bracket-info {
    text-align: center;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cup-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .round-navigation {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .round-btn {
        flex-shrink: 0;
        min-width: 70px;
    }
    
    .cup-match-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .cup-team {
        justify-content: center !important;
        text-align: center !important;
    }
    
    .cup-team-home {
        order: 1;
    }
    
    .cup-score {
        order: 2;
    }
    
    .cup-team-away {
        order: 3;
    }
}

@media (max-width: 480px) {
    .round-btn-name {
        display: none;
    }
    
    .round-btn {
        min-width: 50px;
        padding: 0.5rem 0.75rem;
    }
}
