/* Shared Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-overlay.opacity-0 {
    pointer-events: none;
}

@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
        padding: 1rem;
    }
}

.modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 36rem; /* max-w-xl */
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    padding-top: 1rem;
    border: 1px solid #f3f4f6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
}

.dark .modal-content {
    background-color: #232323;
    border-color: #3c4043;
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: 24px;
        padding-top: 2rem;
    }
}

.modal-handle {
    display: flex;
    flex: none;
    justify-content: center;
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
    cursor: grab;
    touch-action: none;
}

@media (min-width: 768px) {
    .modal-handle {
        display: none;
    }
}

.modal-handle-bar {
    width: 3rem;
    height: 0.5rem;
    background-color: #d1d5db;
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.dark .modal-handle-bar {
    background-color: #5f6368;
}
