/* Slide-out Panel */
#BNslideOutPanel {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden initially */
    width: calc(100vw * .6); /* Full width if needed, adjust as necessary */
    height: 100%;
    max-width: 950px;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
    transition: right 0.8s ease;
    padding: 0;
    z-index: 1000;
    overflow: hidden;
}

/* Panel when opened */
#BNslideOutPanel.open {
    right: 0;
}

/* Close button */
#BNmodal #closePanel {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    z-index: 999;
}
#BNmodal #closePanel:focus {
    outline: none;
}

/* Full Responsive Iframe */
#BNslideOutPanel .iframe-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 25px;
}
#BNmodal .iframe-container {
    position: absolute;
    top: 12px;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 30px;
}


#BNmodal #iframe-container iframe,
#BNmodal #iframe-container > iframe {
    width: 100%;
    height: 100%;
    border: none;
    padding: 25px;
    flex: 1; /* Fill entire container */
}

/* Open Button */
#BNmodal #panelIframe {
    height: 100vh;
    border: 0px;
    
}
#OpenPanel{
    width: 202px;
    height: 60px;
    background-color: #f13a1a;
    color: #fff;
    font-weight: 700;
    border: 0px solid;
    font-size: 22px;
    border-radius: 6px;
    margin: 20px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}
.BNmodal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
/* Modal visible with fade-in effect */
.BNmodal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal content */
.BNmodal-content {
    position: relative;
    background: white;
    width: 80%;
    max-width: 800px;
    height: 92%;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
}

/* Scale in effect when active */
.BNmodal.active .BNmodal-content {
    transform: scale(1);
}


/* Close button */
#BNmodal .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    outline: none; /* Prevents focus outline */
    cursor: pointer;
    padding: 5px;
    z-index: 999;
}
#BNmodal .close-btn:focus {
    outline: none;
}
.BNslideout {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100vw; /* Always full screen for interaction + background click */
    pointer-events: none;
    z-index: 999;
}

/* === Slideout Content (Sliding panel) === */
.BNslideout-content {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    will-change: transform;
}

/* === Slide in on activation === */
.BNslideout.active {
    pointer-events: all;
}
.BNslideout.active .BNslideout-content {
    transform: translateX(0%);
}
#BNslideout .slideout-body {
    flex-grow: 1;
    overflow: auto;
    padding: 20px;
}

#BNslideout #slideoutIframe {
    width: 100%;
    height: 98%;
    border: none;
}

#BNslideout .close-slideout {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1;
}
/* === Responsive Panel Widths === */
@media (min-width: 1200px) {
    .BNslideout-content {
        width: 60vw;
        max-width:700px
    }
}
@media (min-width: 991px) and (max-width: 1199px) {
    .BNslideout-content {
        width: 70vw;
        max-width:700px
    }
}
#BookNowSlide .appointmentBox .bookAppointment .logoCol .logoBox img{width: 250px;}
@media only screen and (max-width: 991px) {
    #BookNowSlide .appointmentBox .bookAppointment .logoCol .logoBox imgg{width: 200px;}
    #BNslideOutPanel {
        width: calc(100vw* .75);
    }
    .BNslideout-content {
        width: 80vw;
        max-width:700px
    }
}
@media only screen and (max-width: 767px) {
    #BookNowSlide .appointmentBox .bookAppointment .logoCol .logoBox img{width: 150px;}
    #BNslideOutPanel {
        width: calc(100vw);
    }
    .BNslideout-content {
        width: 100vw;
    }
    .BNmodal-content {
        width: 100%;
        height: 100%;
        padding:2px;
    }
    .BNmodal {padding: 5px;}
    #BNmodal .iframe-container {padding: 5px 5px 25px 5px;}
    #BNslideOutPanel .iframe-container {padding: 40px 5px 25px 5px;}
}