/* Popup Manager Styles */
.bpopup-dialog {
    border: none;
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;

    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                display 0.4s allow-discrete;
}

.bpopup-dialog[open] {
    opacity: 1;
    transform: scale(1);
}

/* Entry Animation */
@starting-style {
    .bpopup-dialog[open] {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Backdrop styling */
.bpopup-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease, display 0.4s allow-discrete;
}

.bpopup-dialog[open]::backdrop {
    opacity: 1;
}

@starting-style {
    .bpopup-dialog[open]::backdrop {
        opacity: 0;
    }
}

/* Content Container */
.bpopup-content {
    position: relative;
    padding: 40px;
    direction: rtl;
    text-align: center;
}

/* Close Button */
:is(button.bpopup-close) {
    position: absolute;
    top: 5px;
    left: 15px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
}

.bpopup-close:hover {
    background: transparent;
}

.bpopup-close svg {
    width: 18px;
    height: 18px;
    color: #4b5563;
}

/* Inner Elements */
.bpopup-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 20px;
}

.bpopup-html-container {
    text-align: initial;
}

/* Action Button (if close text is customized) */
.bpopup-action-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--wd-primary-color, #c2a77e);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

.bpopup-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
}
