/**
 * Race Results Frontend Styles
 */

/* ===================================
   Sub-tabs for My Races
   =================================== */

.my-races-subtabs {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.subtab-buttons {
    display: flex;
    gap: 8px;
}

.subtab-btn {
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #53585F;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subtab-btn:hover {
    border-color: #04132D;
    color: #04132D;
}

.subtab-btn.active {
    background: #04132D;
    border-color: #04132D;
    color: #fff;
}

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

/* ===================================
   My Results Container
   =================================== */

.my-results-container {
    padding: 0;
}

.results-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.sort-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #53585F;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: auto;
}

.sort-toggle-btn:hover {
    border-color: #04132D;
    color: #04132D;
}

.sort-toggle-btn .sort-icon {
    transition: transform 0.2s ease;
}

.sort-toggle-btn .sort-icon.asc {
    transform: scaleY(-1);
}

.add-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #96ff94;
    border: none;
    border-radius: 8px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #04132D;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 -2px 0 0 rgba(0, 0, 0, 0.1);
}

.add-result-btn:hover {
    background: #c2ff42;
}

.add-result-btn svg {
    flex-shrink: 0;
}

/* ===================================
   Results Table - Desktop
   =================================== */

.results-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.results-table thead {
    background: #f8f9fa;
}

.results-table th {
    padding: 14px 16px;
    text-align: left;
    font-family: "roc-grotesk", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.results-table td {
    padding: 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background: #fafafa;
}

/* Date format toggle: full on desktop, short on cards */
.date-short { display: none; }
.date-full  { display: inline; }

/* Column widths */
.results-table .col-date { width: 90px; }
.results-table .col-event { min-width: 160px; }
.results-table .col-distance { width: 80px; }
.results-table .col-time { width: 130px; }
.results-table .col-placing { width: 80px; text-align: center; }
.results-table .col-status { width: 100px; }
.results-table .col-actions { min-width: 160px; }

/* Distance value styling */
.distance-value {
    font-weight: 500;
    color: #374151;
}

.no-distance {
    color: #9ca3af;
}

.results-table th.col-placing,
.results-table td.col-placing {
    text-align: center;
}

/* Event link */
.event-link {
    color: #04132D;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.event-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.event-name-only {
    color: #374151;
}

/* Finish time with result link */
.time-with-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.finish-time {
    font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", "Droid Sans Mono", "Source Code Pro", monospace;
    font-weight: 500;
}

.result-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f3f4f6;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.result-link-btn:hover {
    background: #e5e7eb;
    color: #04132D;
}

/* Placing badge */
.placing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    background: #f0f9ff;
    border-radius: 6px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

.no-placing {
    color: #9ca3af;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-verified {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-unverified {
    background: #fee2e2;
    color: #991b1b;
}

/* Action Groups */
.action-groups {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px 6px;
    position: relative;
    max-width: 100%;
}

.action-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    padding: 0 4px;
    white-space: nowrap;
    line-height: 1;
}

.action-group-buttons {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.action-group-empty {
    font-size: 12px;
    color: #d1d5db;
    padding: 2px 6px;
}

/* Action buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.action-btn:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn svg {
    flex-shrink: 0;
}

.action-btn.action-edit:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.action-btn.action-photos.active {
    background: #04132D;
    border-color: #04132D;
    color: #fff;
}

/* Icon-only buttons (delete) */
.action-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.action-btn-icon:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Photos row */
.photos-row td {
    background: #f9fafb;
    padding: 20px 16px !important;
}

.result-photos-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.result-photos-gallery .photo-item {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-photos-gallery .photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-photos-gallery .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================================
   No Results Message
   =================================== */

.no-results-message {
    text-align: center !important;
    padding: 60px 20px;
    margin-top: 32px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

.no-results-icon {
    margin-bottom: 20px;
    color: #9ca3af;
}

.no-results-message h3 {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    font-stretch: normal !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: #374151 !important;
    margin: 0 0 8px 0 !important;
}

.no-results-message p {
    font-family: "roc-grotesk", sans-serif !important;
    font-size: 15px !important;
    font-stretch: normal !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    text-align: center !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

/* ===================================
   Result Modal
   =================================== */

.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.6);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: rgba(255,255,255,0.6) rgba(0,0,0,0.3);
}

.result-modal::-webkit-scrollbar {
    width: 14px;
}

.result-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.result-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 7px;
    border: 3px solid rgba(0, 0, 0, 0.3);
}

.result-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

.result-modal-scroll-wrapper {
    padding: 100px 20px 40px 20px;
    box-sizing: border-box;
}

.result-modal-overlay {
    display: none;
}

.result-modal-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

.result-modal-header h2 {
    font-family: "roc-grotesk", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #04132D;
    margin: 0;
    letter-spacing: 0.5px;
}

.result-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.result-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

body.modal-open,
html.modal-open {
    overflow: hidden !important;
    height: 100% !important;
}

/* ===================================
   Two-column desktop layout (all modals)
   =================================== */
@media (min-width: 1024px) {
    .result-modal .result-modal-scroll-wrapper {
        padding: 80px 20px 30px;
    }

    .result-modal-content .modal-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .result-modal-content .modal-col-left,
    .result-modal-content .modal-col-right {
        min-width: 0;
    }

    .review-modal-content .modal-col-right textarea {
        min-height: 200px;
    }

    .recap-modal-content .modal-col-left textarea {
        min-height: 300px;
    }
}

@media (max-width: 1023px) {
    .result-modal-content .modal-columns {
        display: block;
    }

    .result-modal-content {
        max-width: 100%;
    }

    .recap-modal .result-modal-content {
        max-width: 100%;
    }
}

/* ===================================
   Result Form
   =================================== */

.result-form {
    padding: 24px;
}

/* Result form layout — modal-columns handles the 2-col grid on desktop */
.result-form .modal-col-left,
.result-form .modal-col-right {
    text-align: left;
}

.result-form .form-row {
    margin-bottom: 16px;
}

.result-form .form-row:last-child {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    margin: 16px -24px -24px -24px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-align: left;
}

.form-row label .required {
    color: #ef4444;
}

.form-row label .photo-limit {
    font-weight: 400;
    color: #9ca3af;
}

.form-row input[type="text"],
.form-row input[type="date"],
.form-row input[type="url"],
.form-row input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #374151;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-row input:focus {
    outline: none;
    border-color: #04132D;
    box-shadow: 0 0 0 3px rgba(4, 19, 45, 0.1);
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
    text-align: left;
}

/* Event search */
.event-search-wrapper {
    position: relative;
}

.event-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}

.event-suggestion {
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f3f4f6;
}

.event-suggestion:last-child {
    border-bottom: none;
}

.event-suggestion:hover {
    background: #f9fafb;
}

.event-suggestion-title {
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.event-suggestion-date {
    font-size: 12px;
    color: #9ca3af;
}

/* Time inputs */
.time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-input-group input {
    width: 70px;
    text-align: center;
    padding: 12px 8px;
}

.time-label {
    font-size: 13px;
    color: #6b7280;
}

.time-separator {
    font-size: 18px;
    font-weight: 600;
    color: #9ca3af;
}

/* Photo upload */
.photo-upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    background: #fafafa;
}

.uploaded-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.uploaded-photos:empty {
    display: none;
}

.uploaded-photos .photo-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.uploaded-photos .photo-item .photo-preview {
    width: 100px;
    height: 80px;
    overflow: hidden;
}

.uploaded-photos .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-photos .photo-item .photo-name {
    width: 100%;
    padding: 6px 8px;
    font-size: 10px;
    color: #6b7280;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.uploaded-photos .photo-item .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.uploaded-photos .photo-item:hover .remove-photo {
    opacity: 1;
}

.uploaded-photos .photo-item.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    height: 80px;
    width: 100px;
}

.uploaded-photos .photo-item.loading .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top-color: #04132D;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.photo-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-upload-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Form actions - defined above with positioning */

.btn-cancel {
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-submit {
    padding: 12px 24px;
    background: #04132D;
    border: none;
    border-radius: 8px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: #0a1d3d;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===================================
   Card Layout (≤1199px)
   Kicks in before action boxes overflow
   =================================== */

@media (max-width: 1199px) {
    .my-races-subtabs {
        margin-bottom: 16px;
    }
    
    .subtab-buttons {
        width: 100%;
    }
    
    .subtab-btn {
        flex: 1;
        text-align: center;
        padding: 12px 16px;
    }
    
    /* Switch to card layout */
    .results-table-wrapper {
        overflow-x: hidden;
    }
    
    .results-table,
    .results-table thead,
    .results-table tbody {
        display: block;
        width: 100%;
    }
    
    .results-table thead {
        display: none;
    }
    
    .results-table {
        box-shadow: none;
        background: transparent;
    }
    
    /* ---- Each result row becomes a CSS Grid card ---- */
    .results-table tbody tr.result-row {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        grid-template-areas:
            "event    event    event"
            "date     distance status"
            "time     placing  ."
            "actions  actions  actions";
        gap: 0;
        margin-bottom: 16px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        border: 1px solid #e5e7eb;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .results-table tbody tr.result-row:hover {
        background: #fff;
    }
    
    /* Reset ALL column widths — must beat .results-table .col-* specificity */
    .results-table td.col-date,
    .results-table td.col-event,
    .results-table td.col-distance,
    .results-table td.col-time,
    .results-table td.col-placing,
    .results-table td.col-status,
    .results-table td.col-actions {
        width: auto !important;
        min-width: 0 !important;
        padding: 0;
        border-bottom: none;
        box-sizing: border-box;
    }
    
    /* Hide default ::before labels */
    .results-table td::before {
        display: none;
    }
    
    /* Short date for narrow, full date for wide */
    .date-short { display: inline; }
    .date-full  { display: none; }
    
    /* ---- Race name (spans full width) ---- */
    .results-table td.col-event {
        grid-area: event;
        padding: 14px 16px 6px;
    }
    
    .results-table td.col-event .event-link,
    .results-table td.col-event .event-name-only {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
    }
    
    /* ---- Data fields: 2 rows × 3 columns ---- */
    .results-table td.col-date,
    .results-table td.col-distance,
    .results-table td.col-time,
    .results-table td.col-placing {
        display: flex;
        flex-direction: column;
        gap: 1px;
        padding: 4px 16px 6px;
        font-size: 13px;
        color: #374151;
        font-weight: 500;
    }
    
    .results-table td.col-date     { grid-area: date; }
    .results-table td.col-distance { grid-area: distance; }
    .results-table td.col-time     { grid-area: time; }
    .results-table td.col-placing  { grid-area: placing; }
    
    /* Labels above values */
    .results-table td.col-date::before,
    .results-table td.col-distance::before,
    .results-table td.col-time::before,
    .results-table td.col-placing::before {
        display: block;
        font-weight: 600;
        font-size: 10px;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }
    
    .results-table td.col-date::before     { content: "DATE"; }
    .results-table td.col-distance::before { content: "DIST"; }
    .results-table td.col-time::before     { content: "TIME"; }
    .results-table td.col-placing::before  { content: "PLACE"; }
    
    .results-table td.col-placing .placing-badge {
        padding: 0;
        height: auto;
        min-width: unset;
        font-size: 13px;
        background: transparent;
        color: #0369a1;
    }
    
    /* ---- Status badge: top-right of data area ---- */
    .results-table td.col-status {
        grid-area: status;
        display: flex !important;
        align-items: flex-end;
        justify-content: flex-end;
        padding: 4px 16px 6px 4px !important;
    }
    
    .results-table td.col-status .status-badge {
        font-size: 10px;
        padding: 2px 6px;
        white-space: nowrap;
    }
    
    /* ---- Actions: full width, even padding both sides ---- */
    .results-table td.col-actions {
        grid-area: actions;
        padding: 10px 16px 12px 16px !important;
        border-top: 1px solid #f3f4f6;
    }
    
    .results-table td.col-actions .action-groups {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }
    
    .results-table td.col-actions .action-group {
        display: flex;
        align-items: center;
        gap: 4px;
        width: 100%;
    }
    
    .results-table td.col-actions .action-group-buttons {
        flex-wrap: wrap;
    }
    
    /* ---- Photos row: a separate <tr>, styled as block card continuation ---- */
    .photos-row {
        display: none; /* JS controls visibility */
    }
    
    .photos-row.photos-visible {
        display: block;
        margin-top: -17px; /* overlap with the result-row bottom margin */
        margin-bottom: 16px;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 12px 12px;
    }
    
    .photos-row td {
        display: block;
        width: 100%;
        padding: 12px 16px !important;
    }
    
    .result-photos-gallery .photo-item {
        width: 100px;
        height: 100px;
    }
    
    /* Modal on smaller screens */
    .result-modal-scroll-wrapper {
        padding: 80px 0 0 0;
    }
    
    .result-modal-content {
        min-height: calc(100vh - 80px);
        border-radius: 16px 16px 0 0;
        max-width: 100%;
        margin-bottom: 0;
    }
    
    .result-modal-header {
        border-radius: 16px 16px 0 0;
    }
    
    .result-form {
        padding: 20px 16px;
    }
    
    .form-actions {
        padding: 16px;
        border-radius: 0;
    }
    
    .form-actions .btn-cancel,
    .form-actions .btn-submit {
        flex: 1;
    }
    
    .time-input-group input {
        width: 60px;
    }
}

/* ===================================
   Small Mobile (≤480px)
   =================================== */

@media (max-width: 480px) {
    .results-header {
        flex-wrap: wrap;
        margin-bottom: 16px;
    }
    
    .sort-toggle-btn {
        order: 2;
        margin-right: 0;
        flex: 1;
    }
    
    .add-result-btn {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .no-results-message {
        padding: 40px 16px;
    }
    
    .uploaded-photos .photo-item {
        width: 80px;
    }
    
    .uploaded-photos .photo-item .photo-preview {
        width: 80px;
        height: 60px;
    }
    
    .results-table td.col-event .event-link,
    .results-table td.col-event .event-name-only {
        font-size: 15px;
    }
    
    /* Smaller badge on tiny screens */
    .results-table td.col-status .status-badge {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .action-group-label {
        min-width: 46px;
    }
    
    /* Compact time link */
    .time-with-link {
        gap: 4px;
    }
    
    .result-link-btn {
        width: 22px;
        height: 22px;
    }
    
    .result-link-btn svg {
        width: 12px;
        height: 12px;
    }
}

/* ===================================
   Review Modal Styles
   =================================== */

.review-modal-content {
    max-width: 1100px !important;
}

.review-form {
    padding: 24px;
}

.review-event-header {
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.reviewing-label {
    font-size: 13px;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}

.review-event-name {
    font-family: "roc-grotesk", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #04132D;
}

/* Ratings Section */
.ratings-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 16px;
    margin-bottom: 20px;
}

.rating-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rating-row.required-rating {
    grid-column: 1 / -1;
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 8px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rating-row label {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.rating-row label .required {
    color: #ef4444;
}

.star-rating-container {
    display: flex;
    gap: 2px;
}

.star-rating-input {
    font-size: 20px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.star-rating-input:hover,
.star-rating-input.hovered {
    color: #fbbf24;
    transform: scale(1.1);
}

.star-rating-input.selected {
    color: #f59e0b;
}

.required-rating .star-rating-input {
    font-size: 26px;
}

/* Review Text Section */
.review-text-section {
    margin-bottom: 16px;
}

.review-text-section label {
    display: block;
    margin-bottom: 6px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.review-text-section textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.review-text-section textarea:focus {
    outline: none;
    border-color: #04132D;
    box-shadow: 0 0 0 3px rgba(4, 19, 45, 0.1);
}

.review-text-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

#word-count {
    font-size: 13px;
    color: #9ca3af;
}

#word-count.over-limit {
    color: #ef4444;
    font-weight: 500;
}

/* Action button states for reviews */
.action-btn.action-review.has-review {
    color: #f59e0b;
    border-color: #f59e0b;
    position: relative;
}

.action-btn.action-review.has-review svg path {
    fill: #f59e0b;
    stroke: #f59e0b;
}

.action-btn.action-review.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Review status indicator */
.review-status-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.review-status-indicator.pending {
    background: #fbbf24;
}

.review-status-indicator.live {
    background: #22c55e;
}

.review-status-indicator.archived {
    background: #9ca3af;
}

/* Delete review button */
.action-btn.action-delete-review,
.action-btn-icon.action-delete-review {
    color: #d1d5db;
    border-color: transparent;
}

.action-btn.action-delete-review:hover,
.action-btn-icon.action-delete-review:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Review helpful count */
.review-helpful-count,
.recap-helpful-count {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 10px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 11px;
    font-weight: 500;
}

.review-helpful-count svg,
.recap-helpful-count svg {
    flex-shrink: 0;
}

/* Recap button styling */
.action-btn.action-recap.has-recap {
    color: #6366f1;
    border-color: #6366f1;
    position: relative;
}

.action-btn.action-recap.has-recap svg path:first-child {
    fill: #6366f1;
    stroke: #6366f1;
}

/* Recap status indicator */
.recap-status-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.recap-status-indicator.pending {
    background: #fbbf24;
}

.recap-status-indicator.live {
    background: #22c55e;
}

.recap-status-indicator.archived {
    background: #9ca3af;
}

/* Delete recap button */
.action-btn.action-delete-recap,
.action-btn-icon.action-delete-recap {
    color: #d1d5db;
    border-color: transparent;
}

.action-btn.action-delete-recap:hover,
.action-btn-icon.action-delete-recap:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Recap modal specific styles */
.recap-modal-content {
    padding: 24px;
}

/* Recap modal content header - handled by .recap-modal selector */

.recap-event-header {
    text-align: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.recap-text-section {
    margin-bottom: 16px;
}

.recap-text-section label {
    display: block;
    margin-bottom: 8px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #04132D;
}

.recap-text-section label .required {
    color: #ef4444;
}

.recap-text-section textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    resize: vertical;
    min-height: 160px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.recap-text-section textarea:focus {
    outline: none;
    border-color: #04132D;
    box-shadow: 0 0 0 3px rgba(4, 19, 45, 0.1);
}

.recap-text-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

#recap-word-count {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    color: #9ca3af;
}

#recap-word-count.over-limit {
    color: #ef4444;
    font-weight: 600;
}

.recap-photos-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.recap-photos-section > label {
    display: block;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #04132D;
    margin-bottom: 6px;
}

.recap-visibility-section {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.recap-visibility-section .toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.recap-visibility-section .toggle-text {
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #04132D;
}

.recap-visibility-section input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    accent-color: #04132D;
    opacity: 1 !important;
    position: relative !important;
    margin: 0;
    border: 2px solid #04132D;
    border-radius: 4px;
}

.visibility-help {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    color: #6b7280;
    margin: 10px 0 0 32px;
}

.recap-form .form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Recap Modal specific - reuse result-modal base styles */
.recap-modal .result-modal-scroll-wrapper {
    padding: 80px 20px 30px;
}

.recap-modal .result-modal-content {
    max-width: 1100px;
    margin: 0 auto 40px;
    background: #fff;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
}

.recap-modal .result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    margin: 0;
}

.recap-modal .result-modal-header h2 {
    font-family: "roc-grotesk", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #04132D;
    margin: 0;
    letter-spacing: 0.5px;
}

.recap-modal .recap-form {
    padding: 24px;
}

/* Review photos selection section */
.review-photos-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.review-photos-section > label {
    display: block;
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #04132D;
    margin-bottom: 4px;
}

.review-photos-help {
    font-family: "roc-grotesk", sans-serif;
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.review-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.review-photo-select-item {
    position: relative;
    width: 70px;
    height: 70px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.review-photo-select-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.review-photo-select-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.review-photo-select-item .photo-check-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(255,255,255,0.9);
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.review-photo-select-item .photo-check-indicator::after {
    content: '';
    width: 10px;
    height: 10px;
    background: transparent;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.review-photo-select-item input[type="checkbox"]:checked ~ .photo-check-indicator {
    background: #22c55e;
    border-color: #22c55e;
}

.review-photo-select-item input[type="checkbox"]:checked ~ .photo-check-indicator::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    background: transparent;
}

.review-photo-select-item input[type="checkbox"]:not(:checked) ~ img {
    opacity: 0.5;
}

/* Responsive for review modal */
@media (max-width: 600px) {
    .ratings-section {
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
    }
    
    .rating-row.required-rating {
        grid-column: 1 / -1;
    }
    
    .star-rating-input {
        font-size: 18px;
    }
    
    .required-rating .star-rating-input {
        font-size: 22px;
    }
    
    .review-photos-grid {
        gap: 8px;
    }
    
    .review-photo-select-item {
        width: 60px;
        height: 60px;
    }
}

/* ===================================
   Event Page Reviews Section
   =================================== */

.event-reviews-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.event-reviews-section .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.event-reviews-section .event-reviews-heading {
    font-family: "roc-grotesk", sans-serif;
    font-size: 32px;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: -0.64px;
    text-align: left;
    margin: 0 0 24px 0;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
}

.reviews-title-area h2 {
    font-family: "roc-grotesk", sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #04132D;
    margin: 0 0 12px 0;
    letter-spacing: 1px;
}

.sign-in-to-review {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.sign-in-to-review:hover {
    border-color: #04132D;
    color: #04132D;
}

.sign-in-to-review svg {
    flex-shrink: 0;
}

.ratings-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.overall-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-ratings-summary {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 6px 24px;
    justify-content: start;
}

.category-rating-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.category-label {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    color: #6b7280;
}

.category-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.category-stars .star {
    color: #d1d5db;
}

.category-stars .star.filled {
    color: #f59e0b;
}

.category-stars .star.filled path {
    fill: #f59e0b;
    stroke: #f59e0b;
}

.category-avg {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #04132D;
    margin-left: 4px;
}

.overall-rating .stars-display {
    display: flex;
    gap: 3px;
}

.overall-rating .stars-display .star {
    color: #d1d5db;
}

.overall-rating .stars-display .star.filled {
    color: #f59e0b;
    fill: #f59e0b;
}

.overall-rating .stars-display .star.filled path {
    fill: #f59e0b;
}

.rating-text {
    font-family: "roc-grotesk", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #04132D;
}

.review-count {
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    color: #6b7280;
}

.reviews-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviews-sort label {
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.reviews-sort select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    color: #04132D;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.reviews-sort select:focus {
    outline: none;
    border-color: #04132D;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reviews-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.no-reviews p {
    font-family: "roc-grotesk", sans-serif;
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* Review Card */
.review-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.review-user-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar a:hover img {
    opacity: 0.9;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.user-name {
    font-family: "roc-grotesk", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #04132D;
    text-decoration: none;
}

a.user-name:hover {
    color: #2563eb;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #ecfdf5;
    color: #059669;
    border-radius: 20px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 12px;
    font-weight: 500;
}

.verified-badge svg {
    flex-shrink: 0;
}

.race-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.race-year,
.race-distance {
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    color: #6b7280;
}

.race-info span:not(:last-child)::after {
    content: "•";
    margin-left: 12px;
    color: #d1d5db;
}

/* Review Ratings */
.review-ratings {
    margin-bottom: 16px;
}

.main-rating {
    margin-bottom: 10px;
}

.main-rating .stars-display {
    display: flex;
    gap: 3px;
}

.main-rating .star {
    color: #d1d5db;
}

.main-rating .star.filled {
    color: #f59e0b;
    fill: #f59e0b;
}

.main-rating .star.filled path {
    fill: #f59e0b;
}

.sub-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.sub-rating-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sub-rating-label {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    color: #6b7280;
}

.sub-rating-value {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #04132D;
}

/* Review Text */
.review-text {
    margin-bottom: 16px;
}

.review-text p {
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* Review Photos */
.review-photos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.review-photo-link {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.review-photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.review-photo-link:hover img {
    transform: scale(1.05);
}

/* Review Actions */
.review-actions {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.like-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.like-review-btn:hover {
    border-color: #04132D;
    color: #04132D;
}

.like-review-btn.liked {
    background: #04132D;
    border-color: #04132D;
    color: #fff;
}

.like-review-btn svg {
    flex-shrink: 0;
}

.like-count-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    color: #6b7280;
}

/* Responsive for event reviews */
@media (max-width: 600px) {
    .event-reviews-section {
        padding: 40px 0;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .reviews-title-area h2 {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .category-ratings-summary {
        grid-template-columns: repeat(2, auto);
        gap: 4px 16px;
    }
    
    .category-label {
        font-size: 12px;
    }
    
    .category-stars .star {
        width: 12px;
        height: 12px;
    }
    
    .category-avg {
        font-size: 12px;
    }
    
    .reviews-sort {
        width: 100%;
    }
    
    .reviews-sort select {
        flex: 1;
    }
    
    .review-card {
        padding: 18px;
    }
    
    .user-avatar img {
        width: 42px;
        height: 42px;
    }
    
    .sub-ratings {
        gap: 6px 12px;
    }
    
    .review-photo-link {
        width: 60px;
        height: 60px;
    }
}

/* ===================================
   Reviews/Recaps Toggle
   =================================== */

.reviews-recaps-toggle {
    display: inline-flex;
    gap: 0;
    margin-bottom: 28px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 5px;
    border: none !important;
    box-shadow: none;
}

.reviews-recaps-toggle .toggle-btn {
    padding: 12px 24px;
    border: 0 !important;
    border-style: none !important;
    border-width: 0 !important;
    border-color: transparent !important;
    background: transparent;
    border-radius: 10px;
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
    outline-style: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    line-height: 1.4;
}

.reviews-recaps-toggle .toggle-btn:hover {
    color: #04132D;
    background: rgba(4, 19, 45, 0.05);
}

.reviews-recaps-toggle .toggle-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.reviews-recaps-toggle .toggle-btn:focus-visible {
    outline: none !important;
}

.reviews-recaps-toggle .toggle-btn.active {
    background: #04132D;
    color: #fff;
    box-shadow: 0 2px 8px rgba(4, 19, 45, 0.2) !important;
}

.reviews-recaps-toggle .toggle-btn.active:hover {
    background: #04132D;
}

.reviews-recaps-toggle .toggle-btn .count {
    font-weight: 500;
    margin-left: 4px;
    opacity: 0.7;
}

.reviews-recaps-toggle .toggle-btn.active .count {
    opacity: 0.8;
}

/* Tab content for Reviews/Recaps toggle on event page */
.event-reviews-section .tab-content {
    display: none;
}

.event-reviews-section .tab-content.active {
    display: block;
}

/* ===================================
   Recap Cards for Event Page
   =================================== */

.recaps-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.recaps-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

.recaps-count {
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

.recap-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.recap-user-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.race-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.race-stats .stat {
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}

.recap-excerpt {
    margin-bottom: 12px;
}

.recap-excerpt p {
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

.expand-recap-btn,
.collapse-recap-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-family: "roc-grotesk", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #04132D;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-recap-btn:hover,
.collapse-recap-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.recap-full {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    margin-top: 16px;
}

.recap-text {
    font-family: "roc-grotesk", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.recap-text p {
    margin: 0 0 1em 0;
}

.recap-text p:last-child {
    margin-bottom: 0;
}

.recap-photos-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.recap-photos-gallery .review-photo-link {
    width: 100px;
    height: 100px;
}

.collapse-recap-btn {
    margin-top: 16px;
}

.recap-actions {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    margin-top: 16px;
}

.like-recap-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-family: "roc-grotesk", sans-serif;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.like-recap-btn:hover {
    border-color: #04132D;
    color: #04132D;
}

.like-recap-btn.liked {
    background: #04132D;
    border-color: #04132D;
    color: #fff;
}

.like-recap-btn svg {
    flex-shrink: 0;
}

/* Responsive for toggle and recaps */
@media (max-width: 600px) {
    .reviews-recaps-toggle {
        max-width: 100%;
    }
    
    .reviews-recaps-toggle .toggle-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .recap-card {
        padding: 18px;
    }
    
    .race-stats .stat {
        font-size: 12px;
        padding: 2px 6px;
    }
    
    .recap-photos-gallery .review-photo-link {
        width: 80px;
        height: 80px;
    }
}
