/* Shared styles for welcome landing pages */

/* Common panel transitions and animations */
.panel-transition {
    transition: width 0.3s ease-out;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.fade-in {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.hidden {
    display: none !important;
}

/* Header container */
#header-container {
    position: sticky;
    top: 0;
    z-index: 100;
    pointer-events: auto;
}

/* Ensure header elements are clickable */
#header-container * {
    pointer-events: auto;
}

/* Prevent bounce scrolling on iPad and other devices */
html, body {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Make content scrollable if needed, but prevent bounce effect */
.grid-container--with-sidebar {
    overflow: visible;
    height: 100%;
    width: 100%;
}

/* Sidebar adjustments */
.sidebar-right.sidebar-large.sidebar-right--fixed {
    top: 63px !important;
    max-height: calc(100vh - 63px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Welcome steps panel */
#welcome-steps-panel {
    height: auto;
}

/* Steps container */
.steps-container {
    height: auto;
    min-height: min-content;
    padding-bottom: 30px;
}

/* Background image styling - base styles */
main#main-content {
    background-image: url('/static/buyer/assets/images/get-started-screen-bg.webp');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    z-index: 0;
}

/* Background overlay */
main#main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 26, 32, 0.55);
    z-index: -1;
}

/* Title group styling */
main#main-content .title-group {
    color: white;
}

main#main-content .title-group * {
    color: inherit !important;
}

/* MOBILE - Tablets and phones (768px and below) */
@media (max-width: 768px) {
    /* Allow scroll on the entire page */
    html, body {
        position: static;
        overflow: visible;
        height: auto;
    }
    
    /* Sidebar should not have its own scroll */
    .sidebar-right.sidebar-large.sidebar-right--fixed {
        max-height: none;
        overflow-y: visible;
        position: static;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: var(--spacing-sm) !important;
        padding-right: var(--spacing-sm) !important;
        box-sizing: border-box;
        z-index: 1;
    }
    
    /* Main container with normal block layout */
    .grid-container--with-sidebar {
        display: block;
        height: auto;
        overflow: visible;
        width: 100%;
    }
    
    /* Welcome steps panel full width */
    #welcome-steps-panel {
        width: 100%;
    }
    
    .steps-container {
        width: 100%;
    }
    
    /* Background pattern adjustment */
    .background-pattern::after {
        position: absolute;
        z-index: -2;
        height: 100%;
    }
    
    /* Mobile content adjustments */
    main#main-content {
        min-height: 70vh;
        padding: 100px 8px 30px 8px;
        aspect-ratio: unset;
        display: flex;
        align-items: flex-start;
        /* Fix background for mobile - show more of the image */
        background-attachment: scroll;
        background-size: auto 100%;
        background-position: center top;
    }
    
    main#main-content .content-group {
        margin-bottom: 20px;
        padding-top: 40px;
    }
}

/* MOBILE - Extra small phones (480px and below) */
@media (max-width: 480px) {
    main#main-content {
        min-height: 70vh;
        padding: 80px 6px 20px 6px;
        aspect-ratio: unset;
        display: flex;
        align-items: flex-start;
    }
    
    main#main-content .content-group {
        margin-bottom: 16px;
    }
}

/* LAPTOPS/OTHER SCREENS - Short screens (landscape phones, small laptops) */
@media (max-height: 465px) {
    main#main-content {
        padding: 80px 8px 20px 8px;
        min-height: 80vh;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
    }
    
    main#main-content::before {
        height: 100%;
        min-height: 200vh;
    }
    
    main#main-content .content-group {
        padding-top: 0px;
        margin-top: 0px;
    }
    
    main#main-content .content-row {
        margin-top: 0px;
    }
}
