/* SDM Modal Popup Styles */
.sdm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sdm-modal-overlay.show {
    display: block;
    opacity: 1;
}

.sdm-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    opacity: 0;
    transition: all 0.3s ease;
}

.sdm-modal.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.sdm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.sdm-modal-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.sdm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sdm-modal-close:hover {
    color: #333;
}

.sdm-modal-body {
    padding: 20px;
    max-height: calc(80vh - 140px);
    overflow-y: auto;
}

.sdm-modal-body h1,
.sdm-modal-body h2,
.sdm-modal-body h3,
.sdm-modal-body h4,
.sdm-modal-body h5,
.sdm-modal-body h6 {
    margin-top: 0;
}

.sdm-modal-body p:last-child {
    margin-bottom: 0;
}

/* Hidden content divs - specific to modal content */
.sdm-modal-content-hidden {
    display: none !important;
}

.sdm-modal-body .wpforms-field-label {
    color: black !important;
}

.sdm-modal-body .wpforms-submit {
    color: var(--main-button-text-color) !important;
    border: none !important;
    background-color: var(--main-button-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sdm-modal {
        width: 95%;
        max-width: none;
    }
    
    .sdm-modal-body {
        max-height: calc(80vh - 120px);
    }
}

/* Smooth scrollbar for modal body */
.sdm-modal-body::-webkit-scrollbar {
    width: 6px;
}

.sdm-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sdm-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.sdm-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}