/* Block Modal - Frontend Styles */

/* Hide source container */
.block-modal-container {
    display: none !important;
}

/* Modal overlay */
.block-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

/* Modal content */
.block-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

/* Modal header */
.block-modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

/* Close button */
.block-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

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

/* Modal body */
.block-modal-body {
    /* Ensure content displays properly */
}

.block-modal-body > *:first-child {
    margin-top: 0;
}

.block-modal-body > *:last-child {
    margin-bottom: 0;
}

/* Animations */
@keyframes blockModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes blockModalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Scrollbar styling */
.block-modal-content::-webkit-scrollbar {
    width: 8px;
}

.block-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.block-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.block-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media screen and (max-width: 767px) {
    .block-modal-content {
        padding: 15px;
        border-radius: 8px;
    }

    .block-modal-close {
        font-size: 22px;
    }
}

/* Body overflow when modal is open */
body.block-modal-open {
    overflow: hidden;
}
