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

.cb-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cb-popup {
    background: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.cb-popup-full {
    max-width: 90vw;
    width: 90%;
}

.cb-popup-constrained {
    max-width: 500px;
    width: 90%;
}

.cb-popup-overlay.show .cb-popup {
    transform: scale(1);
}

.cb-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-popup-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

.cb-popup-header {
    background: #f8f9fa;
    padding: 20px 50px 20px 20px;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.cb-popup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    padding-right: 30px;
}

.cb-popup-content {
    padding: 20px;
    line-height: 1.6;
    color: #555;
    max-height: 400px;
    overflow-y: auto;
    max-width: 70vw;
    margin-inline: auto;
}

/* When no title is shown, add padding to the top for the close button */
.cb-popup:not(.cb-popup-with-title) .cb-popup-content {
    padding-top: 50px;
}

.cb-popup-content p {
    margin: 0 0 15px 0;
}

.cb-popup-content p:last-child {
    margin-bottom: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cb-popup {
        width: 95%;
        margin: 20px;
    }
    
    .cb-popup-title {
        font-size: 20px;
        margin-right: 30px;
    }
    
    .cb-popup-header,
    .cb-popup-content {
        padding: 15px;
    }
    
    .cb-popup-header {
        padding-bottom: 0;
    }
}

/* Animation for mobile */
@media (max-width: 480px) {
    .cb-popup {
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .cb-popup-overlay.show .cb-popup {
        transform: translateY(0);
    }
}