/*--------------------------------------------------------------
# Seating Chart — Core Patches UI (Phase 1)
#
# Visual styles for Phase 1 e-commerce guard elements:
#  1. Toast notifications (reserved seat, validation errors)
#  2. Empty-cart inline error message
#  3. WooCommerce-style success notice in seat modal
#
# @package TicketSystemTango
--------------------------------------------------------------*/


/* ==========================================================================
   1. TOAST NOTIFICATION SYSTEM
   ========================================================================== */

#ts-seating-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000020;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: max-content;
    max-width: 90vw;
}

.ts-seating-toast {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.4;
    color: #fff;
    pointer-events: auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-seating-toast--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ts-seating-toast--exiting {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
}

/* ── Toast type variants ── */

.ts-seating-toast--error {
    background: rgba(180, 40, 40, 0.92);
    border: 1px solid rgba(255, 100, 100, 0.3);
}

.ts-seating-toast--success {
    background: rgba(40, 130, 70, 0.92);
    border: 1px solid rgba(100, 220, 140, 0.3);
}

.ts-seating-toast--info {
    background: rgba(30, 30, 35, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ts-seating-toast__icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.ts-seating-toast__msg {
    flex: 1;
    min-width: 0;
}


/* ==========================================================================
   2. EMPTY-CART INLINE ERROR
   ========================================================================== */

.ts-empty-cart-error {
    display: block;
    padding: 8px 14px;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ff8a8a;
    background: rgba(180, 40, 40, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.25);
    border-radius: 8px;
    line-height: 1.4;
    animation: ts-error-entrance 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.ts-empty-cart-error--hiding {
    animation: ts-error-exit 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes ts-error-entrance {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ts-error-exit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

/* On mobile, error goes full-width in the checkout bar */
@media (max-width: 768px) {
    .ts-empty-cart-error {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        margin-top: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}


/* ==========================================================================
   3. WOOCOMMERCE SUCCESS NOTICE (inside seat modal)
   ========================================================================== */

.ts-wc-success-notice {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 16px !important;
    margin: 0 0 12px 0 !important;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.4;
    color: #d4edda;
    background: rgba(40, 130, 70, 0.18) !important;
    border: 1px solid rgba(100, 220, 140, 0.3) !important;
    border-left: 4px solid #4caf7d !important;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-wc-success-notice--visible {
    opacity: 1;
    transform: translateY(0);
}

.ts-wc-success-notice--exiting {
    opacity: 0;
    transform: translateY(-6px);
}

.ts-wc-success-notice__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(76, 175, 125, 0.3);
    color: #4caf7d;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}


/* ==========================================================================
   4. RESERVED SEAT — Visual indicator on hover attempt
   ========================================================================== */

.tc_seat_reserved:hover,
.tc_blocked_seat:hover,
.tc_set_seat[aria-disabled="true"]:hover {
    cursor: not-allowed !important;
}

/* Subtle shake animation when user clicks a reserved seat */
@keyframes ts-seat-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

.tc_seat_reserved:active,
.tc_blocked_seat:active {
    animation: ts-seat-shake 0.4s ease-in-out;
}
