/* Draggable Bottom Sheet Base Styles */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: var(--fontB);
    font-size: var(--font-14);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
}

.bottom-sheet-overlay.active {
    display: block;
    opacity: 1;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    right: 0;
    width: auto;
    background-color: var(--bg-primary);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transform: translateY(100%);
    /* transition removed - will be added per breakpoint */
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.bottom-sheet-header h3 {
    margin: 0;
    font-size: var(--font-16);
    font-weight: var(--font-weight-normal);
    color: var(--text-primary);
    font-family: var(--fontH);
    line-height: var(--line-height-normal);
}

.btn-close {
    background: none;
    border: none;
    font-size: var(--font-20);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    opacity: 0.7;
    font-family: var(--fontB);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
}

.btn-close:hover {
    opacity: 1;
}

.bottom-sheet-handle .handle-two {
    width: 40px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    cursor: grab;
    display: flex;
}

.bottom-sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    color: var(--text-primary);
    font-family: var(--fontB);
    font-size: var(--font-14);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
}

.bottom-sheet-footer {
    padding: 10px 15px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    font-family: var(--fontB);
    font-size: var(--font-14);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
}

/* Responsive adjustments for larger screens */
@media (min-width: 1200px) {
    .bottom-sheet {
        width: 500px;
    }
}

@media (max-width: 1200px) {
    .bottom-sheet {
        width: 420px;
    }
}

/* Responsive adjustments for Smaller screens */
@media (max-width: 768px) {
    .bottom-sheet {
        right: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 100dvh;
        border-radius: 15px 15px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .bottom-sheet.active {
        transform: translateY(0);
    }

}

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


/* Bottom Sheet Two - Centered Modal on Desktop */
@media (min-width: 768px) {
    .bottom-sheet.bottom-sheet-two {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -45%);
        opacity: 0;
        visibility: hidden;
        height: auto;
        width: 500px;
        /* Default desktop width */
        max-width: 90vw;
        max-height: 85vh;
        border-radius: 12px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s;
    }

    .bottom-sheet.bottom-sheet-two.active {
        transform: translate(-50%, -50%);
        opacity: 1;
        visibility: visible;
    }

    .bottom-sheet.bottom-sheet-two .bottom-sheet-header {
        padding: 15px;
    }


    /* Adjust width for smaller desktop screens if needed, 
       mirroring the original bottom-sheet behavior but centered */
    @media (max-width: 1200px) {
        .bottom-sheet.bottom-sheet-two {
            width: 420px;
        }
    }
}

/* Share Sheet Styles moved to components.css */
/* Media Sheet Grid Styles moved to select_media_sheet.css */