/*Strip TNEW container styles */
.tn-events-detail-page .tn-ticket-selector__controls-container {
    background: var(--dpg-white) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* 2. Panel — sits under the "Tickets" heading on desktop, or between the CTAs
   and the time slot grid on mobile (≤768px — see media query below). JS
   (promocode.js) moves the same element between those two positions. */
.tn-events-detail-page .dpg-promo__panel {
    display: block;
    margin: 0.75rem 0 1.5rem;
}

/* 3. Form */
.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form__label {
    display: none !important;
}

.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form__input-container {
    display: contents !important;
}

/* 4. Input */
.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form__input.form-control {
    width: 140px !important;
    height: 36px !important;
    padding: 0 10px !important;
    background: var(--dpg-white) !important;
    border: 1px solid var(--dpg-neutral-2) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-size: var(--dpg-font-size-sm) !important;
    color: var(--dpg-black) !important;
    outline: none !important;
}

.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form__input::placeholder {
    color: var(--dpg-neutral-3);
}

/* 6. Loading state — spinner replaces button text while TNEW processes */
.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form__btn-submit.dpg-promo__btn--loading {
    color: transparent !important;
    pointer-events: none;
    position: relative !important;
    overflow: visible !important; /* TNEW's .btn has overflow:hidden which clips ::after */
}

.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form__btn-submit.dpg-promo__btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--dpg-white);
    border-radius: 50%;
    animation: dpg-promo-spin 0.7s linear infinite;
}

@keyframes dpg-promo-spin {
    to { transform: rotate(360deg); }
}

/* 7. Hide TNEW error block */
.tn-events-detail-page .dpg-promo__body .tn-utility-nav-inline-promo-code-form__help-block-container {
    display: none !important;
}

/* 7b. Inline error message */
.tn-events-detail-page .dpg-promo__body .dpg-promo__error {
    display: none;
    margin: 6px 0 0;
    font-size: var(--dpg-font-size-sm);
    color: var(--dpg-red);
    font-weight: 500;
}

/* 7. Applied state — label + code + remove */
.dpg-promo__applied {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dpg-promo__applied-label {
    font-size: var(--dpg-font-size-base);
    font-weight: 700;
    color: var(--dpg-purple);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dpg-promo__applied-code {
    font-size: var(--dpg-font-size-base);
    font-weight: 700;
    color: var(--dpg-purple);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dpg-promo__remove-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: var(--dpg-neutral-3) !important;
    font-size: var(--dpg-font-size-base) !important;
    font-weight: 500 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.dpg-promo__remove-btn:hover {
    color: var(--dpg-purple) !important;
}

/* 8. Mobile: promo code input should fill available width rather than the
   fixed 140px used on desktop */
@media (max-width: 768px) {
    .tn-events-detail-page .tn-ticket-selector__controls-container .dpg-promo__body .tn-utility-nav-inline-promo-code-form__input.form-control {
        flex: 1 1 auto !important;
        width: auto !important;
    }
}
