/* ==========================================================================
   Bottom Sheet Component Styles
   ========================================================================== */

/* Draggable Bottom Sheet Base Styles */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 14px;
    font-weight: var(--font-weight-normal);
    line-height: 1.3125;
    background: rgba(0, 0, 0, .2);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
}

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

.bottom-sheet {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 500px;
    background-color: var(--bg-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: 16px;
    font-weight: var(--font-weight-normal);
    color: var(--text-primary);
    line-height: 1.3125;
}

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

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


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

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


/* Bottom Sheet Two - Centered Modal on Desktop */
.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;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    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;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

/* Tablet Landscape / Small Laptop */
@media (max-width: 1024px) {

    .bottom-sheet,
    .bottom-sheet.bottom-sheet-two {
        width: 420px;
    }
}

/* 4. Tablet */
@media (max-width: 768px) {

    .bottom-sheet,
    .bottom-sheet.bottom-sheet-two {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 100dvh;
        border-radius: 16px 16px 0px 0px;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        opacity: 1;
        visibility: visible;
    }

    .bottom-sheet.active,
    .bottom-sheet.bottom-sheet-two.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* 5. Mobile */
@media (max-width: 480px) {
    .bottom-sheet-header {
        padding: 12px 16px;
    }

    .bottom-sheet-body {
        padding: 16px;
    }
}

/* 6. Very Small Mobile */
@media (max-width: 360px) {
    .bottom-sheet-header h3 {
        font-size: 15px;
    }
}