/* Booking Widget Styles */
.meetaimy-booking-widget-wrapper {
    /* Wrapper is just a container - button is fixed positioned */
    position: static;
    width: 0;
    height: 0;
    overflow: visible;
}

/* Fixed Button Wrapper */
.meetaimy-booking-widget-button-wrapper {
    position: fixed;
    z-index: 1000001;
    pointer-events: none;
}

/* Position Classes */
.meetaimy-booking-widget-button-wrapper.meetaimy-booking-widget-position-top-left {
    top: 0;
    left: 0;
}

.meetaimy-booking-widget-button-wrapper.meetaimy-booking-widget-position-top-right {
    top: 0;
    right: 0;
}

.meetaimy-booking-widget-button-wrapper.meetaimy-booking-widget-position-bottom-left {
    bottom: 0;
    left: 0;
}

.meetaimy-booking-widget-button-wrapper.meetaimy-booking-widget-position-bottom-right {
    bottom: 0;
    right: 0;
}

.meetaimy-booking-widget-button {
    display: inline-block;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    position: relative;
}

.meetaimy-booking-widget-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.meetaimy-booking-widget-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Popup Overlay - Dark background overlay */
.meetaimy-booking-widget-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.meetaimy-booking-widget-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Preload iframe - keep it loaded but hidden when overlay is inactive */
.meetaimy-booking-widget-overlay:not(.active) .meetaimy-booking-widget-popup {
    pointer-events: none;
    left: -9999px;
}

.meetaimy-booking-widget-overlay:not(.active) .meetaimy-booking-widget-iframe {
    display: block;
}

/* Desktop: Popup positioned on the left side - Fade in/out animation */
.meetaimy-booking-widget-popup {
    position: fixed;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: hidden;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    max-height: 100vh;
    top: 0;
    left: 0;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.meetaimy-booking-widget-overlay.active .meetaimy-booking-widget-popup {
    opacity: 1;
    visibility: visible;
    left: 0;
    pointer-events: auto;
}

/* Close Button */
.meetaimy-booking-widget-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    padding: 0;
}

.meetaimy-booking-widget-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.meetaimy-booking-widget-close:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.meetaimy-booking-widget-close span {
    display: block;
    line-height: 1;
}

/* Popup Content */
.meetaimy-booking-widget-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.meetaimy-booking-widget-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    min-height: 100%;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Phone: Full screen popup */
@media (max-width: 768px) {
    .meetaimy-booking-widget-overlay {
        background-color: rgba(0, 0, 0, 0.75);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .meetaimy-booking-widget-overlay.active {
        display: flex;
    }

    .meetaimy-booking-widget-popup {
        position: relative;
        width: 100%;
        height: 100vh;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        background: transparent;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        overflow-x: hidden;
        overflow-y: hidden;
    }

    .meetaimy-booking-widget-overlay.active .meetaimy-booking-widget-popup {
        opacity: 1;
        visibility: visible;
    }

    .meetaimy-booking-widget-close {
        top: 5px;
        right: 5px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .meetaimy-booking-widget-iframe {
        min-height: 100%;
    }

    /* Smaller button on mobile */
    .meetaimy-booking-widget-button {
        font-size: 0.9em;
        padding: 12px 20px !important;
    }
}

/* Prevent body scroll when popup is open - only on mobile */
@media (max-width: 768px) {
    body.meetaimy-booking-widget-modal-open {
        overflow: hidden;
    }
}

