/**
 * Biletomat API Frontend Styles
 * @package BiletomatAPI
 */

/* ========================================
   Lista repertuaru
   ======================================== */

/* .biletomat-repertuar-list {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
} */

/* ========================================
   Element wydarzenia
   ======================================== */

.biletomat-event-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.biletomat-event-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.biletomat-event-item--today {
    border-color: #472963;
    background: #f9f7fb;
}

/* ========================================
   Obraz wydarzenia
   ======================================== */

.biletomat-event-item__image {
    width: 120px;
    height: 160px;
    overflow: hidden;
    border-radius: 4px;
}

.biletomat-event-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   Data wydarzenia
   ======================================== */

.biletomat-event-item__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.biletomat-event-item__date-day {
    font-size: 2rem;
    font-weight: 700;
    color: #472963;
    line-height: 1;
}

.biletomat-event-item__date-month {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #666;
    margin-top: 0.25rem;
}

.biletomat-event-item__date-weekday {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

/* ========================================
   Informacje o wydarzeniu
   ======================================== */

.biletomat-event-item__content {
    display: flex;
    gap: 1.5rem;
}

.biletomat-event-item__info {
    flex: 1;
}

.biletomat-event-item__time {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.biletomat-event-item__type {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #472963;
    color: #fff;
    font-size: 0.75rem;
    border-radius: 3px;
    margin-left: 0.5rem;
}

.biletomat-event-item__title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #472963;
}

.biletomat-event-item__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.biletomat-event-item__title a:hover {
    color: #c99d66;
}

.biletomat-event-item__location,
.biletomat-event-item__additional-info {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* ========================================
   Przyciski
   ======================================== */

.biletomat-event-item__actions {
    display: flex;
    align-items: center;
}

.biletomat-ticket-button-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.biletomat-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.biletomat-button--disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.biletomat-button.btn-gold-fill {
    background: #c99d66;
    color: #fff;
}

.biletomat-button.btn-gold-fill:hover:not(.biletomat-button--disabled) {
    background: #b88a52;
}

.biletomat-button.btn-gray {
    background: #e5e5e5;
    color: #666;
}

.biletomat-button.btn-green {
    background: #4caf50;
    color: #fff;
}

.biletomat-button.btn-purple-border {
    background: transparent;
    color: #472963;
    border: 2px solid #472963;
}

.biletomat-button.btn-purple-border:hover:not(.biletomat-button--disabled) {
    background: #472963;
    color: #fff;
}

.biletomat-button--secondary {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.biletomat-last-places {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #ff9800;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
}

/* ========================================
   Screen reader
   ======================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   Brak wydarzeń
   ======================================== */

.biletomat-no-events {
    padding: 3rem 2rem;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
}

.biletomat-no-events__title {
    font-size: 1.5rem;
    color: #472963;
    margin-bottom: 0.5rem;
}

.biletomat-no-events__message {
    color: #666;
}

/* ========================================
   Responsywność
   ======================================== */

@media (max-width: 1024px) {
    .biletomat-event-item {
        grid-template-columns: 1fr;
    }

    .biletomat-event-item__content {
        flex-direction: column;
    }

    .biletomat-event-item__date {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .biletomat-event-item__date-day {
        font-size: 1.5rem;
    }

    .biletomat-event-item__actions {
        justify-content: flex-start;
    }

    .biletomat-ticket-button-wrapper {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .biletomat-event-item {
        padding: 1rem;
        gap: 1rem;
    }

    .biletomat-event-item__image {
        width: 100%;
        height: 200px;
    }

    .biletomat-button {
        width: 100%;
    }
}

/* ========================================
   Loader
   ======================================== */

.biletomat-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.biletomat-loader__spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #472963;
    border-radius: 50%;
    animation: biletomat-spin 1s linear infinite;
}

@keyframes biletomat-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.biletomat-loader__text {
    margin-top: 1rem;
    color: #472963;
    font-weight: 600;
}

/* ========================================
   Error
   ======================================== */

.biletomat-api-error {
    padding: 1rem;
    background: #f44336;
    color: #fff;
    border-radius: 4px;
    margin: 1rem 0;
}

/* ========================================
   Animacje
   ======================================== */

@keyframes biletomat-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.biletomat-event-item {
    animation: biletomat-fadeIn 0.5s ease-out;
}

/* ========================================
   Utilities
   ======================================== */

.biletomat-hidden {
    display: none !important;
}

.biletomat-mb-0 {
    margin-bottom: 0 !important;
}

.biletomat-mt-0 {
    margin-top: 0 !important;
}

/* ========================================
   Pokaż więcej
   ======================================== */

.biletomat-load-more-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.biletomat-load-more-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #472963;
    background: transparent;
    border: 2px solid #472963;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.biletomat-load-more-btn:hover {
    background: #472963;
    color: #fff;
}

.biletomat-load-more-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ========================================
   Strona podziękowania (TYP)
   ======================================== */

.biletomat-typ-container {
    max-width: 640px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.biletomat-typ-details {
    text-align: left;
    margin-bottom: 1.5rem;
}

.biletomat-typ-details h3 {
    font-size: 1.25rem;
    color: #472963;
    margin-bottom: 0.75rem;
}

.biletomat-typ-details p {
    margin: 0.35rem 0;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5;
}

.biletomat-typ-details .biletomat-typ-label {
    font-weight: 600;
    color: #333;
}

.biletomat-typ-details .biletomat-typ-location {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.biletomat-typ-details .biletomat-typ-tickets {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f9f7fc;
    border-radius: 8px;
}

.biletomat-typ-details .biletomat-typ-tickets table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.biletomat-typ-details .biletomat-typ-tickets th,
.biletomat-typ-details .biletomat-typ-tickets td {
    padding: 0.4rem 0.5rem;
    text-align: left;
}

.biletomat-typ-details .biletomat-typ-tickets th {
    font-weight: 600;
    color: #472963;
    border-bottom: 1px solid #ddd;
}

.biletomat-typ-details .biletomat-typ-total {
    margin-top: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #472963;
}

.biletomat-typ-btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #472963;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.biletomat-typ-btn:hover {
    background: #5a3580;
    transform: translateY(-1px);
}

.biletomat-typ-btn:active {
    transform: translateY(0);
}

.biletomat-typ-loading {
    padding: 2rem;
    text-align: center;
    color: #888;
    font-size: 0.95rem;
}

.biletomat-typ-error {
    padding: 1rem;
    text-align: center;
    color: #d63638;
    background: #fef0f0;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ========================================
   Inne terminy wydarzenia
   ======================================== */

.biletomat-other-dates {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.biletomat-other-dates__title {
    font-size: 1.15rem;
    color: #472963;
    margin-bottom: 1rem;
}

.biletomat-other-dates__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.biletomat-other-dates__table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid #472963;
    color: #472963;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.biletomat-other-dates__table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.biletomat-other-dates__table tr:last-child td {
    border-bottom: none;
}

.biletomat-other-dates__table .biletomat-button {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.biletomat-other-dates-empty {
    margin-top: 1.5rem;
    color: #888;
    font-style: italic;
}

@media (max-width: 640px) {
    .biletomat-other-dates__table,
    .biletomat-other-dates__table thead,
    .biletomat-other-dates__table tbody,
    .biletomat-other-dates__table th,
    .biletomat-other-dates__table td,
    .biletomat-other-dates__table tr {
        display: block;
    }

    .biletomat-other-dates__table thead {
        display: none;
    }

    .biletomat-other-dates__table tr {
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }

    .biletomat-other-dates__table td {
        padding: 0.2rem 0;
        border-bottom: none;
    }
}