/**
 * MEC Dates - Promotions Styles
 * Ticket popup and coupon messages
 */

/* =====================================================
   TICKET SALES POPUP
   ===================================================== */

#mec-ticket-popup-overlay.mec-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

#mec-ticket-popup-overlay.mec-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mec-ticket-popup {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f6 100%);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(183, 110, 121, 0.25);
    max-width: 480px;
    width: 100%;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(183, 110, 121, 0.1);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mec-popup-overlay.active .mec-ticket-popup {
    transform: scale(1);
}

.mec-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #b76e79;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mec-popup-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.mec-popup-icon {
    font-size: 70px;
    margin-bottom: 25px;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(183, 110, 121, 0.2));
    animation: ticketBounce 3s ease-in-out infinite;
}

@keyframes ticketBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.mec-popup-title {
    font-size: 26px;
    font-weight: 800;
    color: #8c5a61;
    margin: 0 0 15px 0;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
}

.mec-popup-message {
    font-size: 16px;
    color: #7a6b6d;
    margin: 0 0 35px 0;
    line-height: 1.6;
}

.mec-popup-buttons {
    display: flex;
    gap: 15px;
}

.mec-popup-btn {
    flex: 1;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mec-popup-btn-primary {
    background: linear-gradient(135deg, #e5b2ca 0%, #b76e79 100%);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(183, 110, 121, 0.4);
}

.mec-popup-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(183, 110, 121, 0.5);
}

.mec-popup-btn-secondary {
    background: #fdf2f4;
    color: #b76e79;
    border: 1px solid rgba(183, 110, 121, 0.2);
}

.mec-popup-btn-secondary:hover {
    background: #fae4e8;
}

/* =====================================================
   COUPON MESSAGE IN CHAT
   ===================================================== */

.mec-chat-coupon-message {
    background: linear-gradient(135deg, #fdf2f4 0%, #fae4e8 100%);
    border-radius: 18px;
    padding: 25px;
    margin: 20px 15px;
    border-left: 5px solid #b76e79;
    box-shadow: 0 8px 16px -4px rgba(183, 110, 121, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    animation: couponSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes couponSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mec-coupon-icon {
    font-size: 45px;
    background: white;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(183, 110, 121, 0.1);
}

@keyframes giftRotate {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.mec-coupon-content {
    flex: 1;
    min-width: 0;
}

.mec-coupon-title {
    font-size: 18px;
    font-weight: 800;
    color: #8c5a61;
    margin-bottom: 5px;
}

.mec-coupon-message {
    font-size: 14px;
    color: #7a6b6d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.mec-coupon-message strong {
    color: #b76e79;
    font-weight: 800;
}

.mec-coupon-code-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mec-coupon-code {
    background: #fff;
    color: #FF6B6B;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    user-select: all;
    -webkit-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
}

.mec-coupon-copy-btn {
    background: white;
    color: #b76e79;
    border: 1px solid rgba(183, 110, 121, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.mec-coupon-copy-btn:hover {
    background: #b76e79;
    color: white;
}

.mec-coupon-copy-btn.copied {
    background: #4CAF50;
    color: #fff;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

/* Tablet */
@media (max-width: 768px) {
    .mec-ticket-popup {
        padding: 30px 20px;
        max-width: 90%;
    }

    .mec-popup-title {
        font-size: 24px;
    }

    .mec-popup-message {
        font-size: 15px;
    }

    .mec-popup-buttons {
        flex-direction: column;
    }

    .mec-popup-btn {
        width: 100%;
        min-width: 0;
    }

    .mec-chat-coupon-message {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .mec-coupon-code-container {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .mec-popup-icon {
        font-size: 60px;
        margin-bottom: 15px;
    }

    .mec-popup-title {
        font-size: 22px;
    }

    .mec-popup-message {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .mec-popup-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    .mec-coupon-icon {
        font-size: 40px;
    }

    .mec-coupon-title {
        font-size: 16px;
    }

    .mec-coupon-message {
        font-size: 13px;
    }

    .mec-coupon-code {
        font-size: 16px;
        padding: 8px 16px;
    }

    .mec-coupon-copy-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mec-ticket-popup {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    }

    .mec-popup-title {
        color: #FFD700;
    }

    .mec-popup-message {
        color: #ccc;
    }

    .mec-popup-close {
        color: #666;
    }

    .mec-popup-close:hover {
        color: #fff;
    }

    .mec-popup-btn-secondary {
        background: #444;
        color: #ccc;
    }

    .mec-popup-btn-secondary:hover {
        background: #555;
        color: #fff;
    }
}

/* iOS Safe Area */
@supports (padding: env(safe-area-inset-bottom)) {
    .mec-popup-overlay {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}