/**
 * Grouped Tickets - Frontend Styles
 */

/* Group indicator badge */
.tribe-tickets__group-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background-color: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 3px;
    font-size: 12px;
    color: #004085;
}

.tribe-tickets__group-indicator--primary {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Attendee cards for grouped tickets */
.tribe-tickets__attendee-group-wrapper {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    background-color: #fafafa;
}

.tribe-tickets__attendee-group-wrapper .tribe-tickets__attendee-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.tribe-tickets__attendee-group-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.tribe-tickets__attendee-group-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: #667eea;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

/* Individual attendee in group */
.tribe-tickets__attendee-tickets-item--grouped {
    position: relative;
    border-left: 3px solid #667eea;
    padding-left: 12px;
    margin-bottom: 16px;
}

.tribe-tickets__attendee-tickets-item--grouped:last-child {
    margin-bottom: 0;
}

.tribe-tickets__attendee-tickets-item--grouped.tribe-tickets__attendee-primary {
    border-left-color: #28a745;
}

/* Group member label */
.tribe-tickets__attendee-member-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.tribe-tickets__attendee-member-label .member-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #667eea;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.tribe-tickets__attendee-member-label .member-number--primary {
    background-color: #28a745;
}

/* AR form group styles */
.tribe-tickets-ar__group-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.tribe-tickets-ar__group-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tribe-tickets-ar__group-section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #667eea;
    border-radius: 2px;
}

/* Separator between group members */
.tribe-tickets-ar__group-member-separator {
    height: 1px;
    background-color: #dee2e6;
    margin: 20px 0;
}

/* Group summary */
.tribe-tickets__group-summary {
    background-color: #e9ecef;
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 16px;
    font-size: 13px;
}

.tribe-tickets__group-summary strong {
    color: #495057;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tribe-tickets__attendee-group-wrapper {
        padding: 12px;
    }

    .tribe-tickets__attendee-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tribe-tickets__attendee-tickets-item--grouped {
        padding-left: 8px;
        border-left-width: 2px;
    }
}




/* ==========================================================================
   WooCommerce Checkout - Attendee Fields
   ========================================================================== */

#tribe-grouped-tickets-checkout-fields {
    margin: 0;
    padding: 0px;
}

#tribe-grouped-tickets-checkout-fields h3 {
    margin: 0 0 10px 0;
    padding: 0;
    color: #174184;
    font-size: 24px;
    text-transform: uppercase;
    font-weight: 400;
}

.tribe-grouped-tickets-notice {
    background-color: #e8f5e9;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #006A5A;
    font-size: 14px;
}

.tribe-grouped-ticket-block {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.tribe-grouped-ticket-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Primary attendee (buyer) */
.tribe-attendee-info.tribe-attendee-primary {
    margin-bottom: 20px;
}

.tribe-attendee-info.tribe-attendee-primary .tribe-attendee-note {
    color: #555;
    font-style: italic;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 12px;
}

/* Additional attendees — accordion */
.tribe-attendee-info.tribe-attendee-additional {
    border-radius: 0px;
    margin-bottom: 10px;
    border: 1px solid #ACC5EB;
    overflow: hidden;
}

.tribe-attendee-info.tribe-attendee-additional:last-child {
    margin-bottom: 0;
}

/* Accordion header */
.tribe-attendee-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #174184;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: background 0.2s ease;
}

.tribe-attendee-accordion__header:hover {
    background: #ACC5EB;
}

.tribe-attendee-accordion__title {
    font-weight: 600;
    color: #FFFFFF;
    font-size: 14px;
}

.tribe-attendee-accordion__icon {
    display: flex;
    align-items: center;
    color: #FFFFFF;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.tribe-attendee-accordion--open .tribe-attendee-accordion__icon {
    transform: rotate(180deg);
}

/* Accordion body — max-height driven by JS; no padding here to avoid bleed-through */
.tribe-attendee-accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background-color: #d1d1d1;
}

/* Inner wrapper carries the padding so scrollHeight measurement is accurate */
.tribe-attendee-accordion__body-inner {
    padding: 18px;
}

/* Form fields within attendee blocks */
.tribe-attendee-field {
    margin-bottom: 12px;
}

.tribe-attendee-field label {
    font-weight: 600;
    color: #333;
}

.tribe-attendee-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tribe-attendee-field input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    outline: none;
}

.tribe-attendee-field.woocommerce-invalid input {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Checkbox group */
.tribe-attendee-checkbox-group {
    margin-bottom: 16px;
}

.tribe-attendee-checkbox-group > label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.tribe-checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tribe-checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    color: #444;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 0;
    transition: color 0.15s;
}

.tribe-checkbox-option:hover {
    color: #174184;
}

.tribe-checkbox-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 0;
    padding: 0;
    accent-color: #174184;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* ==========================================================================
   In-cart event notice (event page)
   ========================================================================== */

.tribe-tickets-in-cart-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #FF9F22;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #5d4037;
    flex-wrap: wrap;
}

.tribe-tickets-in-cart-notice p {
    margin: 0;
    flex: 1;
}

.tribe-tickets-in-cart-notice__btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #174184;
    color: #fff !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.tribe-tickets-in-cart-notice__btn:hover {
    background-color: #ACC5EB;
    color: #fff !important;
}

@media (max-width: 600px) {
    .tribe-tickets-in-cart-notice {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #tribe-grouped-tickets-checkout-fields {
        padding: 15px;
        margin: 20px 0;
    }

    .tribe-attendee-info.tribe-attendee-primary {
        padding: 12px;
    }

    .tribe-attendee-accordion__header {
        padding: 12px 14px;
    }

    .tribe-attendee-accordion--open .tribe-attendee-accordion__body {
        padding: 14px;
    }
}
