.resources-container {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding: 15px 20px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.resource-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.resource-info {
    flex: 1;
}

.resource-title {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    margin: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

resource-language {
    font-size: 12px;
    color: #0069AA;
    font-weight: 500;
    margin-left: 8px;
    margin-right: 4px;
    text-transform: uppercase;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.resource-date {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.resource-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 8px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Tag styles - using consistent colors with download buttons */
.tag-price-list {
    background-color: #e6ecef;
    color: #011520;
    border: 1px solid #012A45;
}

.tag-pib {
    background-color: #e6f2f9;
    color: #004870;
    border: 1px solid #0069AA;
}

.tag-sib {
    background-color: #e6f7fa;
    color: #1a7a8a;
    border: 1px solid #40C1D6;
}

.tag-reference-guide {
    background-color: #e6f2f9;
    color: #033955;
    border: 1px solid #0767A9;
}

.tag-reference-poster {
    background-color: #e6f5fb;
    color: #014f6e;
    border: 1px solid #019DD6;
}

.tag-spec-sheet {
    background-color: #e8f6fc;
    color: #1a5870;
    border: 1px solid #48B2E2;
}

.tag-user-manual {
    background-color: #e9eaeb;
    color: #1a1f21;
    border: 1px solid #2D3A3F;
}

.tag-white-paper {
    background-color: #f2f7ec;
    color: #4d5f3f;
    border: 1px solid #9DBA7E;
}

.tag-marketing {
    background-color: #e6f7f0;
    color: #0d5634;
    border: 1px solid #1BAD67;
}

.tag-brochure {
    background-color: #e6f2f9;
    color: #004870;
    border: 1px solid #0069AA;
}

.tag-flyer {
    background-color: #e6f5fb;
    color: #014f6e;
    border: 1px solid #019DD6;
}

.tag-presentation {
    background-color: #e6f7fa;
    color: #1a7a8a;
    border: 1px solid #40C1D6;
}

.tag-battlecard {
    background-color: #fef3e9;
    color: #5f350c;
    border: 1px solid #BF6918;
}

.tag-sales-guide {
    background-color: #e6f7f0;
    color: #0d5634;
    border: 1px solid #1BAD67;
}

.tag-video-howto {
    background-color: #e8f6fc;
    color: #1a5870;
    border: 1px solid #48B2E2;
}

.tag-video-npi {
    background-color: #fefce6;
    color: #7a7200;
    border: 1px solid #F4E800;
}

.tag-video-demo {
    background-color: #fef3e9;
    color: #5f350c;
    border: 1px solid #BF6918;
}

.tag-video-training {
    background-color: #f2f7ec;
    color: #4d5f3f;
    border: 1px solid #9DBA7E;
}

.tag-application-note {
    background-color: #f2f7ec;
    color: #4d5f3f;
    border: 1px solid #9DBA7E;
}

.tag-promotional {
    background-color: #e6f7f0;
    color: #0d5634;
    border: 1px solid #1BAD67;
}

.tag-declaration {
    background-color: #e9eaeb;
    color: #1a1f21;
    border: 1px solid #2D3A3F;
}

.tag-terms {
    background-color: #e6ecef;
    color: #011520;
    border: 1px solid #012A45;
}

.tag-addenda {
    background-color: #e6f2f9;
    color: #033955;
    border: 1px solid #0767A9;
}

.tag-news {
    background-color: #fefce6;
    color: #7a7200;
    border: 1px solid #F4E800;
}

.tag-default {
    background-color: #e6f2f9;
    color: #004870;
    border: 1px solid #0069AA;
}

.download-button {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

    .download-button:hover {
        opacity: 0.8;
    }

/* Download button styles - matching the color mapping exactly */
.download-price-list {
    background-color: #012A45;
}

.download-pib {
    background-color: #0069AA;
}

.download-sib {
    background-color: #40C1D6;
}

.download-reference-guide {
    background-color: #0767A9;
}

.download-reference-poster {
    background-color: #019DD6;
}

.download-spec-sheet {
    background-color: #48B2E2;
}

.download-user-manual {
    background-color: #2D3A3F;
}

.download-white-paper {
    background-color: #9DBA7E;
}

.download-marketing {
    background-color: #1BAD67;
}

.download-brochure {
    background-color: #0069AA;
}

.download-flyer {
    background-color: #019DD6;
}

.download-presentation {
    background-color: #40C1D6;
}

.download-battlecard {
    background-color: #BF6918;
}

.download-sales-guide {
    background-color: #1BAD67;
}

.download-video-howto {
    background-color: #48B2E2;
}

.download-video-npi {
    background-color: #F4E800;
}

.download-video-demo {
    background-color: #BF6918;
}

.download-video-training {
    background-color: #9DBA7E;
}

.download-application-note {
    background-color: #9DBA7E;
}

.download-promotional {
    background-color: #1BAD67;
}

.download-declaration {
    background-color: #2D3A3F;
}

.download-terms {
    background-color: #012A45;
}

.download-addenda {
    background-color: #0767A9;
}

.download-news {
    background-color: #F4E800;
}

.download-default {
    background-color: #0069AA;
}

.search-section {
    max-width: 800px;
    margin: 0 auto 24px auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #0069AA;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

    .search-input:focus {
        outline: none;
        border: 2px solid #0069AA;
        box-shadow: 0 0 0 2px rgba(0, 105, 170, 0.2);
    }

    .search-input:disabled {
        background-color: #f5f5f5;
        color: #9ca3af;
        cursor: not-allowed;
        border-color: #d1d5db;
    }

.search-button {
    padding: 10px 18px;
    background-color: #0069AA;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    white-space: nowrap;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

    .search-button:hover {
        background-color: #00497A;
    }

    .search-button:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 105, 170, 0.5);
    }

.filter-tabs {
    max-width: 800px;
    margin: 0 auto 40px auto;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #c9c9c9;
}

.filter-tab {
    padding: 12px 20px;
    font-size: 15px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
}

    .filter-tab.active {
        color: #0069AA;
        border-bottom-color: #0069AA;
        font-weight: 500;
    }

    .filter-tab:hover {
        color: #0069AA;
    }

    .filter-tab:disabled {
        color: #d1d5db;
        cursor: not-allowed;
        opacity: 0.5;
    }

        .filter-tab:disabled:hover {
            color: #d1d5db;
        }

.resources-grid {
    max-width: 1200px;
    margin: 0 auto;
}

/* NEW: Results Header Bar - matching PartnersSearchPage */
.results-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 105, 170, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* NEW: Results count on the left */
.results-count-container {
    flex: 1;
    padding: 0;
    margin: 0;
    border: none;
}

.results-count-text {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.5;
}

    .results-count-text strong {
        color: #0069AA;
        font-weight: 600;
    }

/* Sort By container on the right */
.sort-by-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.sort-label-small {
    font-size: 11px;
    color: #555;
    font-weight: 400;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.sort-select-small {
    padding: 6px 18px 6px 10px;
    border: 1px solid #0069AA;
    border-radius: 4px;
    background: white;
    min-width: 90px;
    font-size: 11px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

    .sort-select-small:focus {
        outline: none;
        border: 2px solid #0069AA;
        box-shadow: 0 0 0 2px rgba(0, 105, 170, 0.2);
    }

/* Main title styling with Roboto font */
.resources-container h1 {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 34px;
    font-weight: 400;
    color: #333;
    margin: 0;
    text-align: center;
    margin-bottom: 40px;
}

/* Message section styling */
.resources-container .message-section {
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
}

    .resources-container .message-section div {
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 20px;
    }

    .resources-container .message-section p {
        margin: 0;
        color: #6c757d;
        font-size: 16px;
        font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    }

/* Loading wrapper and spinner (matching Partners page) */
.document-results-wrapper {
    position: relative;
    min-height: 200px;
}

/* NEW: constrain loading to same width as filter-tabs (800px max, centered) */
.loading-width-constraint {
    max-width: 800px;
    margin: 0 auto;
}

.partners-loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 105, 170, 0.08);
    border: 1px solid rgba(0, 105, 170, 0.1);
    margin-top: 2rem;
    min-height: 140px;
    width: 100%; /* fill the constrained wrapper */
}

.partners-loading-message.hidden {
    display: none;
}

.partners-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.exfo-spinner {
    color: rgb(0, 105, 170);
    width: 44px;
    height: 44px;
}

.spinner {
    animation: a-loading-rotation 2s linear infinite;
}

.spinner__path {
    animation: a-loading-path 2s cubic-bezier(.445,.05,.55,.95) infinite;
    stroke-dasharray: 128;
    transform-origin: 50% 50%;
}

@keyframes a-loading-rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(1turn);
    }
}

@keyframes a-loading-path {
    0% {
        stroke-dashoffset: 128;
        transform: rotate(0deg);
    }

    50% {
        stroke-dashoffset: 32;
        transform: rotate(45deg);
    }

    100% {
        stroke-dashoffset: 128;
        transform: rotate(1turn);
    }
}

.partners-loading-text {
    font-size: 1rem;
    font-weight: 400;
    color: rgb(0, 105, 170);
    text-align: center;
    letter-spacing: 0.5px;
}

/* Ensure Roboto on category buttons */
.resources-container .filter-tabs .filter-tab {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* Tighten top spacing for DocumentListBlock when used on PartnersSearchPage */
.partners-search-page .resources-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    min-height: auto;
    background-color: transparent; /* blend with page */
}

    /* Ensure inner sections don't introduce extra top spacing */
    .partners-search-page .resources-container .filter-tabs {
        margin-top: 0 !important;
    }

/* NEW: Responsive adjustments for results header bar */
@media (max-width: 768px) {
    .results-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sort-by-container {
        align-self: flex-end;
    }
}

@media (max-width: 640px) {
    .results-count-text {
        font-size: 0.85rem;
    }
}

.resource-metadata {
    font-size: 12px;
    color: #333;
    font-weight: 400;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Additional utility classes for inline styles */
.title-container {
    text-align: center;
    margin-bottom: 40px;
}

.resource-title-with-margin {
    margin-top: 12px;
}

.download-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-container {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    display: flex;
    justify-content: center;
}

