.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-overlay.active {
    display: flex;
}

.popup-box {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('../images/20.png');
    background-size: 100% auto; 
    background-position: center top;
    background-repeat: no-repeat;
    
    border: 1px solid var(--menu-border-color);
    border-radius: 20px;
    padding: 100px 32px 28px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 20px 50px rgba(0, 0, 0, 0.7);
}

.popup-box::-webkit-scrollbar {
    display: none;
}

.popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 50%;
    color: var(--text-color-light);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.popup-close:hover {
    background: var(--primary-color);
    color: #111;
    transform: rotate(90deg);
}

.popup-title {
    font-family: var(--font-family-custom);
    color: var(--primary-color);
    text-align: center;
    font-size: 24px;
    margin-bottom: 26px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
}

/* ===== STEP INDICATOR ===== */
.popup-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 30px;
}

.popup-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    opacity: 0.4;
    transition: opacity 0.25s;
}

.popup-step-item.active,
.popup-step-item.done {
    opacity: 1;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-color-light);
    transition: all 0.25s;
}

.popup-step-item.active .step-circle {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.popup-step-item.done .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #111;
}

.step-label {
    font-size: 12px;
    color: var(--text-color-light);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.popup-step-line {
    width: 64px;
    height: 2px;
    background: #3a3a3a;
    margin: 14px 8px 0;
    transition: background 0.25s;
}

.popup-step-line.done {
    background: var(--primary-color);
}

/* ===== STEP PANELS ===== */
.popup-step-panel {
    display: none;
    animation: fadeSlideIn 0.25s ease;
}

.popup-step-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== FORM FIELDS ===== */
.ticket-form .form-row {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ticket-form label {
    font-family: var(--font-family-custom);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color-light);
    opacity: 0.8;
    letter-spacing: 0.4px;
}

.ticket-form input,
.ticket-form select {
    background: #262626;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-color-light);
    font-size: 15px;
    font-family: Arial, sans-serif;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.ticket-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
}

.ticket-form input:hover,
.ticket-form select:hover {
    border-color: #555;
}

.ticket-form input:focus,
.ticket-form select:focus {
    border-color: var(--primary-color);
    background: #2a2a2a;
}

.ticket-form input::placeholder {
    color: #6b6b6b;
}

.ticket-form select option {
    background: #262626;
}

.order-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--menu-border-color);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.order-summary-title {
    color: var(--text-color-light);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.85;
    margin-bottom: 12px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14.5px;
    color: var(--text-color-light);
    margin-bottom: 10px;
}

.ticket-icon {
    margin-right: 6px;
}

.order-show-label {
    opacity: 0.7;
    font-size: 13px;
}

.order-summary-divider {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    margin: 12px 0;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    color: var(--text-color-light);
}

.order-summary-total .total-amount,
.total-amount {
    color: var(--primary-color);
    font-size: 19px;
    font-weight: bold;
}

.popup-next-btn,
.popup-submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: #111;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    margin-top: 4px;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.popup-next-btn:hover,
.popup-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.popup-next-btn:active,
.popup-submit-btn:active {
    transform: translateY(0);
}

.popup-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.popup-step-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.popup-step-actions .popup-submit-btn {
    flex: 2;
    margin-top: 0;
}

.popup-back-btn {
    flex: 1;
    background: transparent;
    border: 1px solid #3a3a3a;
    color: var(--text-color-light);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14.5px;
    transition: border-color 0.2s, color 0.2s;
}

.popup-back-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.form-message {
    text-align: center;
    font-size: 14px;
    margin-top: 14px;
    min-height: 18px;
    line-height: 1.5;
}

.form-message.success {
    color: var(--primary-color);
}

.form-message.success .sub-line {
    display: block;
    color: #4fe8ff;
    margin-top: 4px;
    font-size: 13px;
}

.form-message.error {
    color: #ff5c5c;
}

.ticket-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #232323;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color 0.2s;
}

.ticket-type-item.has-qty {
    border-color: var(--primary-color);
}

.ticket-type-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ticket-type-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-color-light);
}

.ticket-type-price {
    font-size: 13px;
    color: var(--primary-color);
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #444;
    background: #2c2c2c;
    color: var(--text-color-light);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}

.qty-btn:hover {
    border-color: var(--primary-color);
    background: #333;
}

.qty-value {
    min-width: 18px;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: var(--text-color-light);
}

#summaryLines .order-summary-row {
    margin-bottom: 8px;
}

.popup-next-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .popup-box {
        padding: 60px 22px 22px;
        border-radius: 16px;
    }

    .popup-title {
        font-size: 20px;
    }

    .popup-step-line {
        width: 44px;
    }
}

@media (max-width: 600px) {
    .popup-box {
        max-width: 440px;
    }
    .ticket-type-list {
        grid-template-columns: 1fr;
    }
}

.ticket-type-item.sold-out {
    opacity: 0.5;
}

.ticket-type-item.sold-out .qty-plus {
    cursor: not-allowed;
}
