/**
 * Partner Filters Styles
 * 
 * Styles for the partner filtering system
 */

.partner-filters-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter Section */
.partner-filters {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    /*padding: 12px 16px;*/
    /*background: #007cba;*/
    /*color: white;*/
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    /*margin-bottom: 15px;*/
    transition: background-color 0.3s ease;
}

/*.mobile-filter-toggle:hover {*/
/*    background: #005a87;*/
/*}*/

.mobile-filter-toggle i {
    font-size: 16px;
    color: #2491EB;
}

.mobile-filter-toggle span {
    font-size: 14px;
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-end;
}

.filter-row.expanded {
    margin-top: 15px;
}
.filter-group {
	flex: 1;
	min-width: 180px;
	max-width: 250px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    position: relative;
}

.filter-group label i {
	margin-left: 5px;
	color: #666;
	cursor: help;
	font-size: 12px;
}

/* Individual Filter Styling */
.filter-industry {
	/* Industry filter specific styles */
}

.filter-partner-type {
	/* Partner type filter specific styles */
}

.filter-region {
	/* Region filter specific styles */
}

.filter-solution-areas {
	/* Solution areas filter specific styles */
}

.filter-connection-method {
	/* Connection method filter specific styles */
}

/* Individual Label Styling */
.industry-label {
	/* Industry label specific styles */
}

.partner-type-label {
	/* Partner type label specific styles */
}

.region-label {
	/* Region label specific styles */
}

.solution-areas-label {
	/* Solution areas label specific styles */
}

.connection-method-label {
	/* Connection method label specific styles */
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-input {
    position: relative;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

/*.dropdown-input:hover {*/
/*    border-color: #2491EB;*/
/*}*/

.dropdown-input input[type="text"] {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: flex 0.3s ease;
    padding: 0;
}

/* When dropdown has tags, input takes less space */
.dropdown-input.has-tags input[type="text"] {
    flex: 0 1 auto;
    min-width: 60px;
}

/* Hide input when tags are present */
.dropdown-input.has-tags input[type="text"] {
    display: none;
}

.dropdown-input input[type="text"]::placeholder {
    color: #999;
}

.dropdown-arrow {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s ease;
    pointer-events: none;
    position: absolute;
    right: 10px;
}

.dropdown-options.active + .dropdown-input .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% - 5px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);*/
}

.dropdown-options.active {
    display: block;
}

.dropdown-option {
    padding: 7px 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
}

.dropdown-option[data-value="healthcare"]:hover {
    background-color: #D4C4F7;
}

.dropdown-option[data-value="staffing"]:hover {
    background-color: #FF9E6154;
}

.dropdown-option:first-child {
    border-radius: 0;
}

.dropdown-option:last-child {
    border-radius: 0 0 6px 6px;
}

/* Radio Button Styles */
.dropdown-option input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #d9d9d9;
    border-radius: 50%;
    background: #ffffff;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

/*.dropdown-option input[type="radio"]:checked {*/
/*    border-color: #2491EB;*/
/*    background: #2491EB;*/
/*}*/

.dropdown-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #2491EB;
    border-radius: 50%;
}

.dropdown-option input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Checkbox Styles */
.dropdown-option input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: #ffffff;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-option input[type="checkbox"]:checked {
    border-color: #2491EB;
    background: #2491EB;
}

.dropdown-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

.dropdown-option input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Label Styles */
.dropdown-option label {
    cursor: pointer;
    font-size: 14px;
    color: #333;
    margin: 0;
    flex: 1;
}

/* Selected Tags Styles */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 0 1 auto;
    min-width: 0;
}

.selected-tag {
    background: #2491EB;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.selected-tag[data-value="healthcare"] {
    background: #B796FF!important;
}
.selected-tag[data-value="staffing"] {
    background: #FF9E61!important;
}
/*.selected-tag:hover {*/
/*    background: #005a87;*/
/*}*/

.selected-tag.plus-indicator {
    background: #2491EB;
    cursor: default;
}

/*.selected-tag.plus-indicator:hover {*/
/*    background: #6c757d;*/
/*}*/

.selected-tag:not(.plus-indicator)::after {
    content: '×';
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
}

.selected-tag:not(.plus-indicator):hover::after {
    color: #ff6b6b;
}

/* Filter Group Styling for Different Modes */
.filter-group.single-mode label, .filter-group.multiple-mode label {
    color: #666;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

/*.filter-group.multiple-mode label {*/
/*    color: #333;*/
/*    font-size: 14px;*/
/*    margin-bottom: 8px;*/
/*    font-weight: 600;*/
/*}*/

/* Results Section */
.partner-results {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
}

.results-count {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5e9;
    font-size: 16px;
    color: #666;
    display: none;
}

.results-count span {
    font-weight: 600;
    color: #2491EB;
}

/* Partner Grid */
.partner-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
    grid-template-columns: repeat(4, 1fr);
}

.partner-grid.columns-1 {
    grid-template-columns: 1fr;
}

.partner-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

.partner-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin: 0 auto;
}

.partner-grid.columns-4 {
	grid-template-columns: repeat(4, 1fr);
	max-width: 1000px;
	margin: 0 auto;
}

.partner-grid.columns-5 {
	grid-template-columns: repeat(5, 1fr);
	max-width: 1000px;
	margin: 0 auto;
}

/* Partner Cards */
.partner-card {
    background: #ffffff;
    /*border: 1px solid #e1e5e9;*/
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);*/
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*.partner-card:hover {*/
/*    transform: translateY(-2px);*/
/*    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);*/
/*}*/

.partner-card-inner {
    padding: 10px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-image {
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Partner Popup Trigger Styles */
.partner-popup-trigger {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-popup-trigger:hover {
    transform: scale(1.02);
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);*/
}

.partner-image .partner-popup-trigger {
    position: relative;
}

.partner-image .partner-popup-trigger::after {
    content: '🔍';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.partner-image .partner-popup-trigger:hover::after {
    opacity: 1;
}



.partner-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.partner-excerpt {
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.partner-meta {
    margin-bottom: 15px;
}

.partner-meta > div {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4;
}

.partner-meta strong {
    color: #333;
    font-weight: 600;
}

.partner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.partner-website,
.partner-details {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.partner-website {
    background: #2491EB;
    color: #ffffff;
}

.partner-website:hover {
    background: #005a87;
    color: #ffffff;
}

.partner-details {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e1e5e9;
}

.partner-details:hover {
    background: #e9ecef;
    color: #333;
}

/* Loading State */
.partner-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2491EB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.partner-loading p {
    color: #666;
    margin: 0;
}

/* No Partners State */
.no-partners {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #F5F5F5;
    border-radius: 20px;
}

.no-partners img {
    max-width: 150px;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .partner-grid.columns-2,
    .partner-grid.columns-3,
    .partner-grid.columns-4,
    .partner-grid.columns-5 {
        grid-template-columns: 1fr;
    }
    
    .partner-actions {
        flex-direction: column;
    }
    
    .partner-website,
    .partner-details {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .partner-filters-container {
        padding: 10px;
    }
    
    .partner-filters,
    .partner-results {
        padding: 15px;
    }
    
    .partner-card-inner {
        padding: 15px;
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Custom Scrollbar for Dropdowns */
.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Pagination Styles */
.partner-pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #ffffff;
}

.pagination-link:hover {
    background: #2491EB;
    color: #ffffff;
    border-color: #2491EB;
}

.pagination-link.current {
    background: #2491EB;
    color: #ffffff;
    border-color: #2491EB;
    cursor: default;
}

.pagination-link.prev,
.pagination-link.next {
    font-weight: 600;
}

/* Infinite Scroll Trigger */
.infinite-scroll-trigger {
    text-align: center;
    padding: 30px 20px;
    margin-top: 20px;
}

.infinite-scroll-trigger .loading-spinner {
    margin-bottom: 10px;
}

.infinite-scroll-trigger p {
    color: #666;
    margin: 0;
    font-size: 14px;
} 

/* Mobile Styles - Responsive Desktop Filters */
@media (max-width: 768px) {
    .partner-filters {
        padding: 15px;
        margin-bottom: 20px;
        background: #ffffff;
        border-radius: 8px;
    }

    /* Show mobile filter toggle on mobile */
    .mobile-filter-toggle {
        display: flex !important;
    }

    /* Hide filter row by default on mobile */
    .filter-row {
        display: none;
        flex-direction: column;
        gap: 15px;
    }

    /* Show filter row when expanded */
    .filter-row.expanded {
        display: flex;
    }

    .filter-group {
        width: 100%;
        min-width: auto;
        max-width: none;
        margin-bottom: 0;
    }

    .filter-group label {
        font-size: 14px;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

    .custom-dropdown {
        width: 100%;
    }

    .dropdown-input {
        height: 45px;
        font-size: 14px;
        border-radius: 6px;
        padding: 12px 15px;
    }

    .dropdown-options {
        max-height: 200px;
        font-size: 14px;
        border-radius: 6px;
    }

    .dropdown-option {
        padding: 12px 15px;
        font-size: 14px;
    }

    .selected-tag {
        font-size: 12px;
        padding: 4px 8px;
    }

    /* Hide old mobile filter elements */
    .mobile-filter-container,
    .mobile-filter-section,
    .mobile-filter-actions,
    .btn-apply,
    .btn-clear {
        display: none !important;
    }

    /* Mobile results styling */
    .partner-results {
        margin-top: 20px;
    }

    .partner-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .partner-card {
        border-radius: 8px;
        overflow: hidden;
    }

    .partner-card-inner {
        padding: 12px;
    }

    /* Mobile infinite scroll trigger */
    #infinite-scroll-trigger {
        padding: 20px;
        text-align: center;
    }

    /* Mobile loading spinner */
    .partner-loading {
        padding: 40px 20px;
        text-align: center;
    }

    .loading-spinner {
        width: 40px;
        height: 40px;
        margin: 0 auto 16px;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-filter-toggle,
    .mobile-filter-container {
        display: none;
    }

    .partner-filters .filter-row {
        display: flex;
    }

    .partner-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Desktop styles */
@media (min-width: 1025px) {
    .mobile-filter-toggle,
    .mobile-filter-container {
        display: none;
    }

    .partner-filters .filter-row {
        display: flex;
    }
} 

/* Template Modal Styles */
.template-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.template-modal {
	background: white;
	border-radius: 8px;
	max-width: 800px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.template-modal-header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 15px 20px;
	border-bottom: 1px solid #eee;
}

.template-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.template-modal-close:hover {
	color: #000;
}

.template-modal-content {
	padding: 20px;
} 