/**
 * RFQ List Page Styles
 * Styles for the RFQ list page with filters and horizontal card layout
 */

/* ==========================================================================
   Banner Section
   ========================================================================== */
.rfq-list-banner {
    position: relative;
    width: 100%;
    height: 318px;
    overflow: hidden;
    background: var(--color-primary-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1)
    ),
    url('https://vn-open.123websitedev.com/wp-content/uploads/2025/10/bg-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Gradient Overlay for Search Visibility */
.rfq-list-banner .banner-search-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(
        to top,
        var(--color-primary) 0%,
        rgba(16, 141, 82, 0.95) 20%,
        rgba(16, 141, 82, 0.85) 40%,
        rgba(16, 141, 82, 0.75) 50%,
        rgba(16, 141, 82, 0.65) 60%,
        rgba(16, 141, 82, 0.5) 70%,
        rgba(16, 141, 82, 0.35) 80%,
        rgba(16, 141, 82, 0.2) 90%,
        rgba(16, 141, 82, 0.1) 95%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 40px 20px 60px 20px;
    max-width: 1320px;
    margin: 0 auto;
}

.rfq-list-banner.banner-with-search .banner-content {
    justify-content: flex-end;
    align-items: flex-start;
    padding: 30px 20px 30px 20px;
}

.banner-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-light);
    text-align: center;
    max-width: 860px;
    margin: 0;
    margin-bottom: auto;
}

.rfq-list-banner.banner-with-search .banner-title {
    margin-bottom: 16px;
    font-size: 28px;
    text-align: left;
}

/* Banner Search Wrapper */
.rfq-list-banner .banner-search-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    margin-top: auto;
}

.rfq-list-banner.banner-with-search .banner-search-wrapper {
    max-width: 420px;
    margin: 0;
}

/* Override search container width in banner */
.rfq-list-banner.banner-with-search .vina-search-container.banner-search-bar {
    max-width: 420px;
    width: 100%;
}

/* Search Bar in Banner - Hide Toggle and Trade Now */
.rfq-list-banner .vina-search-container.banner-search-bar .search-toggle-buttons {
    display: none !important;
}

.rfq-list-banner .vina-search-container.banner-search-bar .trade-now-wrapper {
    display: none !important;
}

.rfq-list-banner .vina-search-container.banner-search-bar .hand-pointer-wrapper {
    display: none !important;
}

/* Reduce padding for search bar in banner */
.rfq-list-banner .vina-search-container.banner-search-bar .search-bar-wrapper {
    padding: 4px 6px;
}

.rfq-list-banner .vina-search-container.banner-search-bar .search-input {
    padding: 8px 36px 8px 12px;
    font-size: 14px;
}

.rfq-list-banner .vina-search-container.banner-search-bar .search-clear-btn {
    right: 4px;
    width: 18px;
    height: 18px;
}

.rfq-list-banner .vina-search-container.banner-search-bar .search-clear-btn .clear-icon {
    width: 14px;
    height: 14px;
}

.rfq-list-banner .vina-search-container.banner-search-bar .search-input::placeholder {
    font-weight: 400;
}

.rfq-list-banner .vina-search-container.banner-search-bar .search-btn {
    width: 36px;
    height: 36px;
}

/* Search Keyword Tags */
.rfq-list-banner .search-keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.rfq-list-banner.banner-with-search .search-keyword-tags {
    justify-content: flex-start;
}

.rfq-list-banner .keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.rfq-list-banner .keyword-tag:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.rfq-list-banner .keyword-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-gray);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.rfq-list-banner .keyword-tag-remove:hover {
    background: var(--color-error);
    color: var(--color-text-light);
}

/* Layout styles moved to layouts/list-page-layout.css */

/* Navigation Tabs: All, Hot, New, Favourite */
.rfq-list-nav-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav-tabs-left {
    display: flex;
    gap: 8px;
}

.nav-tab-button {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--color-secondary);
    background: var(--bg-white);
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tab-button:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    background-color: transparent;
    outline: none;
    box-shadow: none;
}

.nav-tab-button.active {
    background: var(--color-secondary);
    color: var(--color-text-light);
    border-color: var(--color-secondary);
}

/* Featured RFQs Title */
.featured-rfqs-title {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.featured-rfqs-title .title-text {
    font-size: 26px;
    font-weight: 700;
    line-height: 40px;
    color: var(--color-text-title);
    margin: 0;
}

.featured-rfqs-title .rfq-count-text {
    font-size: 14px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.6);
    text-align: right;
    margin-left: auto;
}

/* RFQs List Container */
.rfqs-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight:  400;
    color: var(--color-text-primary);
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 0;
    background-color: white;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background-color: var(--bg-gray-light);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--border-color-light);
}

.pagination-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-light);
}

.pagination-btn.active:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-text-secondary);
}

.pagination-btn.active svg {
    stroke: var(--color-text-light);
}

.pagination-btn:disabled svg {
    stroke: var(--color-text-secondary);
    opacity: 0.6;
}

.pagination-ellipsis {
    padding: 0 4px;
    color: var(--color-text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .rfq-list-banner {
        height: 200px;
    }
    
    .rfq-list-banner.banner-with-search .banner-content {
        padding: 20px 15px 20px 15px;
    }
    
    .rfq-list-banner.banner-with-search .banner-title {
        margin-bottom: 6px;
        font-size: 20px;
    }
    
    /* Banner Search on Mobile */
    .rfq-list-banner .banner-search-wrapper {
        padding: 0;
    }
    
    .rfq-list-banner .banner-search-wrapper .vina-search-container {
        width: 100%;
        max-width: 100%;
    }
    
    .rfq-list-banner .search-keyword-tags {
        margin-top: 12px;
        gap: 6px;
        padding: 0;
    }
    
    .rfq-list-banner .keyword-tag {
        font-size: 12px;
        padding: 4px 10px;
    }

    .banner-title {
        font-size: 24px;
    }

    .tab-button {
        font-size: 16px;
        padding: 8px 12px;
    }

    .rfq-list-content-wrapper {
        padding: 10px 10px 20px 10px;
    }

    .rfq-list-content-area {
        flex-direction: column;
        gap: 16px;
        padding-top: 16px;
    }

    .rfq-list-sidebar {
        width: 100%;
        display: none;
    }

    .rfq-list-nav-tabs {
        margin-bottom: 16px;
    }

    .mobile-filter-wrapper {
        margin-bottom: 12px;
    }

    .featured-rfqs-title {
        margin-bottom: 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .featured-rfqs-title .title-text {
        font-size: 18px;
        line-height: 24px;
        flex-shrink: 0;
    }

    .featured-rfqs-title .rfq-count-text {
        font-size: 12px;
        text-align: right;
        margin-left: auto;
        margin-top: 0;
        white-space: nowrap;
    }

    .rfqs-list-container {
        gap: 12px;
    }

    .nav-tabs-left {
        flex-wrap: wrap;
    }

    .nav-tab-button {
        font-size: 12px;
        padding: 6px 12px;
    }

    .pagination-nav {
        gap: 4px;
        padding: 8px 0;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 24px;
    }

    .pagination-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
        line-height: 13px;
        min-width: 30px;
    }

    .pagination-btn svg {
        width: 14px;
        height: 14px;
    }

    .pagination-ellipsis {
        padding: 0 2px;
        font-size: 13px;
        display: flex;
        align-items: center;
        min-width: 20px;
    }
}

/* Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .rfq-list-sidebar {
        display: none;
    }

    .rfq-list-content-area {
        gap: 16px;
        padding-top: 16px;
    }

    /* Hide "Showing..." text */
    .featured-rfqs-title .rfq-count-text {
        display: none;
    }

    .featured-rfqs-title {
        margin-bottom: 16px;
    }

    /* Show mobile filter button in title row */
    .mobile-filter-button.mobile-filter-in-title {
        display: flex;
    }

    .pagination-nav {
        gap: 6px;
        margin-top: 32px;
    }

    .pagination-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .pagination-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Mobile Small: max 480px */
@media (max-width: 480px) {
    .rfq-list-banner {
        height: 180px;
    }
    
    .rfq-list-banner.banner-with-search .banner-content {
        padding: 16px 10px 16px 10px;
    }
    
    .rfq-list-banner.banner-with-search .banner-title {
        margin-bottom: 4px;
        font-size: 18px;
    }

    .banner-title {
        font-size: 20px;
    }
    
    /* Banner Search on Mobile */
    .rfq-list-banner .banner-search-wrapper {
        padding: 0;
    }
    
    .rfq-list-banner .banner-search-wrapper .vina-search-container {
        width: 100%;
        max-width: 100%;
    }
    
    .rfq-list-banner .search-keyword-tags {
        margin-top: 12px;
        gap: 6px;
        padding: 0;
    }
    
    .rfq-list-banner .keyword-tag {
        font-size: 12px;
        padding: 4px 10px;
    }

    .featured-rfqs-title {
        gap: 6px;
    }

    .featured-rfqs-title .title-text {
        font-size: 16px;
        line-height: 22px;
    }

    .rfqs-list-container {
        gap: 10px;
    }

    .pagination-nav {
        gap: 3px;
        padding: 6px 0;
        margin-top: 20px;
    }

    .pagination-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
        min-width: 28px;
    }

    .pagination-btn svg {
        width: 12px;
        height: 12px;
    }

    .pagination-ellipsis {
        font-size: 12px;
        padding: 0 2px;
    }
}

/* ==========================================================================
   AJAX Loading State
   ========================================================================== */

.rfqs-list-container {
    position: relative;
}

.rfqs-list-container.loading {
    min-height: 400px;
    opacity: 0.6;
    pointer-events: none;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 100;
    padding: 20px;
    overflow-y: auto;
}

/* Skeleton loading state - replaces spinner */
.rfqs-list-container.loading .rfq-card-horizontal {
    display: none;
}

.rfqs-list-container.loading .skeleton-list {
    display: block;
}

/* ==========================================================================
   Clear Filters Button
   ========================================================================== */

.filters-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.clear-filters-btn {
    background: transparent;
    border: 1px solid var(--color-primary, #108D52);
    color: var(--color-primary, #108D52);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: var(--color-primary, #108D52);
    color: white;
}

.clear-filters-btn:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-image {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

.empty-state-message {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 14px;
    color: #666;
}

/* Hide search info bar completely */
.search-info-bar {
    display: none !important;
}

/* Desktop: min 1025px */
@media (min-width: 1025px) {
    .mobile-filter-wrapper {
        display: none;
    }

    .mobile-filter-button {
        display: none;
    }

    .mobile-filter-overlay {
        display: none;
    }
}
