/* =========================================
   Easypass WP - Frontend Styles (Dark Mode Harmonized)
   Harmonized with landing.css variables
   ========================================= */

/* (Variables provided by ep-theme.css) */

/* Contenedor principal del bloque de tickets */
.ep-event-tickets {
    max-width: 800px;
    /* Restrict width */
    margin: 0 auto 2.5rem;
    /* Center */
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: var(--ep-text-main);
    box-shadow: none;
    border: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    width: 100%;
    /* Ensure it takes available space up to max-width */
}

/* Header del evento - Optional since hero covers it */
.ep-event-header {
    margin-bottom: 1.5rem;
    /* Often hidden by template, but if shown, style it */
}

.ep-event-title {
    margin: 0 0 0.4rem 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ep-text-main);
}

.ep-event-meta {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    opacity: 0.85;
    color: var(--ep-text-muted);
}

.ep-event-meta .ep-event-separator {
    margin: 0 0.4rem;
    color: var(--ep-text-muted);
}

.ep-event-notes {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
    color: var(--ep-text-main);
}

/* Lista vertical de tickets */
.ep-tickets-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Increase gap */
}

/* Cada ticket como fila */
.ep-ticket-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ep-border-color);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .ep-ticket-card {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ep-ticket-card:hover {
    border-color: var(--ep-brand);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

[data-theme="light"] .ep-ticket-card:hover {
    background: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Info del ticket */
.ep-ticket-info {
    flex: 1;
    min-width: 0;
}

.ep-ticket-name {
    margin: 0 0 6px 0;
    font-weight: 700;
    color: var(--ep-text-main);
    font-size: 1.2rem;
}

.ep-ticket-price {
    margin: 0;
    font-size: 1.2rem;
    opacity: 1;
    color: var(--ep-brand);
    font-weight: 800;
}

.ep-ticket-description {
    font-size: 0.9rem;
    color: var(--ep-text-muted);
    margin-top: 6px;
}

/* Acciones */
.ep-ticket-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.ep-ticket-qty-label {
    font-size: 0.8rem;
    opacity: 0.8;
    color: var(--ep-text-muted);
    display: none;
}

/* Quantity Control - Fixed Sizing */
.ep-ticket-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0;
    /* Remove gap, use fixed widths */
    border-radius: 12px;
    padding: 4px;
    background: var(--ep-bg-input);
    border: 1px solid var(--ep-border-color);
    min-width: 120px;
    /* Ensure minimum width */
    justify-content: space-between;
}

[data-theme="light"] .ep-ticket-qty-control {
    background: #f3f4f6;
}

.ep-qty-btn {
    border: none;
    background: var(--ep-bg-surface);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--ep-text-main);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

[data-theme="light"] .ep-qty-btn {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ep-qty-btn:hover {
    background: var(--ep-brand);
    color: #ffffff;
    border-color: var(--ep-brand);
}

.ep-ticket-qty-control input[type="number"] {
    width: 50px;
    /* Wider input */
    text-align: center;
    border: none;
    background: transparent;
    color: var(--ep-text-main);
    font-size: 1.1rem;
    font-weight: 700;
    -moz-appearance: textfield;
    padding: 0;
    margin: 0;
}

.ep-ticket-qty-control input[type="number"]::-webkit-outer-spin-button,
.ep-ticket-qty-control input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Sold Out */
.ep-ticket-card.ep-sold-out {
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.01);
    pointer-events: none;
    border-style: dashed;
}

/* Badges */
.ep-badge-soldout,
.ep-badge-lowstock {
    display: inline-block;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.ep-badge-soldout {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.ep-badge-lowstock {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Submit Button */
.ep-submit {
    padding: 1.2rem 2.5rem !important;
    border-radius: 16px !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    border: none !important;
    background: linear-gradient(135deg, var(--ep-brand), var(--ep-brand-glow)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ep-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5);
    filter: brightness(1.1);
}

.ep-submit-wrapper {
    margin-top: 30px;
}

.ep-selected-summary {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    opacity: 0.9;
    text-align: center;
    color: var(--ep-text-muted);
}

.ep-selected-summary .ep-selected-count,
.ep-selected-summary .ep-selected-total {
    font-weight: 700;
    color: var(--ep-brand) !important;
}

/* Disabled State */
.ep-submit--disabled,
.ep-submit:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    background: #374151 !important;
}

/* Catalog Grid (Home) */
.ep-events-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.ep-catalog-card {
    background: var(--ep-bg-card);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important;
    color: var(--ep-text-main);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--ep-border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.ep-catalog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border-color: var(--ep-brand);
}

.ep-card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #1f2937;
}

.ep-card-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    backdrop-filter: blur(12px);
    /* Glass effect */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.ep-card-date-badge .ep-day {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
}

.ep-card-date-badge .ep-month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ep-brand);
    margin-top: 2px;
}

.ep-card-details {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ep-card-title {
    font-size: 1.4rem;
    margin: 0 0 12px 0;
    color: var(--ep-text-main);
    font-weight: 700;
    line-height: 1.3;
}

.ep-card-loc,
.ep-card-time {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    color: var(--ep-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-card-btn {
    margin-top: auto;
    display: inline-block;
    padding-top: 20px;
    color: var(--ep-brand);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 600px) {
    .ep-ticket-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .ep-ticket-actions {
        width: 100%;
        align-items: flex-start;
        margin-top: 10px;
    }

    .ep-ticket-qty-control {
        width: 100%;
        justify-content: space-between;
    }
}

/* Meta items in Hero (Single Event) */
.ep-meta-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #fff;
}

/* Sticky Reservation Notice (Edge-to-Edge Bar) */
#ep-sticky-reservation-notice {
    position: sticky;
    top: 100px;
    z-index: 10000;
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    pointer-events: none;
}

#ep-sticky-reservation-notice .woocommerce-info,
#ep-sticky-reservation-notice .woocommerce-notice {
    margin: 0 !important;
    border-radius: 0 !important;
    /* Full width bar look */
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background-color: #111 !important;
    color: #fff !important;
    padding: 10px 20px !important;
    text-align: center;
    font-size: 0.9rem;
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
}

#ep-sticky-reservation-notice .woocommerce-info::before {
    display: none;
}

#ep-checkout-timer-inline {
    font-variant-numeric: tabular-nums;
    margin-left: 5px;
    font-weight: 700;
    color: #4ade80;
}

@media (max-width: 600px) {
    #ep-sticky-reservation-notice {
        top: 88px;
        /* Requested mobile offset */
    }

    #ep-sticky-reservation-notice .woocommerce-info {
        font-size: 0.75rem;
        /* Requested mobile font size */
        padding: 8px 15px !important;
    }
}

/* Checkout Cleanup (Hide Newsletter & Breadcrumbs) */
.woocommerce-checkout .woocommerce-breadcrumb,
.woocommerce-checkout .entry-header,
.woocommerce-checkout .page-title,
.woocommerce-checkout .newsletter-signup,
.woocommerce-checkout .mailchimp-newsletter,
.woocommerce-checkout #mc_embed_signup,
.woocommerce-checkout .mailpoet_form,
.woocommerce-checkout .ast-breadcrumbs,
.woocommerce-checkout .storefront-breadcrumb,
.woocommerce-checkout .elementor-widget-breadcrumbs,
.woocommerce-checkout .yoast-breadcrumb,
.woocommerce-checkout .wysija-msg,
.woocommerce-checkout #mailchimp_woocommerce_newsletter,
.woocommerce-checkout .newsletter,
.woocommerce-checkout .subscribe-box,
.woocommerce-notices-wrapper {
    /* margin-top: 80px; */
}

/* JS Sticky Footer (Fallback) Styling */
#ep-cart-timer {
    left: 50% !important;
    transform: translateX(-50%);
    width: auto !important;
    min-width: 320px;
    max-width: 90%;
    border-radius: 50px !important;
    /* Pill shape */
    bottom: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}