.shared-modal-content {
    position: relative;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: none;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Ensure modal doesn't overflow viewport */
    overflow: visible; /* Allow close button to render outside the box */
}

.shared-modal-header {
    padding: 16px;
    border-bottom: 1px solid #dee2e6;
    font-size: 1.25rem;
    font-weight: 500;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    border-radius: 12px 12px 0 0;
}

.shared-modal-body {
    padding: 24px;
    overflow-y: auto; /* Allow body to scroll if content is too long */
}

.shared-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #dc3545; /* Red */
    color: white;
    border: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 1100; /* Higher z-index to ensure it's above modal backdrop */
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto; /* Ensure button is clickable */
}

.shared-close-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.shared-close-btn-x {
    transform: translateY(-1px); /* Fine-tune position of the 'X' */
}
