/* User Forms Section Styles */

/* Fix white bar between header and content - vc-header has negative top position */
.vc-header ~ .user-forms-container .custom-header-bg-sub {
    margin-top: -136px;
    padding-top: 136px;
}

.custom-header-bg-sub {
    background-color: #6936d3;
}

.custom-header-bg-sub__head {
    min-height: 300px;
}

.custom-header-bg-sub__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #FFFFFF;

    h1 {
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 24px !important;
    }

    p {
        font-size: 18px;
        font-weight: 500;
    }
}

.user-forms-content-wrapper {
    margin: 80px;
}

/* Tablet and mobile - reduce margins */
@media (max-width: 991px) {
    .user-forms-content-wrapper {
        margin: 40px 24px;
    }
}

.user-forms-content-wrapper .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.user-forms-content-wrapper .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.user-forms-content-wrapper .col-lg-3,
.user-forms-content-wrapper .col-md-4,
.user-forms-content-wrapper .col-lg-9,
.user-forms-content-wrapper .col-md-8 {
    padding: 0 15px;
}

/* Category Sidebar */
.category-sidebar {
    background: #ffffff;
    max-width: 320px;
}

/* Desktop View - Vertical List */
.category-item {
    display: flex !important;
    flex-direction: column;
    cursor: pointer;
    transition: opacity 0.2s ease;

    h3 {
        color: #6936D3;
        font-size: 18px;
        font-weight: 600;
        line-height: 27px;
        margin-bottom: 20px;
        margin-top: 20px;
    }
}

.category-item:hover {
    background: #F0EBFB;
}

.category-item:hover .category-title {
    color: #6936D3;
}

.category-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 27px;
    color: #212529;
    margin: 16px 0 16px 0;
}

.category-divider {
    width: 100%;
    height: 1px;
    background: #EAEAEA;
}

/* Mobile Dropdown Styles */
.category-dropdown-toggle {
    display: none;
}

.category-dropdown-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-left: 8px;
    color: #ABADB9;
}

.category-dropdown-icon svg {
    width: 100%;
    height: 100%;
}

.category-sidebar.mobile-open .category-dropdown-icon {
    transform: rotate(180deg);
}

/* Desktop - Show category items directly */
@media (min-width: 992px) {
    .category-dropdown-toggle {
        display: none !important;
    }

    .category-items-container {
        display: block !important;
        max-height: none !important;
        border: none !important;
        margin-top: 0 !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
    }

}

/* Forms List */
.forms-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

/* Form Item */
.form-item {
    background: #FAF9FF;
    border-radius: 16px;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all 0.3s ease;
}

.form-item:hover {
    box-shadow: 0 4px 12px rgba(105, 54, 211, 0.1);
}

.form-item-content {
    flex: 1;
    min-width: 0;
}

.form-item-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    color: #1F2E45;
    margin: 0;
}

/* Download Link */
.form-item-download {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.form-item-download:hover {
    transform: translateX(4px);
    text-decoration: none;
}

.download-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 18px;
    color: #6936D3;
    white-space: nowrap;
}

.download-icon {
    width: 12.98px;
    height: 9.29px;
    color: #6936D3;
}

/* Responsive Styles */
@media (min-width: 992px) {
    .user-forms-content-wrapper .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .user-forms-content-wrapper .col-lg-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }
}

@media (max-width: 991px) {
    .category-divider {
        display: none;
    }

    .category-sidebar {
        width: 100%;
        max-width: 100%;
        position: relative;
        min-height: 60px;
    }

    /* iPad/Tablet - Full width layout */
    .user-forms-content-wrapper .col-lg-3,
    .user-forms-content-wrapper .col-md-4,
    .user-forms-content-wrapper .col-lg-9,
    .user-forms-content-wrapper .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .user-forms-content-wrapper .row {
        margin: 0;
    }

    .user-forms-content-wrapper .col-lg-3,
    .user-forms-content-wrapper .col-md-4,
    .user-forms-content-wrapper .col-lg-9,
    .user-forms-content-wrapper .col-md-8 {
        padding: 0;
    }

    .user-forms-sidebar-wrapper {
        margin-bottom: 24px !important;
    }

    /* Mobile Dropdown Toggle - Figma Design */
    .category-dropdown-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 48px;
        padding: 8px 16px 8px 8px;
        border: 1px solid #EAEAEA;
        border-radius: 8px;
        background: #FFFFFF;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        z-index: 10;
        user-select: none;
    }

    .category-dropdown-toggle:hover {
        border-color: #D1D5DB;
        background-color: #FFFFFF;
    }

    .category-dropdown-toggle:focus {
        outline: none;
        border-color: #6936D3;
        box-shadow: 0 0 0 2px rgba(105, 54, 211, 0.15);
    }

    .category-sidebar.mobile-open .category-dropdown-toggle {
        border-color: #EAEAEA;
        box-shadow: none;
    }

    .category-dropdown-toggle .category-title {
        font-family: 'Poppins', sans-serif;
        font-weight: 400;
        font-size: 14px;
        line-height: 21px;
        color: #ABADB9;
        flex: 1;
        text-align: left;
        margin: 0;
        transition: all 0.2s ease;
    }

    /* When dropdown is closed (not showing) - bold and black */
    .category-dropdown-toggle .category-title:not(.is-dropdown-open) {
        color: #212529;
        font-weight: 600;
    }

    /* When dropdown is open (showing) - grey */
    .category-sidebar.mobile-open .category-dropdown-toggle .category-title {
        color: #ABADB9;
        font-weight: 400;
    }

    .category-dropdown-toggle .category-dropdown-icon {
        flex-shrink: 0;
        color: #ABADB9;
    }

    .category-sidebar.mobile-open .category-dropdown-toggle .category-dropdown-icon {
        transform: rotate(180deg);
    }

    /* Dropdown container - Figma Design */
    .category-items-container {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        border: none;
        border-radius: 8px;
        background: #FFFFFF;
        overflow-y: auto;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease, max-height 0.2s ease;
        z-index: 1000;
        box-shadow: 0 7px 7px rgba(0, 0, 0, 0.04);
    }

    .category-sidebar.mobile-open .category-items-container {
        max-height: 320px;
        opacity: 1;
        visibility: visible;
    }

    /* Hide category items by default on mobile */
    .category-sidebar .category-item {
        display: none;
    }

    /* Show items when dropdown is open - Figma Design */
    .category-sidebar.mobile-open .category-item {
        display: flex;
        flex-direction: column;
        padding: 8px 16px;
        gap: 0;
        cursor: pointer;
        transition: all 0.15s ease;
        user-select: none;
        border-radius: 2px;
    }

    .category-sidebar.mobile-open .category-item .category-title {
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        line-height: 21px;
        font-weight: 400;
        color: #212529;
        margin: 0;
    }

    .category-sidebar.mobile-open .category-item .category-divider {
        display: none;
    }

    .category-sidebar.mobile-open .category-item:focus {
        outline: none;
        background-color: #F8F9FA;
    }

    .category-sidebar.mobile-open .category-item:hover {
        background: #F0EBFB;
    }

    .category-sidebar.mobile-open .category-item:hover .category-title {
        color: #6936D3;
    }

    .category-sidebar.mobile-open .category-item.active {
        background-color: #F0EBFB;
    }

    .category-sidebar.mobile-open .category-item.active .category-title {
        color: #6936D3;
        font-weight: 500;
    }

    .category-sidebar.mobile-open .category-item.active:hover .category-title {
        color: #6936D3;
    }

    .custom-header-bg-sub__text {
        padding: 0px 24px 24px 24px;

        h1 {
            text-align: center;
            margin-bottom: 8px !important;
        }

        p {
            text-align: center;
        }


    }
}

@media (max-width: 767px) {
    .form-item {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
}

@media (max-width: 575px) {
    .user-forms-content-wrapper {
        margin: 24px;
    }

    .form-item {
        padding: 24px;
    }

    .form-item-title {
        line-height: 19.5px;
    }
}