/**
 * Match Ribbon Styles
 *
 * @package Astra Child
 * @since 1.0.0
 */

/* ==========================================================================
   Match Ribbon Container
   ========================================================================== */
.match-ribbon-box {
    height: 140px;
}
.match-ribbon-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    background: var(--box-bg, #fff);
    border-radius: var(--box-border-radius, 8px);
    box-shadow: var(--box-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
    border: var(--box-border, 1px solid rgba(0, 0, 0, 0.06));
    /*margin-bottom: var(--component-gap, 20px);*/
    overflow: hidden;
}

.match-ribbon {
    display: flex;
    align-items: stretch;
    position: relative;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.match-ribbon-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    min-height: 120px;
}

.ribbon-loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--ast-global-color-0, #1a2a4a);
    border-radius: 50%;
    animation: ribbon-spin 0.8s linear infinite;
}

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

.ribbon-loader-text {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.match-ribbon-loader.ribbon-empty {
    padding: 30px 20px;
}

.ribbon-empty-text {
    font-size: 0.9rem;
    color: #9ca3af;
    font-style: italic;
}

/* ==========================================================================
   Scroll Buttons
   ========================================================================== */

.ribbon-scroller-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.ribbon-scroller-btn:hover {
    background: #e5e7eb;
}

.ribbon-scroller-btn:hover .ribbon-arrow-icon {
    opacity: 0.7;
}

.ribbon-arrow-icon {
    min-width: 28px;
    height: 28px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   Scroll Area
   ========================================================================== */

.ribbon-scroll-area {
    flex: 1;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.ribbon-scroll-area::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ==========================================================================
   Day Groups
   ========================================================================== */

.day-group {
    display: flex;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
}

.day-group:last-child {
    border-right: none;
}

.day-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: #f9fafb;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    border-right: 1px solid #e5e7eb;
}

/* ==========================================================================
   Match Items
   ========================================================================== */

.match-item {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    padding: 12px 15px;
    border-right: 1px solid #f3f4f6;
}

.match-item:last-child {
    border-right: none;
}

.match-title {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-time {
    font-weight: 600;
    color: #6b7280;
}

.match-stadium {
    margin-left: 5px;
}

.match-link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.match-link:hover .team-name {
    color: var(--ast-global-color-0, #1a2a4a);
}

/* ==========================================================================
   Teams
   ========================================================================== */

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.team-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a2a4a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
    flex: 1;
    min-width: 0;
}

.team-score {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a4a;
    flex-shrink: 0;
    margin-left: auto;
}

.match-played .match-title .match-time {
    color: var(--ast-global-color-0, #1a2a4a);
}

/* ==========================================================================
   Series Name
   ========================================================================== */

.match-series {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .ribbon-scroller-btn {
        width: 36px;
    }

    .ribbon-arrow-icon {
        min-width: 24px;
        height: 24px;
    }

    .day-header {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .match-item {
        min-width: 140px;
        padding: 10px 12px;
    }

    .team-icon {
        width: 20px;
        height: 20px;
    }

    .team-name {
        font-size: 0.8rem;
    }

    .team-score {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .ribbon-scroller-btn {
        width: 32px;
    }

    .ribbon-arrow-icon {
        min-width: 22px;
        height: 22px;
    }

    .match-item {
        min-width: 130px;
        padding: 8px 10px;
    }

    .team-score {
        font-size: 0.8rem;
    }
}
