/**
 * OddsEkspert V2 - Matches Shortcode Styles
 * Card grid layout - 3 per row
 */

/* Container */
.oe-matches {
    font-family: inherit;
    line-height: 1.5;
    max-width: 100%;
    overflow: hidden;
}

/* Date Group */
.oe-matches__date-group {
    margin-bottom: 1.5rem;
}

.oe-matches__date-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--oe-color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
    padding: 0;
}

/* Grid layout - 3 columns */
.oe-matches__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

/* Single Match Card */
a.oe-match,
.oe-match {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--oe-color-border);
    border-left: 3px solid var(--oe-color-primary);
    border-radius: 0.375rem;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

a.oe-match:hover,
.oe-match:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--oe-color-border);
    border-left-color: var(--oe-color-primary);
}

a.oe-match:focus {
    outline: 2px solid var(--oe-color-primary);
    outline-offset: 2px;
}

/* Live match indicator */
.oe-match--live {
    border-left-color: var(--oe-color-error);
}

.oe-match--final {
    opacity: 0.7;
}

/* League info row */
.oe-match__league {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--oe-color-primary);
    margin-bottom: 0.5rem;
}

.oe-match__league-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.oe-match__league-name {
    font-weight: 500;
}

/* Expert Tip Badge */
.oe-match--has-tips {
    border-left-color: var(--oe-color-warning);
}

.oe-match__tip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid var(--oe-color-warning);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.oe-match__tip-icon {
    font-size: 0.75rem;
    line-height: 1;
}

.oe-match__tip-label {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Time and Status */
.oe-match__time,
.oe-match__status {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--oe-color-primary);
    margin-bottom: 0.5rem;
}

.oe-match__status--live {
    color: var(--oe-color-error);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.oe-match__live-indicator {
    width: 6px;
    height: 6px;
    background: var(--oe-color-error);
    border-radius: 50%;
    animation: oe-pulse 1.5s ease-in-out infinite;
}

@keyframes oe-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.oe-match__status--final {
    color: var(--oe-color-text-light);
}

/* Teams row */
.oe-match__teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}

.oe-match__team {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.oe-match__team--home {
    justify-content: flex-start;
}

.oe-match__team--away {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.oe-match__team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.oe-match__team-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--oe-color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* VS indicator */
.oe-match__vs {
    font-size: 0.75rem;
    color: var(--oe-color-text-muted);
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Day Selector - scoped with parent for specificity over Elementor global button styles */
.oe-matches .oe-matches__day-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.oe-matches button.oe-matches__day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid var(--oe-color-border, #e5e7eb);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    flex: 1;
    color: inherit;
}

.oe-matches button.oe-matches__day:hover {
    background: var(--oe-color-primary-tint, #f0f7f3);
    border-color: var(--oe-color-primary, #036133);
    color: var(--oe-color-primary, #036133);
}

.oe-matches button.oe-matches__day--active {
    background: var(--oe-color-primary, #036133);
    border-color: var(--oe-color-primary, #036133);
    color: #fff;
}

.oe-matches button.oe-matches__day--active:hover {
    background: var(--oe-color-primary-dark, #024a26);
    border-color: var(--oe-color-primary-dark, #024a26);
    color: #fff;
}

.oe-matches button.oe-matches__day--empty {
    opacity: 0.5;
}

.oe-matches button.oe-matches__day--active.oe-matches__day--empty {
    opacity: 1;
}

.oe-matches__day-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.oe-matches__day-date {
    font-size: 0.6875rem;
    font-weight: 400;
}

/* Empty/Error states */
.oe-matches--empty,
.oe-matches--error {
    padding: 2rem;
    text-align: center;
    color: var(--oe-color-text-light);
    background: var(--oe-color-bg);
    border-radius: 0.5rem;
}

/* Responsive - 2 columns on tablet */
@media (max-width: 1024px) {
    .oe-matches__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Responsive - 1 column on mobile */
@media (max-width: 640px) {
    .oe-matches__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .oe-match__team-name {
        font-size: 0.8125rem;
    }

    .oe-match__team-logo {
        width: 20px;
        height: 20px;
    }

    .oe-matches__day-selector {
        gap: 0.25rem;
    }

    .oe-matches__day {
        padding: 0.375rem 0.25rem;
    }

    .oe-matches__day-name {
        font-size: 0.6875rem;
    }

    .oe-matches__day-date {
        font-size: 0.625rem;
    }
}
