/**
 * Athletic Events Frontend Styles
 */

:root {
    --ae-primary-color: #0073aa;
    --ae-secondary-color: #23282d;
    --ae-font-family: inherit;
}

/* Carousel Styles */
.ae-carousel-wrapper {
    font-family: var(--ae-font-family);
    margin: 20px 0;
    position: relative;
    display: flex;
    align-items: center;
}

.ae-carousel-nav {
    background: transparent;
    color: #333;
    border: none;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: color 0.3s ease;
}

.ae-carousel-nav:hover {
    color: #000;
}

.ae-carousel-nav:disabled {
    color: #CCC;
    cursor: not-allowed;
}

.ae-carousel-nav .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.ae-carousel-nav.ae-prev {
    left: -60px;
}

.ae-carousel-nav.ae-next {
    right: -60px;
}

.ae-carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.ae-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 20px;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

/* Event Wrapper */
.ae-event-wrapper {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 250px;
}

/* Event Card Styles - Minimal */
.ae-event-card.ae-minimal {
    padding: 15px 20px;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ae-event-wrapper.ae-has-border {
    border-right: 2px solid #e0e0e0;
}

.ae-minimal .ae-card-datetime {
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ae-minimal .ae-card-sport {
    font-size: 80%;
    margin-bottom: 4px;
    color: var(--ae-secondary-color);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ae-minimal .ae-card-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    line-height: 1.2;
    white-space: nowrap;
}

.ae-minimal .ae-team-name {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
}

.ae-minimal .ae-score {
    text-align: right;
    font-weight: bold;
    flex: 0 0 auto;
}

.ae-minimal .ae-card-location {
    font-size: 80%;
    margin-top: 4px;
    color: #666;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ae-minimal .ae-card-location a {
    color: var(--ae-primary-color);
    text-decoration: none;
}

.ae-minimal .ae-card-location a:hover {
    text-decoration: underline;
}

/* Vertical Flex Styles */
.ae-vertical-flex-wrapper {
    font-family: var(--ae-font-family);
}


/* Events Container */
.ae-events-container {
    display: flex;
    flex-direction: column;
}

/* Background color spacing support */
.ae-vertical-flex-wrapper[data-bg-color] .ae-events-container {
    gap: 5px;
}

.ae-vertical-flex-wrapper[data-bg-color] .ae-event-row {
    border-radius: 4px;
}

/* Individual Event Row - Two Column Layout */
.ae-event-row {
    display: flex;
    align-items: stretch;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    gap: 15px;
}

.ae-event-row:nth-child(even) {
    background-color: #f9f9f9;
}

.ae-event-row:hover {
    background-color: #f0f0f0;
}

/* Icon Column - Fixed Width, Spans Full Height */
.ae-icon-cell {
    flex: 0 0 60px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.ae-icon-cell .dashicons {
    color: var(--ae-primary-color);
}

.ae-icon-cell .ae-sport-icon {
    object-fit: contain;
}

/* Content Column - Wrapping Container */
.ae-content-wrapper {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 15px;
    row-gap: 1px;  /* Very tight vertical spacing */
}

/* Content Items - Hybrid Fixed/Flex Approach */
.ae-date-cell {
    white-space: nowrap;
    flex: 0 0 180px;  /* Fixed width for consistent alignment */
}

.ae-sport-cell {
    white-space: nowrap;
    flex: 0 0 220px;  /* Fixed width for consistent alignment */
}

.ae-opponent-cell {
    white-space: nowrap;
    flex: 0 0 240px;  /* Fixed width for consistent alignment */
}

.ae-info-cell {
    white-space: nowrap;
    flex: 1 1 auto;   /* Flexible width for INFO columns */
    text-align: left; /* Right-align for consistent positioning */
}

.ae-info-cell .ae-ticket-link {
    display: block;
    text-align: right;
}

.ae-date-cell {
    font-weight: bold;
}

/* Load more button */
.ae-load-more-wrapper {
    margin-top: 20px;
    text-align: center;
}

.ae-load-more-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.ae-load-more-btn:hover {
    background-color: rgba(0, 115, 170, 0.1);
}


.ae-events-table a {
    color: var(--ae-primary-color);
    text-decoration: none;
}

.ae-events-table a:hover {
    text-decoration: underline;
}

/* Enhanced Responsive Design for Carousel */
/* Navigation arrow positioning adjusts for smaller screens */

@media (max-width: 1200px) {
    .ae-carousel-nav.ae-prev {
        left: -50px;
    }
    
    .ae-carousel-nav.ae-next {
        right: -50px;
    }
}

@media (max-width: 768px) {
    .ae-carousel-nav {
        padding: 8px 12px;
    }
    
    .ae-carousel-nav.ae-prev {
        left: -40px;
    }
    
    .ae-carousel-nav.ae-next {
        right: -40px;
    }
    
    .ae-event-card.ae-minimal {
        padding: 12px 15px;
    }
    
    .ae-events-table {
        font-size: 14px;
    }
    
    .ae-events-table th,
    .ae-events-table td {
        padding: 8px;
    }
    
    /* Smaller gap on tablet for better fit */
    .ae-event-row {
        gap: 10px;
    }
    
    .ae-content-wrapper {
        column-gap: 10px;
        row-gap: 1px;
    }
}


/* Mobile responsive - Enhanced two-column layout */
@media (max-width: 480px) {
    .ae-event-row {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        gap: 10px;
    }
    
    .ae-content-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    
    /* Remove fixed widths for natural mobile sizing */
    .ae-date-cell,
    .ae-sport-cell,
    .ae-opponent-cell,
    .ae-info-cell {
        flex: 0 0 auto;  /* Natural content width */
        text-align: left;  /* Left align all content */
    }
}

@media (max-width: 480px) {
    .ae-carousel-nav.ae-prev {
        left: -35px;
    }
    
    .ae-carousel-nav.ae-next {
        right: -35px;
    }
}

/* Loading State */
.ae-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.ae-loading .dashicons {
    animation: spin 1s linear infinite;
}

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

/* Sport Breadcrumb Shortcode Styles */
.ae-sport-breadcrumb {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.4;
}

.ae-sport-breadcrumb a {
    text-decoration: none;
    color: var(--ae-primary-color);
    transition: color 0.2s ease;
}

.ae-sport-breadcrumb a:hover {
    text-decoration: underline;
    color: var(--ae-secondary-color);
}

/* Non-linked breadcrumb items (organizational categories) */
.ae-sport-breadcrumb .ae-breadcrumb-no-link {
    color: inherit;
    cursor: default;
}

.ae-breadcrumb-separator {
    margin: 0 5px;
    opacity: 0.7;
    color: var(--ae-secondary-color);
}

.ae-sport-breadcrumb span {
    display: inline;
}

/* Responsive breadcrumb */
@media (max-width: 480px) {
    .ae-sport-breadcrumb {
        font-size: 12px;
    }
    
    .ae-breadcrumb-separator {
        margin: 0 3px;
    }
}

/* Sport Records Grid Styles */
.ae-sport-records-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 0;
    max-width: 100%;
}

.ae-sport-records-grid .ae-record-label {
    text-align: left;
    margin: 0;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ae-sport-records-grid .ae-record-value {
    text-align: right;
    margin: 0;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive sport records */
@media (max-width: 480px) {
    .ae-sport-records-grid {
        grid-template-columns: 60% 40%;
    }
}