/* Los dashicons se cargan desde wp_enqueue_style('dashicons') en WordPress */

.wssd-cards-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.wssd-match-card {
    background: var(--wssd-panel, #ffffff);
    border: 1px solid var(--wssd-border, #d7e8dc);
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.wssd-match-card.has-status {
    background: linear-gradient(180deg, var(--wssd-status-soft, #fffaf0) 0%, var(--wssd-panel, #ffffff) 44%);
    border-color: var(--wssd-status-border, #f1d6a8);
}

.wssd-match-card.wssd-status--danger {
    --wssd-status-soft: #fdf0f0;
    --wssd-status-border: #efc2c2;
}

.wssd-match-card.wssd-status--warning {
    --wssd-status-soft: #fff7e8;
    --wssd-status-border: #f2ddb3;
}

.wssd-status-ribbon {
    position: absolute;
    top: 14px;
    right: -44px;
    width: 160px;
    transform: rotate(40deg);
    background: linear-gradient(135deg, #d6a019, #9a6700);
    box-shadow: 0 10px 18px rgba(154, 103, 0, 0.22);
    text-align: center;
    pointer-events: none;
    z-index: 2;
}

.wssd-status-ribbon.wssd-status--danger {
    background: linear-gradient(135deg, #dc3545, #a61e2d);
    box-shadow: 0 10px 18px rgba(166, 30, 45, 0.22);
}

.wssd-status-ribbon.wssd-status--warning {
    background: linear-gradient(135deg, #d6a019, #9a6700);
    box-shadow: 0 10px 18px rgba(154, 103, 0, 0.22);
}

.wssd-status-ribbon span {
    display: block;
    padding: 5px 12px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.wssd-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff4db;
    color: #9a6700;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wssd-match-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wssd-match-header {
    display: grid;
    grid-template-columns: 72px minmax(120px, 1fr) 42px minmax(120px, 1fr) 170px minmax(130px, 1fr) 110px;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wssd-team-side {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wssd-match-categoria {
    font-weight: 700;
    font-size: 12px;
    color: var(--wssd-accent, #0f7a4f);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: normal;
    line-height: 1.2;
    min-width: 60px;
}

.wssd-team-logo-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wssd-team-logo-sm {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

.wssd-team-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--wssd-ink, #1f2a1f);
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: left;
}

.wssd-vs-badge {
    font-weight: 700;
    font-size: 12px;
    color: var(--wssd-muted, #5a6b5a);
    text-align: center;
}

.wssd-match-time {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wssd-time-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.wssd-time-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.wssd-time-day {
    font-size: 12px;
    color: var(--wssd-muted, #5a6b5a);
    line-height: 1.2;
}

.wssd-time-hour {
    font-size: 13px;
    color: var(--wssd-ink, #1f2a1f);
    line-height: 1.2;
}

.wssd-match-venue {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-weight: 600;
    font-size: 13px;
    color: var(--wssd-ink, #1f2a1f);
    white-space: normal;
}

.wssd-match-expand-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--wssd-accent, #0f7a4f);
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.wssd-match-expand-btn:hover {
    transform: scale(1.1);
}

.wssd-match-expand-btn.expanded {
    transform: rotate(180deg);
}

.wssd-match-details {
    display: none;
    margin-top: 16px;
}

.wssd-match-details.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.wssd-detail-field {
    display: flex;
    flex-direction: column;
}

.wssd-detail-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--wssd-muted, #5a6b5a);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wssd-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--wssd-ink, #1f2a1f);
}

@media (max-width: 980px) {
    .wssd-match-header {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        row-gap: 10px;
    }

    .wssd-match-categoria {
        grid-column: 1 / -1;
    }

    .wssd-match-time {
        grid-column: 1 / -1;
    }

    .wssd-match-venue {
        grid-column: 1 / 3;
    }

    .wssd-match-expand-btn {
        grid-column: 3 / 4;
        justify-self: end;
    }
}

@media (max-width: 768px) {
    .wssd-status-ribbon {
        top: 12px;
        right: -52px;
        width: 150px;
    }

    .wssd-match-categoria {
        text-align: center;
        justify-self: center;
    }

    .wssd-team-visitante {
        flex-direction: row-reverse;
    }

    .wssd-team-visitante .wssd-team-name {
        text-align: right;
    }

    .wssd-match-details.active {
        grid-template-columns: 1fr;
    }
}
