/**
 * Callbell Iframe Block Styles
 */

/* Wrapper */
.callbelliframe-wrapper {
    position: relative;
    width: 100%;

}

/* Inner Container */
.callbelliframe-inner {
    position: relative;
    background-color: #F9F4EC;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    padding: 40px;
    padding-left: 50px;
}

/* Color Bar */
.callbelliframe-color-bar {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.callbelliframe-color-segment {
    height: 25%;
}

.callbelliframe-color-segment.dark-green {
    background-color: var(--dark-green);
}

.callbelliframe-color-segment.tertiary {
    background-color: var(--tertiary);
}

.callbelliframe-color-segment.secondary {
    background-color: var(--secondary);
}

.callbelliframe-color-segment.primary {
    background-color: var(--primary);
}

/* Row Layout */
.callbelliframe-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

/* Columns */
.callbelliframe-content-col {
    flex: 0 0 60%;
    max-width: 60%;
}

.callbelliframe-iframe-col {
    flex: 0 0 calc(40% - 30px);
    max-width: calc(40% - 30px);
}

/* Content Styles */
.callbelliframe-title {
    color: var(--secondary);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: left;
}

.callbelliframe-content {
    text-align: left;
}

/* Style links in the WYSIWYG content */
.callbelliframe-content a {
    color: var(--secondary);
    text-decoration: underline;
    font-weight: bold;
}

/* Iframe Styles */
.callbelliframe-iframe {
    margin-bottom: 15px;
}

.callbelliframe-iframe-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 420px;
    /* Reduced from 600px (180px shorter) */
    /* Set a fixed height for the container */
}

.callbelliframe-iframe iframe {
    width: 100%;
    height: 500px;
    /* Reduced from 680px (180px shorter) */
    /* 420px + 80px to account for the hidden part */
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    clip: rect(0, auto, 420px, 0);
    /* Updated to match container height */
    /* Clip the bottom 80px */
}

.callbelliframe-caption {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .callbelliframe-row {
        flex-direction: column;
    }

    .callbelliframe-content-col,
    .callbelliframe-iframe-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Adjust iframe container for tablets */
    .callbelliframe-iframe-container {
        height: 420px;
        /* Keep the same height as desktop */
    }

    .callbelliframe-iframe iframe {
        height: 500px;
        /* Keep the same height as desktop */
        clip: rect(0, auto, 420px, 0);
        /* Keep the same clip as desktop */
    }
}

@media (max-width: 767px) {
    .callbelliframe-inner {
        padding: 30px;
        padding-left: 40px;
    }

    /* Clip-path approach for mobile */
    .callbelliframe-iframe-container {
        height: 350px;
        overflow: hidden;
        position: relative;
    }

    .callbelliframe-iframe {
        position: relative;
        height: 350px;
        overflow: hidden;
    }

    .callbelliframe-iframe iframe {
        display: block !important;
        position: static !important;
        height: 430px !important;
        /* 350px + 80px */
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        clip: unset !important;
        /* Remove clip property */
        clip-path: inset(0 0 80px 0) !important;
        /* Hide bottom 80px using clip-path */
    }
}