/* 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(--white-primary);
    box-shadow: var(--box-shadow);
    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(--black-primary);
    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(--black-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 {
    display: flex;
    justify-content: center;
    padding-top: 10px;
    width: 100%;
}

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

.bottom-sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    color: var(--black-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 */

/* Responsive adjustments for Smaller screens */

/* Bottom Sheet Two - Centered Modal on Desktop */

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

/* Note Sheet Specific Styles */
.note-sheet-desc {
    margin: 0 0 15px 0;
    color: var(--black-secondary);
    font-size: var(--font-14);
}

.note-textarea-wrapper {
    position: relative;
    width: 100%;
}

.note-sheet-textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 12px;
    resize: none;
    font-family: inherit;
    font-size: var(--font-14);
    color: var(--black-primary);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.note-sheet-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.note-sheet-char-count {
    position: absolute;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2px 6px;
    bottom: 10px;
    right: 10px;
    font-size: var(--font-12);
    color: var(--text-muted);
    pointer-events: none;
}

.note-sheet-footer {
    display: flex;
    align-items: center;
}

.note-sheet-btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 24px;
    background-color: var(--primary-color);
    color: var(--white-primary);
    font-weight: var(--font-weight-medium);
    font-family: var(--fontH);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.note-sheet-btn:hover {
    opacity: 0.9;
}

/* ============================================================
   RESPONSIVE GLOBAL LAYOUT (Breakpoints)
   ============================================================ */

@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 {
        right: 0;
        left: auto;
        width: 500px;
        height: 100dvh;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        border-radius: 0;
    }

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

    .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: 6px;
        box-shadow: var(--box-shadow);
        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;
    }

}