/**
 * Public-facing styles
 *
 * Styles for competition calendar, results tables, and public pages.
 */

/* ========================================
   Calendar Styles
   ======================================== */

.fpetarco-calendar {
    margin: 20px 0;
}

.fpetarco-calendar-header h2 {
    margin-bottom: 30px;
    text-align: center;
}

/* Two-column layout for Indoor/Outdoor */
.fpetarco-calendar-columns {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.fpetarco-calendar-column {
    flex: 1;
    min-width: 300px;
}

.fpetarco-column-title {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
}

.fpetarco-calendar-section {
    margin-bottom: 30px;
}

.fpetarco-calendar-section h4 {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ddd;
    font-size: 16px;
}

.fpetarco-calendar-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.fpetarco-no-competitions {
    color: #666;
    font-style: italic;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    text-align: center;
}

/* Stack columns vertically on mobile */
@media (max-width: 768px) {
    .fpetarco-calendar-columns {
        flex-direction: column;
    }
    
    .fpetarco-calendar-column {
        min-width: 100%;
    }
}

.fpetarco-competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.fpetarco-competition-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.fpetarco-competition-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fpetarco-competition-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.fpetarco-status-upcoming .fpetarco-competition-status-badge {
    background: #e3f2fd;
    color: #1976d2;
}

.fpetarco-status-in_progress .fpetarco-competition-status-badge {
    background: #fff3e0;
    color: #f57c00;
}

.fpetarco-status-completed .fpetarco-competition-status-badge {
    background: #e8f5e9;
    color: #388e3c;
}

.fpetarco-competition-title {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.fpetarco-competition-meta p {
    margin: 5px 0;
    font-size: 14px;
}

.fpetarco-competition-actions {
    margin-top: 15px;
}

/* ========================================
   Results Styles
   ======================================== */

.fpetarco-results {
    margin: 20px 0;
}

.fpetarco-results-header {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.fpetarco-results-header h2 {
    margin-top: 0;
}

.fpetarco-competition-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.fpetarco-competition-info p {
    margin: 0;
}

/* Filters */
.fpetarco-results-filters {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.fpetarco-results-filters h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.fpetarco-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.fpetarco-filter-group {
    display: flex;
    flex-direction: column;
}

.fpetarco-filter-group label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.fpetarco-filter-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.fpetarco-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Results Table */
.fpetarco-results-table-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.fpetarco-results-summary {
    margin-bottom: 20px;
}

.fpetarco-results-table-wrapper {
    overflow-x: auto;
}

.fpetarco-results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.fpetarco-results-table caption {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

.fpetarco-results-table th,
.fpetarco-results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.fpetarco-results-table th {
    background: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.fpetarco-results-table tbody tr:hover {
    background: #fafafa;
}

.fpetarco-results-table tbody tr:nth-child(odd) {
    background: #f9f9f9;
}

.fpetarco-results-table tbody tr:nth-child(odd):hover {
    background: #f5f5f5;
}

/* Rank column */
.fpetarco-rank {
    font-weight: 600;
    font-size: 16px;
}

.fpetarco-medal {
    font-size: 20px;
}

/* Athlete column with photo */
.fpetarco-athlete-cell,
.fpetarco-club-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 210px;
}

.fpetarco-athlete-photo,
.fpetarco-club-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fpetarco-club-logo {
    border-radius: 4px;
}

/* Score column */
.fpetarco-score {
    color: #1976d2;
    font-size: 16px;
}

/* Buttons */
.fpetarco-button {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fpetarco-button:hover {
    background: #f5f5f5;
    border-color: #999;
}

.fpetarco-button-primary {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.fpetarco-button-primary:hover {
    background: #1565c0;
    border-color: #1565c0;
    color: #fff;
}

/* Loading state */
.fpetarco-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Messages */
.fpetarco-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #c62828;
}

.fpetarco-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Screen reader only */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

/* ========================================
   Card-Based Results Layout
   ======================================== */

.fpetarco-results-cards {
    display: grid;
    gap: 0.75rem;
}

.result-card {
    display: grid;
    grid-template-columns: 60px 80px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    align-items: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

/* Rank column */
.result-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.result-medal {
    width: 32px;
    height: 32px;
}

.result-rank-number {
    font-size: 1.125rem;
    font-weight: 600;
    color: #666;
}

/* Athlete photo */
.result-athlete-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

.result-photo-placeholder {
    background: #f5f5f5;
}

/* Info column */
.result-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.result-athlete-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-club {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.result-club-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.result-club-name {
    font-size: 0.95rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-category-badge {
    font-size: 0.875rem;
    color: #0066cc;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Score column */
.result-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.result-score-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0066cc;
    line-height: 1;
}

.result-score-details {
    font-size: 0.875rem;
    color: #666;
    white-space: nowrap;
}

/* Category section styling */
.fpetarco-category-section {
    margin-bottom: 3rem;
}

.fpetarco-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    background: #f5f5f5;
    padding: 1rem 1.5rem;
    border-left: 5px solid #0066cc;
    margin-bottom: 1.5rem;
}

.fpetarco-category-count {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
    margin-left: 0.5rem;
}

.fpetarco-category-results {
    /* Container for cards */
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    /* Card layout changes for mobile */
    .result-card {
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto;
        gap: 0.75rem;
    }
    
    .result-rank {
        grid-column: 1;
        grid-row: 1;
    }
    
    .result-athlete-photo {
        grid-column: 1;
        grid-row: 2;
        width: 60px;
        height: 60px;
    }
    
    .result-info {
        grid-column: 2;
        grid-row: 1 / 3;
    }
    
    .result-score {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: start;
        margin-top: 0;
    }
    
    .result-medal {
        width: 28px;
        height: 28px;
    }
    
    .result-score-value {
        font-size: 1.5rem;
    }
    
    .result-athlete-name {
        font-size: 1rem;
    }
    
    .result-category-badge {
        font-size: 0.8rem;
    }
    .fpetarco-competitions-grid {
        grid-template-columns: 1fr;
    }

    .fpetarco-competition-info {
        flex-direction: column;
        gap: 10px;
    }

    .fpetarco-filter-form {
        grid-template-columns: 1fr;
    }

    .fpetarco-results-table-wrapper {
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .fpetarco-athlete-photo,
    .fpetarco-club-logo {
        width: 32px;
        height: 32px;
    }

    .fpetarco-results-table th,
    .fpetarco-results-table td {
        padding: 8px;
        font-size: 14px;
    }

    .fpetarco-filter-actions {
        flex-direction: column;
    }

    .fpetarco-button {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   Accessibility (WCAG 2.1 AA)
   ======================================== */

/* Focus styles */
.fpetarco-button:focus,
select:focus,
input:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .fpetarco-competition-card {
        border-width: 2px;
    }

    .fpetarco-results-table th {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fpetarco-competition-card,
    .fpetarco-button {
        transition: none;
    }
}

/* ========================================
   Single Competition Page Styles
   ======================================== */

.fpetarco-single-competition {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.fpetarco-competition-status {
    margin: 15px 0;
}

.fpetarco-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.fpetarco-status-upcoming .fpetarco-status-badge {
    background: #e3f2fd;
    color: #1976d2;
}

.fpetarco-status-in_progress .fpetarco-status-badge {
    background: #fff3e0;
    color: #f57c00;
}

.fpetarco-status-completed .fpetarco-status-badge {
    background: #e8f5e9;
    color: #388e3c;
}

.fpetarco-competition-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.fpetarco-detail-item {
    margin: 10px 0;
    font-size: 16px;
}

.fpetarco-detail-label {
    font-weight: 600;
    margin-right: 8px;
}

.fpetarco-competition-description {
    margin: 20px 0;
    line-height: 1.6;
}

/* ========================================
   Results Grouped by Category Styles
   ======================================== */

.fpetarco-results-grouped {
    margin: 30px 0;
}

/* Bow Type Section - Top Level */
.fpetarco-bow-type-section {
    margin-bottom: 3rem;
}

.fpetarco-bow-type-header {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.fpetarco-bow-type-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* Gender Section - Second Level */
.fpetarco-gender-section {
    margin-bottom: 2rem;
    margin-left: 1rem;
}

.gender-section {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid #e0e0e0;
}

.gender-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.fpetarco-gender-header {
    background: #f5f5f5;
    padding: 1rem 1.5rem;
    border-left: 4px solid #0066cc;
    margin-bottom: 1.5rem;
}

.fpetarco-gender-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Competition Type Section - Third Level */
.fpetarco-competition-type-section {
    margin-bottom: 1.5rem;
    margin-left: 1rem;
}

.fpetarco-competition-type-header {
    background: #e8f4f8;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid #0066cc;
    margin-bottom: 1rem;
}

.fpetarco-competition-type-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Category Section - Fourth Level (existing, refined) */
.fpetarco-category-section {
    margin-bottom: 1.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.fpetarco-category-title {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #1976d2;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.fpetarco-category-count {
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin-left: 10px;
}

.fpetarco-category-results {
    overflow-x: auto;
}

.fpetarco-category-section .fpetarco-results-table {
    width: 100%;
    margin-top: 0;
}

/* Medal highlights for grouped results */
.fpetarco-category-section .fpetarco-rank-1 {
    background: #fff9e6;
}

.fpetarco-category-section .fpetarco-rank-2 {
    background: #f5f5f5;
}

.fpetarco-category-section .fpetarco-rank-3 {
    background: #fff4e6;
}

.category-section .category-header{
    margin-bottom: 1.5rem;
    background: rgb(245, 245, 245);
    padding: 1rem 1.5rem;
    border-left: 5px solid rgb(0, 102, 204);
}
/* ==========================================================================
   Record Cards for Competition Results - Matching Records Page Pattern
   ========================================================================== */

.record-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.record-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.record-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #0066cc;
}

/* Record Category Header - Prominent Badge */
.record-category-header {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.record-category-badge {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0066cc;
    letter-spacing: 0.3px;
}

/* Record Card Content - Main Area */
.record-card-content {
    display: grid;
    grid-template-columns: 50px 70px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

/* Result Rank (Medals or Numbers) */
.result-rank {
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-rank img.result-medal {
    width: 40px;
    height: 40px;
}

.result-rank-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #666;
}

/* Athlete Photo */
.record-card .athlete-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

/* Record Info */
.record-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.record-info .athlete-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.record-info a.athlete-name:hover {
    color: #0066cc;
}

.record-info .athlete-club {
    font-size: 0.95rem;
    color: #666;
}

/* Record Score */
.record-score {
    text-align: right;
}

.record-score .score-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0066cc;
    line-height: 1;
}

.record-score .score-label {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.25rem;
}

/* ========================================
   Single Athlete Page Styles
   ======================================== */

.fpetarco-single-athlete {
    margin: 20px 0;
}

.fpetarco-athlete-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.fpetarco-athlete-photo-large {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.fpetarco-athlete-info {
    flex: 1;
}

.fpetarco-athlete-info h1 {
    margin-top: 0;
}

.fpetarco-athlete-meta {
    margin: 15px 0;
}

.fpetarco-athlete-meta-item {
    margin: 8px 0;
    font-size: 16px;
}

.fpetarco-athlete-categories {
    margin: 30px 0;
}

.fpetarco-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.fpetarco-category-badge {
    display: inline-block;
    padding: 8px 15px;
    background: #e3f2fd;
    border: 1px solid #1976d2;
    border-radius: 4px;
    font-size: 14px;
    color: #1976d2;
}

.fpetarco-athlete-history {
    margin: 30px 0;
}

.fpetarco-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.fpetarco-history-table th,
.fpetarco-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.fpetarco-history-table th {
    background: #f5f5f5;
    font-weight: 600;
}

@media (max-width: 768px) {
    .fpetarco-athlete-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .fpetarco-category-section {
        padding: 15px;
    }
    
    .fpetarco-category-title {
        font-size: 16px;
    }
}

/* ========================================
   Athlete Competition History Card Layout
   ======================================== */

.fpetarco-history-cards {
    display: grid;
    gap: 0.75rem;
    margin-top: 20px;
}

.history-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    align-items: center;
    transition: all 0.3s ease;
}

.history-card:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

/* Personal best highlighting for history cards */
.history-card.fpetarco-personal-best {
    background: #fff8e1;
    border-color: #ffc107;
}

.history-card.fpetarco-personal-best:hover {
    background: #fff3cd;
    border-color: #ffb300;
}

/* Rank/Medal column */
.history-rank {
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-medal {
    width: 40px;
    height: 40px;
}

.history-rank-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666;
}

/* Competition info column */
.history-competition-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.history-competition-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-competition-name:hover {
    text-decoration: underline;
    color: #004a99;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #666;
}

.history-date {
    font-weight: 500;
}

.history-location {
    color: #888;
}

.history-separator {
    color: #ccc;
}

.history-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.history-type-badge.indoor {
    background: #ff6b35;
    color: #fff;
}

.history-type-badge.outdoor {
    background: #00a651;
    color: #fff;
}

.history-category {
    font-size: 0.875rem;
    color: #0066cc;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Score column */
.history-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    white-space: nowrap;
}

.history-score-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0066cc;
    line-height: 1;
}

.history-score-details {
    font-size: 0.875rem;
    color: #666;
}

/* Personal best badge styling */
.fpetarco-pb-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: #ffc107;
    color: #333;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    vertical-align: middle;
}

/* Responsive Design for History Cards */
@media (max-width: 768px) {
    .history-card {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .history-rank {
        grid-column: 1;
        grid-row: 1;
    }
    
    .history-medal {
        width: 32px;
        height: 32px;
    }
    
    .history-rank-number {
        font-size: 1.25rem;
    }
    
    .history-competition-info {
        grid-column: 2;
        grid-row: 1 / 3;
        gap: 0.35rem;
    }
    
    .history-competition-name {
        font-size: 1rem;
    }
    
    .history-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .history-category {
        white-space: normal;
        line-height: 1.4;
    }
    
    .history-score {
        grid-column: 2;
        grid-row: 3;
        align-items: flex-start;
    }
    
    .history-score-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .history-card {
        gap: 0.5rem;
        padding: 0.65rem;
    }
    
    .history-competition-name {
        font-size: 0.95rem;
    }
    
    .history-meta {
        font-size: 0.85rem;
    }
    
    .history-type-badge {
        font-size: 0.75rem;
        padding: 1px 6px;
    }
    
    .history-score-value {
        font-size: 1.35rem;
    }
    
    .history-score-details {
        font-size: 0.8rem;
    }
}

/* ========================================
   Competition History Split Layout
   ======================================== */

.fpetarco-history-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 20px;
}

.fpetarco-history-column {
    min-width: 0; /* Prevent grid blowout */
}

.column-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.column-heading .history-type-badge {
    font-size: 1rem;
    padding: 4px 12px;
}

.column-heading .score-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
}

/* Indoor column specific styles */
.indoor-column .column-heading {
    border-bottom-color: #ff6b35;
}

/* Outdoor column specific styles */
.outdoor-column .column-heading {
    border-bottom-color: #00a651;
}

/* Responsive: Stack columns on mobile */
@media (max-width: 768px) {
    .fpetarco-history-split-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .column-heading {
        font-size: 1.15rem;
    }

    .column-heading .history-type-badge {
        font-size: 0.9rem;
        padding: 3px 10px;
    }

    .column-heading .score-count {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .fpetarco-history-split-container {
        gap: 2rem;
    }

    .column-heading {
        font-size: 1.05rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
