/**
 * Product Popup Button Styles - Final Version
 * Version: 1.0.0
 */

/* ==========================================================================
   Button Styles
   ========================================================================== */

button.bwdwppb-elementor-close {
    position: absolute;
    right: 11px;
    top: 11px;
    z-index: 1;
    padding: 0;
    line-height: 0;
    width: 25px;
    height: 25px;
    border: 1px solid #c36;
    color: #c36;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bwdwppb-elementor-popup-button {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bwdwppb-elementor-popup-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.bwdwppb-elementor-popup-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bwdwppb-elementor-popup-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.25);
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.bwdwppb-elementor-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    /* animation: ppbModalFadeIn 0.3s ease-out; */
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes ppbModalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(3px);
    }
}

.bwdwppb-elementor-modal-content {
    background-color: #ffffff;
    margin: 0 auto;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: ppbModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ppbModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   Modal Header
   ========================================================================== */

.bwdwppb-elementor-modal-header {
    background-color: #e9ecef;
    padding: 25px 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.bwdwppb-elementor-modal-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

.bwdwppb-elementor-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2;
}

/* Close Button */
.bwdwppb-elementor-close {
    color: #6c757d;
    background: transparent;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -8px;
}

.bwdwppb-elementor-close:hover {
    color: #ffffff;
    background-color: #dc3545;
    transform: rotate(90deg) scale(1.1);
}

.bwdwppb-elementor-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* ==========================================================================
   Modal Body
   ========================================================================== */

.bwdwppb-elementor-modal-body {
    padding: 30px;
    max-height: 65vh;
    overflow-y: auto;
    line-height: 1.6;
    color: #495057;
}

/* Custom Scrollbar */
.bwdwppb-elementor-modal-body::-webkit-scrollbar {
    width: 8px;
}

.bwdwppb-elementor-modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.bwdwppb-elementor-modal-body::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.bwdwppb-elementor-modal-body::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Firefox scrollbar */
.bwdwppb-elementor-modal-body {
    scrollbar-width: thin;
    scrollbar-color: #ced4da #f8f9fa;
}

/* ==========================================================================
   Body State When Modal is Open
   ========================================================================== */

body.bwdwppb-elementor-modal-open {
    overflow: hidden;
    padding-right: 15px; /* Prevent layout shift from scrollbar */
}

/* ==========================================================================
   Content Styling
   ========================================================================== */

.bwdwppb-elementor-modal-body h1,
.bwdwppb-elementor-modal-body h2,
.bwdwppb-elementor-modal-body h3,
.bwdwppb-elementor-modal-body h4,
.bwdwppb-elementor-modal-body h5,
.bwdwppb-elementor-modal-body h6 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.bwdwppb-elementor-modal-body p {
    margin-bottom: 15px;
}

.bwdwppb-elementor-modal-body ul,
.bwdwppb-elementor-modal-body ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.bwdwppb-elementor-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.bwdwppb-elementor-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.bwdwppb-elementor-modal-body table th,
.bwdwppb-elementor-modal-body table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.bwdwppb-elementor-modal-body table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.bwdwppb-elementor-modal-body blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    font-style: italic;
}

.bwdwppb-elementor-modal-body code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.bwdwppb-elementor-modal-body pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Focus visible support */
.bwdwppb-elementor-popup-button:focus-visible,
.bwdwppb-elementor-close:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .bwdwppb-elementor-modal,
    .bwdwppb-elementor-popup-button {
        display: none !important;
    }
}

