/* Background overlay */
.shared-modal-overlay {
    display: none;  /* Hidden by default */
    position: fixed;
    z-index: 1000; /* On top of everything else */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6) !important; /* Semi-transparent background */
    transition: opacity 0.3s ease;
}

/* Modal container */
.shared-modal-container {
	display:none;
    position: fixed;
    z-index: 1010;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 90%;
    max-height: 90vh; /* Limit modal height to 90% of the viewport height */
    overflow-y: auto; /* Enable vertical scrolling */
    animation: slideIn 0.4s ease-out;
}

/* Modal header */
.shared-modal-header {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

/* Modal footer */
.shared-modal-footer {
    display: flex;
    justify-content: flex-end;
}

.shared-modal-footer button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

.shared-modal-footer button:hover {
    background-color: #0056b3;
}

.shared-modal-footer button.cancel {
    background-color: #f44336;
}

.shared-modal-footer button.cancel:hover {
    background-color: #d32f2f;
}

/* Close button styling matching events.css patterns */
.shared-modal-container .btn-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(244, 67, 54, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(244, 67, 54, 0.7);
}

.shared-modal-container .btn-close:before {
    content: '✕';
    color: #f44336;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.shared-modal-container .btn-close:hover {
    background-color: rgba(244, 67, 54, 0.2);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

.shared-modal-container .btn-close:active {
    transform: scale(0.9);
    background-color: rgba(244, 67, 54, 0.3);
}

/* Animation for modal */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
