/* Radsas Fun Events - Styles (szablon: Termin | Cena | Dostępność + przycisk) */

.radsasfun-events-widget {
    max-width: 1200px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.radsasfun-events-title {
    color: #1e40af;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    padding: 0;
}

.radsasfun-events-subtitle {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

/* Lista = nagłówek tabeli + wiersze */
.radsasfun-events-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Nagłówek kolumn */
.radsasfun-events-table-header {
    display: grid;
    grid-template-columns: 1fr 120px 1fr 180px;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    border-bottom: 2px solid #00aded;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

/* Wiersz terminu */
.radsasfun-event-row {
    display: grid;
    grid-template-columns: 1fr 120px 1fr 180px;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    min-height: 56px;
}

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

.radsasfun-event-row:nth-child(even) {
    background: #f9fafb;
}

/* Kolumna Termin */
.radsasfun-event-date {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
}

/* Kolumna Cena */
.radsasfun-event-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

/* Kolumna Dostępność: ikona 3 słupki + etykieta (bez pogrubionego słupka) */
.radsasfun-event-availability {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radsasfun-availability-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
}

/* Ikona 3 słupki – obramowanie (outline), w środku puste */
.radsasfun-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    height: 22px;
}

.radsasfun-bars span {
    width: 8px;
    min-height: 8px;
    border: 2px solid currentColor;
    border-radius: 2px;
    background: transparent;
    box-sizing: border-box;
}
.radsasfun-bars span:nth-child(1) { height: 10px; }
.radsasfun-bars span:nth-child(2) { height: 14px; }
.radsasfun-bars span:nth-child(3) { height: 18px; }

/* Zielony (duża): wszystkie 3 słupki w kolorze */
.radsasfun-bars-zielony span { border-color: #20c846; }

/* Niebieski (średnia): 2 słupki niebieskie, 3. szary */
.radsasfun-bars-niebieski span:nth-child(1),
.radsasfun-bars-niebieski span:nth-child(2) { border-color: #00aded; }
.radsasfun-bars-niebieski span:nth-child(3) { border-color: #cccccc; }

/* Żółty (ostatnie miejsca): 2 słupki żółte, 3. szary */
.radsasfun-bars-zolty span:nth-child(1),
.radsasfun-bars-zolty span:nth-child(2) { border-color: #ffae00; }
.radsasfun-bars-zolty span:nth-child(3) { border-color: #cccccc; }

/* Czerwony (ostatnie @): 1 słupek czerwony (#ffae00), 2 i 3 szare */
.radsasfun-bars-czerwony span:nth-child(1) { border-color: #ffae00; }
.radsasfun-bars-czerwony span:nth-child(2),
.radsasfun-bars-czerwony span:nth-child(3) { border-color: #cccccc; }

/* Szary (brak miejsc): wszystkie 3 szare */
.radsasfun-bars-szary span { border-color: #888888; }

/* Kolumna przycisku */
.radsasfun-event-action {
    display: flex;
    justify-content: flex-end;
}

/* Przyciski – kolory z załącznika */
.radsasfun-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    min-width: 160px;
    color: #fff !important;
}

.radsasfun-btn:visited,
.radsasfun-btn:active,
.radsasfun-btn:focus {
    color: #fff !important;
}

.radsasfun-btn-zielony {
    background: #20c846;
}
.radsasfun-btn-zielony:hover {
    background: #1ab03d;
    color: #fff !important;
}

.radsasfun-btn-niebieski {
    background: #00aded;
}
.radsasfun-btn-niebieski:hover {
    background: #0099d4;
    color: #fff !important;
}

.radsasfun-btn-zolty,
.radsasfun-btn-czerwony {
    background: #ffae00;
}
.radsasfun-btn-zolty:hover,
.radsasfun-btn-czerwony:hover {
    background: #e69e00;
    color: #fff !important;
}

.radsasfun-btn-szary {
    background: #888888;
    color: #fff !important;
}
.radsasfun-btn-szary:hover {
    background: #777;
    color: #fff !important;
}

.radsasfun-btn-disabled {
    cursor: not-allowed;
}

.radsasfun-btn-text {
    font-size: inherit;
    font-weight: inherit;
}

.radsasfun-phone-icon {
    flex-shrink: 0;
}

/* Loading / Error / No events */
.radsasfun-events-loading {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 1.125rem;
}

.radsasfun-error {
    padding: 2rem;
    text-align: center;
    color: #dc2626;
    font-size: 1.125rem;
    background: #fee2e2;
    border-radius: 0.5rem;
}

.radsasfun-no-events {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Responsywność */
@media (max-width: 768px) {
    .radsasfun-events-table-header {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .radsasfun-events-table-header .radsasfun-event-date { grid-column: 1; }
    .radsasfun-events-table-header .radsasfun-event-price { grid-column: 2; }
    .radsasfun-events-table-header .radsasfun-event-availability { grid-column: 1; grid-row: 2; }
    .radsasfun-events-table-header .radsasfun-event-action { grid-column: 2; grid-row: 2; }

    .radsasfun-event-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 0.5rem;
        padding: 1rem;
    }
    .radsasfun-event-row .radsasfun-event-date { grid-column: 1; }
    .radsasfun-event-row .radsasfun-event-price { grid-column: 2; }
    .radsasfun-event-row .radsasfun-event-availability { grid-column: 1; grid-row: 2; }
    .radsasfun-event-row .radsasfun-event-action { grid-column: 2; grid-row: 2; justify-content: flex-end; }

    .radsasfun-btn {
        width: 100%;
        min-width: auto;
    }

    .radsasfun-events-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .radsasfun-events-title {
        font-size: 1.5rem;
    }
    .radsasfun-event-date {
        font-size: 0.9375rem;
    }
    .radsasfun-event-price {
        font-size: 1rem;
    }
}
