/**
 * EasyRx Categories Display Styles
 * 
 * @package EasyRx_Categories
 * @since 1.0.0
 */

/* Categories Section */
.medication-categories-section {
    padding: 48px 0;
    border-bottom: 1px solid #D0D5DD;
}

.medication-categories-section  .categories-title {
    color: #101828;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 28px;
}

/* Alphabet Navigation */
.alphabet-navigation {
    margin: 24px 0px;
    text-align: center;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.alphabet-nav > .alphabet-btn {
    background-color: #fff;
    border: 1px solid #D0D5DD;
    color: #101828;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    min-width: 44px;
    text-align: center;
    outline: none;
}
.alphabet-nav > .alphabet-btn:hover {
    background-color: #038935;
    color: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
}

.alphabet-nav > .alphabet-btn.active {
    background-color: #038935;
    color: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
}


/* Categories Grid */
.category-item {
    margin-bottom: 8px;
}

.category-item > .category-link {
    color: #101828;
    text-decoration: none;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    display: block;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.category-item > .category-link:hover {
    color: #038935;
    text-decoration: none;
}

.category-item > .category-link.current-category {
    color: #038935;
}

/* No Results Message */
.no-categories-found {
    margin-top: 40px;
}

.no-categories-found .alert-info {
    border: none;
    background-color: transparent;
}

.no-categories-found .alert-info > p {
    color: #101828;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
}

.categories-mobile {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .medication-categories-section {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .alphabet-nav {
        gap: 4px;
    }
    
    .alphabet-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 35px;
    }
    
    .categories-title {
        font-size: 1.8em;
    }
    
    .category-link {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .alphabet-nav {
        gap: 2px;
    }
    
    .alphabet-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 30px;
    }
    
    .categories-title {
        font-size: 1.5em;
    }
    
    .category-card {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .alphabet-navigation {
        display: none;
    }

    .categories-grid {
        display: none;
    }

    .categories-mobile {
        display: block;
    }

    .categories-mobile .categories-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border: 1px solid #D0D5DD;
        border-radius: 8px;
        padding: 8px 16px;
    }

    .categories-mobile .categories-toggle > p {
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 20px;
        margin: 0px;
        color: #667085;
    }

    /* Overlay Background */
    .categories-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.40);
        z-index: 999;
    }

    .categories-overlay.active {
        display: block;
    }

    .categories-mobile .categories-list-container {
        display: none;
        background-color: #fff;
        width: 100%;
        height: 70vh;
        padding: 0px;
        margin: 0px;
        position: fixed;
        bottom: 0px;
        left: 0px;
        z-index: 1000;
        border-radius: 16px 16px 0 0;
        animation: slideUp 0.3s ease-out;
        flex-direction: column;
    }

    .categories-mobile .categories-list-container.active {
        display: flex;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .categories-mobile .categories-list {
        list-style: none;
        overflow-y: scroll;
        background-color: #fff;
        overflow-x: hidden;
        flex: 1;
        padding: 0px;
        margin: 0px;
    }

    .categories-mobile .categories-list > .category-item {
        margin: 0;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding-right: 16px;
    }

    .categories-mobile .categories-list > .category-item.hidden {
        display: none !important;
    }

    .categories-mobile .categories-list > .category-item > a {
        font-size: 17px;
        font-style: normal;
        font-weight: 400;
        line-height: 22px; /* 129.412% */
        letter-spacing: -0.408px;
        color: #101828;
        padding: 11px 16px;
        flex: 1;
    }

    /* Search Input Wrapper */
    .category-input-wrapper {
        position: relative;
        display: inline-block;
        width: 100%;
        padding: 12px 16px;
        flex-shrink: 0;
    }

    /* Search Input Field */
    .category-input-wrapper .category-input {
        width: 100%;
        height: 40px;
        background-color: #FFFFFF; /* White background */
        border-radius: 100px;
        border: 1px solid #D0D5DD;
        padding: 8px 20px 8px 52px; /* Space for icon on left */
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: 150%;
        color: #101828;
        box-sizing: border-box;
        outline: none;
        transition: all 0.3s ease;
    }

    .category-input-wrapper .category-input:focus {
        border-color: #038935;
        background-color: #fff;
    }

    .category-input-wrapper .category-input::placeholder {
        color: #667085; 
    }

    .category-input-wrapper .icon-search {
        position: absolute;
        left: 28px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 24px;
        height: 24px;
    }

        /* No Results Message */
    .categories-mobile .no-results {
        padding: 24px 16px;
        text-align: center;
        color: #667085;
        font-size: 14px;
        display: none;
    }

    .categories-mobile .no-results.show {
        display: block;
    }
}
