/* Services Booking Promo Modal CSS */
.sb-promo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sb-promo-modal-overlay.sb-show {
    opacity: 1;
    visibility: visible;
}

.sb-promo-modal-container {
    background: #fff;
    width: 90%;
    max-width: 900px; /* Increased from 800px */
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    display: flex;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
}

/* Full Layout Modifier */
.sb-promo-modal-overlay.sb-layout-full .sb-promo-modal-container {
    flex-direction: column;
    width: 90%;
    max-width: 600px; /* Base width */
    overflow-y: auto; /* Allow scrolling if too tall */
}

.sb-promo-modal-overlay.sb-show .sb-promo-modal-container {
    transform: scale(1);
}

.sb-promo-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    color: #333;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sb-promo-close:hover {
    background: #fff;
    color: #000;
}

/* Media Section */
.sb-promo-media {
    flex: 1;
    background: #fff; /* Changed from #f3f4f6 to #fff to blend with contain */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
    position: relative;
}

/* Full Layout Media */
.sb-promo-modal-overlay.sb-layout-full .sb-promo-media {
    flex: none;
    width: 100%;
    height: auto;
    min-height: auto;
    max-height: none; /* Remove height cap */
    display: block;
    aspect-ratio: auto; /* Let image define aspect ratio */
}

.sb-promo-modal-overlay.sb-layout-full .sb-promo-media img,
.sb-promo-modal-overlay.sb-layout-full .sb-promo-media video {
    width: 100%;
    height: auto; /* Auto height to maintain aspect ratio */
    max-height: 50vh; /* Limit to 50% of viewport height to keep content visible */
    object-fit: contain; /* Ensure full image is visible */
    display: block;
    margin: 0 auto;
}

.sb-promo-media img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure no crop */
    display: block;
}

/* Full Layout Image behavior */
.sb-promo-modal-overlay.sb-layout-full .sb-promo-media img {
    object-fit: contain;
    height: auto;
    max-height: 50vh;
    width: 100%;
}

.sb-promo-media video, 
.sb-promo-media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Section */
.sb-promo-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    overflow-y: auto;
}

/* Full Layout Content */
.sb-promo-modal-overlay.sb-layout-full .sb-promo-content {
    padding: 30px;
    flex: none; /* Auto height based on content */
}

.sb-promo-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.2;
}

.sb-promo-desc {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Campaign Code Box */
.sb-promo-code-box {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
}

.sb-promo-code-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.sb-promo-code-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sb-promo-code-text {
    font-family: monospace;
    font-size: 20px;
    font-weight: bold;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 4px;
}

.sb-promo-copy-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s;
}

.sb-promo-copy-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Buttons */
.sb-promo-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sb-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    flex: 1;
    white-space: nowrap;
}

.sb-btn-primary {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}

.sb-btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.sb-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.sb-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111;
}

/* Responsive */
@media (max-width: 768px) {
    .sb-promo-modal-container {
        flex-direction: column;
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .sb-promo-media {
        min-height: 200px;
        flex: none;
    }
    
    .sb-promo-modal-overlay.sb-layout-full .sb-promo-media {
        max-height: none; /* Let it flow on mobile */
    }

    .sb-promo-content {
        padding: 24px;
    }

    .sb-promo-title {
        font-size: 22px;
    }
    
    .sb-promo-actions {
        flex-direction: column;
    }
    
    .sb-btn {
        width: 100%;
    }
}
