/**
 * Airsylvania Conversion Tools Styles
 * Exit-Intent Popup, WhatsApp Button, Sticky Mobile Bar
 */

/* =====================================================
   Exit Intent Popup
   ===================================================== */
.exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.exit-popup.active {
    opacity: 1;
    visibility: visible;
}

.exit-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.exit-popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.exit-popup.active .exit-popup-content {
    transform: scale(1) translateY(0);
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    color: #333;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.exit-popup-close:hover {
    background: white;
    transform: rotate(90deg);
}

.exit-popup-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.exit-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.exit-popup-rating {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.exit-popup-rating .star {
    color: #ffc107;
    margin-right: 3px;
}

.exit-popup-body {
    padding: 30px;
    text-align: center;
}

.exit-popup-body h3 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin: 0 0 12px;
    font-weight: 600;
}

.exit-popup-body p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 25px;
}

.exit-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exit-popup-cta {
    display: inline-block;
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.4);
}

.exit-popup-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 162, 39, 0.5);
}

.exit-popup-dismiss {
    background: none;
    border: none;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 10px;
    transition: color 0.2s;
}

.exit-popup-dismiss:hover {
    color: #333;
}

/* =====================================================
   WhatsApp Floating Button
   ===================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    color: white;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #333;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* =====================================================
   Sticky Mobile Booking Bar
   ===================================================== */
.sticky-booking-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9997;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.sticky-booking-bar.visible {
    transform: translateY(0);
}

.sticky-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    padding-right: 15px;
}

.sticky-cta {
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.3);
}

.sticky-cta:hover {
    transform: scale(1.05);
}

/* Desktop: hide sticky bar, adjust WhatsApp position */
@media (min-width: 769px) {
    .sticky-booking-bar {
        display: none !important;
    }

    .whatsapp-float {
        bottom: 30px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .exit-popup-content {
        width: 95%;
        max-width: 360px;
    }

    .exit-popup-image {
        height: 180px;
    }

    .exit-popup-body {
        padding: 25px 20px;
    }

    .exit-popup-body h3 {
        font-size: 1.4rem;
    }

    .exit-popup-body p {
        font-size: 0.95rem;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
        right: 15px;
        bottom: 85px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    .whatsapp-tooltip {
        display: none;
    }

    .sticky-text {
        font-size: 0.85rem;
    }

    .sticky-cta {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .sticky-text {
        font-size: 0.8rem;
    }

    .sticky-cta {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* =====================================================
   Reduced Motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    .exit-popup,
    .exit-popup-content,
    .exit-popup-close,
    .exit-popup-cta,
    .whatsapp-float,
    .whatsapp-tooltip,
    .sticky-booking-bar,
    .sticky-cta {
        transition: none;
    }
}
