/* Modal Styles */
.scdev-sb-v2-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

@media (max-width: 768px) {
    .scdev-sb-v2-modal {
        align-items: center !important;
        justify-content: center !important;
    }
}

.scdev-sb-v2-modal.show {
    opacity: 1;
    visibility: visible;
}

.scdev-sb-v2-modal.scdev-hidden {
    display: none !important;
}

.scdev-sb-v2-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.scdev-sb-v2-modal-content {
    position: relative;
    z-index: 10001;
    background: #ffffff;
    border-radius: 8px;
    max-width: 460px;
    width: 90%;
    max-height: 80vh;
    min-height: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin: auto;
}

.scdev-sb-v2-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    position: relative;
    flex-shrink: 0;
}

.scdev-sb-v2-modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    flex: 1;
}

.scdev-sb-v2-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666666;
    transition: color 0.2s;
    font-weight: 300;
    line-height: 1;
    position: absolute;
    right: 12px;
    top: 6px;
}

.scdev-sb-v2-modal-close:hover {
    color: #000000;
}

.scdev-sb-v2-modal-body {
    padding: 8px 16px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
}

/* Night mode styles */
body.night-mode .scdev-sb-v2-modal-content {
    background: var(--scdev-bg-primary);
}

body.night-mode .scdev-sb-v2-modal-header {
    background: var(--scdev-bg-secondary);
    border-bottom-color: var(--scdev-border-light);
}

body.night-mode .scdev-sb-v2-modal-header h2 {
    color: #0066cc;
}

body.night-mode .scdev-sb-v2-modal-close {
    color: var(--scdev-text-secondary);
}

body.night-mode .scdev-sb-v2-modal-close:hover {
    color: var(--scdev-text-primary);
}

body.night-mode .scdev-sb-v2-modal-body {
    background: var(--scdev-bg-primary);
}

.scdev-sb-v2-section {
    margin-bottom: 8px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .scdev-sb-v2-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 0 auto;
    }
    
    .scdev-sb-v2-modal-body {
        padding: 8px 12px 12px 12px;
    }
}
