/**
 * Event Tickets & Vouchers - Frontend Styles
 * Optional CSS for better presentation
 */

/* ========================================
   Price Display (Product Listing & Single)
   ======================================== */

.etv-price-wrapper {
    display: block;
}

section.related.products, p.stock.in-stock {
    display: none;
}

.etv-single-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #2271b1;
}

.etv-pool-badge {
    background: #2271b1;
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
}

.etv-low-stock {
    color: #dc3232;
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-top: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.etv-group-price-hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.etv-no-pool {
    color: #dc3232;
    font-weight: 600;
    font-size: 1.1em;
}

/* Pool Info Banner on Single Product */
.etv-pool-info-banner {
    background: #f0f8ff;
    padding: 12px 15px;
    border-left: 4px solid #2271b1;
    margin: 15px 0;
    border-radius: 4px;
}

.etv-pool-info-banner strong {
    color: #2271b1;
}

/* Archive/Loop specific */
.woocommerce ul.products li.product .etv-price-wrapper {
    margin: 10px 0;
}

.woocommerce ul.products li.product .etv-pool-badge {
    font-size: 10px;
    padding: 2px 6px;
}

.woocommerce ul.products li.product .etv-group-price-hint {
    font-size: 11px;
}

/* ========================================
   Ticket Selection Box
   ======================================== */

.etv-ticket-selection {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.etv-ticket-selection h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2271b1;
    font-size: 18px;
}

.etv-ticket-selection p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Pool Info */
.etv-pool-info {
    background: #fff;
    padding: 10px 15px;
    border-radius: 3px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

/* Radio Options */
.etv-ticket-selection label {
    display: block;
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.etv-ticket-selection label:hover {
    border-color: #2271b1;
    background: #f0f8ff;
}

.etv-ticket-selection input[type="radio"]:checked + strong {
    color: #2271b1;
}

.etv-ticket-selection input[type="radio"] {
    margin-right: 8px;
    vertical-align: middle;
}

.etv-ticket-selection label small {
    display: block;
    margin-left: 24px;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

/* Group Quantity Selection */
#etv-group-quantity {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#etv-group-quantity label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    border: none;
    padding: 0;
}

#etv_group_size {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

/* Group Price Preview */
#etv-group-price-preview {
    margin-top: 15px;
    padding: 12px;
    background: #e7f7e7;
    border-left: 3px solid #46b450;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.8;
}

#etv-group-price-preview strong {
    color: #2c5234;
}

#etv-group-price-preview small {
    display: block;
    margin-top: 5px;
    color: #46b450;
    font-weight: 600;
}

/* ========================================
   Cart & Checkout
   ======================================== */

.woocommerce-cart-form__cart-item .etv-ticket-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.woocommerce-cart-form__cart-item .etv-ticket-meta dt {
    font-weight: 600;
    display: inline;
}

.woocommerce-cart-form__cart-item .etv-ticket-meta dd {
    display: inline;
    margin-left: 5px;
}

/* ========================================
   Vouchers Section in Account
   ======================================== */

.etv-vouchers-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.etv-vouchers-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
    color: #2271b1;
}

.etv-vouchers-section .shop_table {
    margin-top: 20px;
}

.etv-vouchers-section .button {
    padding: 6px 15px;
    font-size: 13px;
    border-radius: 3px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media screen and (max-width: 768px) {
    .etv-ticket-selection {
        padding: 15px;
    }
    
    .etv-ticket-selection h4 {
        font-size: 16px;
    }
    
    #etv-group-quantity {
        padding: 12px;
    }
    
    #etv_group_size {
        width: 80px;
        font-size: 14px;
    }
    
    #etv-group-price-preview {
        font-size: 13px;
        padding: 10px;
    }
}

/* ========================================
   Admin Panel Styles
   ======================================== */

.etv-pools-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 15px;
    background: #fff;
}

.etv-pools-table th {
    background: #f0f0f1;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.etv-pools-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.etv-pools-table tr:hover {
    background: #f9f9f9;
}

.etv-pools-table tr.active-pool {
    background: #e7f7e7;
    font-weight: 600;
}

.etv-pools-table tr.active-pool td {
    border-left: 3px solid #46b450;
}

.etv-pools-table input[type="number"] {
    width: 80px;
    padding: 4px 8px;
}

.etv-config {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #2271b1;
    border-radius: 3px;
}

.etv-config p {
    margin-bottom: 15px;
}

.etv-config label {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 5px;
}

.etv-total-tickets {
    background: #fff3cd;
    padding: 12px;
    margin-top: 10px;
    font-weight: 600;
    border-radius: 3px;
    text-align: center;
    font-size: 14px;
}

.etv-preview-prices {
    font-size: 11px;
    color: #666;
}

/* ========================================
   Utilities
   ======================================== */

.etv-error {
    color: #dc3232;
    font-weight: 600;
    padding: 10px;
    background: #fef0f0;
    border-left: 3px solid #dc3232;
    border-radius: 3px;
    margin: 10px 0;
}

.etv-success {
    color: #46b450;
    font-weight: 600;
    padding: 10px;
    background: #e7f7e7;
    border-left: 3px solid #46b450;
    border-radius: 3px;
    margin: 10px 0;
}

.etv-info {
    color: #2271b1;
    padding: 10px;
    background: #f0f8ff;
    border-left: 3px solid #2271b1;
    border-radius: 3px;
    margin: 10px 0;
}

a.add_to_cart_button.w-full.wp-element-button.wc-block-components-product-button__button {
    margin-top: 0;
}

.add_to_cart_button.w-full.wp-block-button.wc-block-components-product-button.align-center.wp-block-woocommerce-product-button.has-small-font-size {
    padding: 0;
}

li.wc-block-product.product.type-product.status-publish.product_cat-uncategorized.first.instock.virtual.sold-individually.purchasable.product-type-simple {
    list-style: none;
}

/* ========================================
   Print Styles (for Tickets)
   ======================================== */

@media print {
    .etv-ticket-selection,
    .etv-vouchers-section .button {
        display: none;
    }
    
    .etv-vouchers-section {
        border: none;
    }
}

