/* Bottom Sheet Component Styles - Modern Mobile App Design */
.ui-bottom-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.ui-bottom-sheet-backdrop[aria-hidden="false"] {
    display: block;
    opacity: 1;
    visibility: visible;
}

.ui-bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ui-bottom-sheet-backdrop[aria-hidden="false"] .ui-bottom-sheet {
    transform: translateY(0);
}

/* Drag Handle */
.ui-bottom-sheet-drag-handle {
    width: 40px;
    height: 4px;
    background-color: var(--color-border);
    border-radius: 2px;
    margin: 8px auto;
    cursor: grab;
    flex-shrink: 0;
}

.ui-bottom-sheet-draggable .ui-bottom-sheet-drag-handle {
    cursor: grab;
}

.ui-bottom-sheet-draggable.ui-bottom-sheet-dragging .ui-bottom-sheet-drag-handle {
    cursor: grabbing;
}

/* Bottom Sheet Header */
.ui-bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.ui-bottom-sheet-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
    margin: 0;
    flex: 1;
}

.ui-bottom-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: var(--spacing-md);
}

.ui-bottom-sheet-close:hover {
    background-color: var(--color-background-hover);
    color: var(--color-text);
}

.ui-bottom-sheet-close:active {
    transform: scale(0.95);
}

/* Bottom Sheet Body */
.ui-bottom-sheet-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling for bottom sheet body */
.ui-bottom-sheet-body::-webkit-scrollbar {
    width: 6px;
}

.ui-bottom-sheet-body::-webkit-scrollbar-track {
    background: var(--color-background);
}

.ui-bottom-sheet-body::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.ui-bottom-sheet-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

/* Dragging state */
.ui-bottom-sheet-dragging {
    transition: none;
}

/* Prevent body scroll when bottom sheet is open */
body.ui-bottom-sheet-open {
    overflow: hidden;
}

/* Desktop adjustments */
@media (min-width: 769px) {
    .ui-bottom-sheet {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }

    .ui-bottom-sheet-backdrop[aria-hidden="false"] .ui-bottom-sheet {
        transform: translateX(-50%) translateY(0);
    }

    .ui-bottom-sheet-dragging {
        transform: translateX(-50%) translateY(var(--drag-offset, 0));
    }
}
