/**
 * Popup styles for BK Pilates Theme
 * Two-column layout: text on left, image on right
 */

/* Popup Overlay */
.bk-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

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

/* Popup Container */
.bk-popup-container {
    position: relative;
    width: 780px;
    height: 540px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bk-popup-overlay.active .bk-popup-container {
    transform: scale(1);
}

/* Popup Wrapper - Two Column Layout */
.bk-popup-wrapper {
    display: flex;
    flex-direction: row;
    height: 100%;
}

/* Close Button */
.bk-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    padding: 0;
    margin: 0;
    transform-origin: center center;
}

.bk-popup-close::before,
.bk-popup-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: #333;
    border-radius: 1px;
    transition: background-color 0.3s ease;
}

.bk-popup-close::before {
    transform: rotate(45deg);
}

.bk-popup-close::after {
    transform: rotate(-45deg);
}

.bk-popup-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: rotate(90deg);
    transform-origin: center center;
}

.bk-popup-close:focus {
    outline: 2px solid #bda492;
    outline-offset: 2px;
}

/* Popup Content - Left Side */
.bk-popup-content {
    flex: 1;
    padding: 0 0 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #FFFFFF;
    text-align: center;
    min-width: 0;
}

.bk-popup-logo {
    margin-bottom: 15%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bk-popup-logo-img {
    width: 126px;
    height: 123px;
    object-fit: contain;
    display: block;
}

.bk-popup-title {
    font-family: var(--font-main, inherit);
    font-weight: 500;
    font-size: 36px;
    text-transform: uppercase;
    text-align: center;
    color: #2a2a2a;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.bk-popup-title .highlight {
    color: #ddc1ac;
}

.bk-popup-subtitle {
    font-family: var(--font-main, inherit);
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    color: #2a2a2a;
    margin: 0 0 35px 0;
    line-height: 1.6;
}

/* Popup Button */
.bk-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 70px;
    width: 253px;
    height: 60px;
    background: #e2c7b6;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-family: var(--font-main, inherit);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    align-self: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.bk-popup-button:hover {
    opacity: 0.8;
}

.bk-popup-button:active {
    opacity: 0.9;
}

/* Popup Image Wrapper - Right Side */
.bk-popup-image-wrapper {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background: #f0f0f0;
}

.bk-popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .bk-popup-container {
        width: 90%;
        max-width: 780px;
        height: auto;
        min-height: 400px;
    }

    .bk-popup-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .bk-popup-content {
        padding: 35px 25px;
        text-align: center;
    }

    .bk-popup-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .bk-popup-subtitle {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .bk-popup-button {
        align-self: center;
        padding: 18px 70px;
        width: 253px;
        height: 60px;
        font-size: 16px;
    }

    .bk-popup-image-wrapper {
        height: 250px;
        flex: none;
    }

    .bk-popup-image {
        object-position: center 20%;
    }
}

@media screen and (max-width: 480px) {
    .bk-popup-overlay {
        padding: 10px;
    }

    .bk-popup-content {
        padding: 30px 20px;
    }

    .bk-popup-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .bk-popup-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .bk-popup-button {
        padding: 18px 70px;
        width: 253px;
        height: 60px;
        font-size: 14px;
    }

    .bk-popup-image-wrapper {
        height: 200px;
    }

    .bk-popup-image {
        object-position: center 20%;
    }
}

/* Maintain fixed size on large screens */
@media screen and (min-width: 769px) {
    .bk-popup-container {
        width: 780px;
        height: 540px;
    }
}
