/**
 * Pro Remedium Events - Product Form Styles
 * Brand: granat #1F3864 + fiolet #7B3F9E
 */

/* ============================================================
 * Meta wydarzenia (data, miejsce, miejsca) nad ceną
 * ============================================================ */
.pr-event-meta {
    margin: 1rem 0 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8f9fb;
    border-left: 4px solid #1F3864;
    border-radius: 4px;
}

.pr-event-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.pr-event-meta-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pr-event-meta-time {
    color: #555;
    font-weight: normal;
}

.pr-event-meta-seats {
    color: #1F3864;
    font-weight: 500;
}

/* ============================================================
 * Sekcja booking (selektor + formularz)
 * ============================================================ */
.pr-event-booking {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #ffffff;
    border: 2px solid #e8eaf0;
    border-radius: 8px;
}

.pr-event-booking-title {
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    color: #1F3864;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid #f0e8f5;
}

/* ============================================================
 * Selektor liczby biletów
 * ============================================================ */
.pr-event-quantity-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f4f1f8;
    border-radius: 6px;
}

.pr-event-quantity-wrap label {
    margin: 0;
    font-weight: 600;
    color: #1F3864;
    font-size: 1rem;
}

.pr-event-quantity-select {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1F3864;
    background: #fff;
    border: 2px solid #7B3F9E;
    border-radius: 4px;
    cursor: pointer;
    min-width: 5rem;
}

.pr-event-quantity-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 63, 158, 0.2);
}

.pr-event-quantity-info {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

/* ============================================================
 * Pola uczestników
 * ============================================================ */
.pr-event-attendees {
    margin-bottom: 1.5rem;
}

.pr-event-attendee {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: #fafbfd;
    border: 1px solid #e8eaf0;
    border-radius: 6px;
}

.pr-event-attendee-title {
    margin: 0 0 0.875rem;
    padding-bottom: 0.5rem;
    color: #7B3F9E;
    font-size: 1.05rem;
    font-weight: 600;
    border-bottom: 1px solid #ece5f3;
}

.pr-event-attendee-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

.pr-event-attendee-row:last-child {
    margin-bottom: 0;
}

/* Mobile: 1 kolumna */
@media (max-width: 600px) {
    .pr-event-attendee-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
 * Pola formularza
 * ============================================================ */
.pr-event-field {
    display: flex;
    flex-direction: column;
}

.pr-event-field label {
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2c3e50;
}

.pr-event-required {
    color: #cc0000;
    font-weight: bold;
}

.pr-event-field input {
    padding: 0.625rem 0.75rem;
    font-size: 0.95rem;
    color: #2c3e50;
    background: #ffffff;
    border: 1.5px solid #d0d4dc;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.pr-event-field input:focus {
    outline: none;
    border-color: #7B3F9E;
    box-shadow: 0 0 0 3px rgba(123, 63, 158, 0.15);
}

.pr-event-field input.pr-event-field-error {
    border-color: #cc0000;
    background: #fff5f5;
}

.pr-event-field input.pr-event-field-error:focus {
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15);
}

.pr-event-field-msg {
    display: block;
    margin-top: 0.35rem;
    color: #cc0000;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============================================================
 * Podsumowanie ceny
 * ============================================================ */
.pr-event-summary {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f4f1f8 0%, #f8f9fb 100%);
    border-radius: 6px;
    border: 1px solid #ece5f3;
}

.pr-event-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.pr-event-summary-row strong {
    color: #1F3864;
}

.pr-event-summary-total {
    margin-top: 0.5rem;
    padding-top: 0.625rem;
    border-top: 1.5px solid #d4c5e0;
    font-size: 1.1rem;
}

.pr-event-summary-total strong {
    color: #7B3F9E;
    font-size: 1.2rem;
}

/* ============================================================
 * Wyprzedane / niedostępne
 * ============================================================ */
.pr-event-meta-seats strong {
    color: #cc0000 !important;
}

/* ============================================================
 * Override standardowego pola Quantity WooCommerce
 * (chowamy je - mamy własne)
 * ============================================================ */
.product-type-simple form.cart .quantity {
    display: none !important;
}

/* ============================================================
 * SHORTCODE - dodatkowe style dla [proremedium_event_form]
 * ============================================================ */

.pr-event-shortcode-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.pr-event-shortcode-wrap form.pr-event-booking-form {
    margin: 0;
    padding: 0;
}

/* Przycisk "Dodaj do koszyka" w shortcode */
.pr-event-submit-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #1F3864 0%, #7B3F9E 100%);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pr-event-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(31, 56, 100, 0.25);
}

.pr-event-submit-btn:active {
    transform: translateY(0);
}

.pr-event-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Komunikaty */
.pr-event-message {
    padding: 0.875rem 1.25rem;
    margin: 0 0 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.pr-event-message--error {
    background: #fff5f5;
    border-left: 4px solid #cc0000;
    color: #800000;
}

.pr-event-message--success {
    background: #f0f9ff;
    border-left: 4px solid #0e7c0e;
    color: #0e5c0e;
}

/* Info boxy (wyprzedane, past event) */
.pr-event-info {
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.pr-event-info--soldout {
    background: #fff5f5;
    border: 2px solid #cc0000;
    color: #cc0000;
}

.pr-event-info--past {
    background: #f4f1f8;
    border: 2px solid #999;
    color: #555;
}

/* Błąd shortcode (wrong product, etc) */
.pr-event-error {
    padding: 1rem 1.25rem;
    background: #fff5f5;
    border-left: 4px solid #cc0000;
    color: #800000;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Info: brak konfiguracji magazynu */
.pr-event-info--config {
    background: #fff8e1;
    border: 2px solid #f0a020;
    color: #855900;
    text-align: center;
}

.pr-event-info--config strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.pr-event-info--config small {
    display: block;
    font-weight: normal;
    color: #855900;
    line-height: 1.5;
}
