/* Comps Page */

.comps-page-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.comps-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* 3 Big Tab Buttons */
.comps-tab-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.comps-tab-btn {
    flex: 1;
    padding: 14px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #757575;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.comps-tab-btn i {
    font-size: 20px;
}

.comps-tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.comps-tab-btn:not(.active):hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Tab Content */
.comps-tab-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px;
    background: var(--content-bg);
}

.comps-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* Competition Cards */
.comps-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.comps-card-clickable {
    cursor: pointer;
}

.comps-card-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.comps-card-clickable:active {
    transform: scale(0.98);
}

.comps-card-left {
    flex-shrink: 0;
}

.comps-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary-color);
}

.comps-card-center {
    flex: 1;
    min-width: 0;
}

.comps-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comps-card-subtitle {
    font-size: 12px;
    color: #999;
}

.comps-card-rounds {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.comps-card-right {
    flex-shrink: 0;
}

.comps-pending-badge {
    font-size: 11px;
    color: #aaa;
    font-style: italic;
}

/* Round Type Badges */
.comps-round-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.comps-badge-prelim {
    background: #e3f2fd;
    color: #1565c0;
}

.comps-badge-semi {
    background: #fff3e0;
    color: #e65100;
}

.comps-badge-final {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Lists Tab */
.comps-list-group {
    margin-bottom: 16px;
}

.comps-list-group-header {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.comps-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.comps-list-item:first-of-type { border-radius: 8px 8px 0 0; }
.comps-list-item:last-of-type { border-radius: 0 0 8px 8px; border-bottom: none; }
.comps-list-item:only-of-type { border-radius: 8px; }

.comps-list-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Schedule Tab */
.comps-schedule-day {
    margin-bottom: 16px;
}

.comps-schedule-day-header {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.comps-schedule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.comps-schedule-item:first-of-type { border-radius: 8px 8px 0 0; }
.comps-schedule-item:last-of-type { border-radius: 0 0 8px 8px; border-bottom: none; }
.comps-schedule-item:only-of-type { border-radius: 8px; }

.comps-schedule-time {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 44px;
    font-variant-numeric: tabular-nums;
}

.comps-schedule-info {
    flex: 1;
    min-width: 0;
}

.comps-schedule-name {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comps-schedule-meta {
    font-size: 12px;
    display: flex;
    gap: 4px;
}

/* Results Table in Modal */
.comps-result-table {
    font-size: 13px;
}

.comps-result-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
    padding: 8px 6px;
}

.comps-result-table td {
    padding: 8px 6px;
    vertical-align: middle;
}

.comps-result-top3 {
    background: #fffde7 !important;
}

.comps-result-scratched {
    opacity: 0.5;
    text-decoration: line-through;
}

.comps-judge-col {
    min-width: 28px;
    max-width: 36px;
    font-size: 12px;
}

.fw-500 {
    font-weight: 500;
}

/* Judges Legend */
.comps-judges-legend {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.comps-judge-tag {
    font-size: 11px;
    color: #666;
    background: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #eee;
}

/* Marshalling / Heat sections */
.comps-heat-section {
    border-bottom: 1px solid #e0e0e0;
}

.comps-heat-section:last-child {
    border-bottom: none;
}

.comps-heat-header {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--top-bar-bg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comps-heat-columns {
    display: flex;
}

.comps-heat-col {
    flex: 1;
    border-right: 1px solid #f0f0f0;
}

.comps-heat-col:last-child {
    border-right: none;
}

.comps-heat-col-title {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.comps-dancer-row {
    padding: 6px 12px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comps-dancer-row:last-child {
    border-bottom: none;
}

.comps-bib {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    min-width: 32px;
    font-variant-numeric: tabular-nums;
}

.comps-scratched {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Responsive */
@media (max-width: 360px) {
    .comps-tab-btn {
        padding: 10px 6px;
        font-size: 12px;
    }
    .comps-tab-btn i {
        font-size: 18px;
    }
    .comps-judge-col {
        min-width: 22px;
        font-size: 10px;
    }
}
