/* Third Party Installer Listing Block Styles */

.third-party-installer-listing {
    padding: 60px 0;
    background: #fff;
}

.third-party-installer-listing .container {
    max-width: 50.5rem;
}

.installer-listing-header {
    text-align: center;
    margin-bottom: 48px;
}

.installer-listing-header .section-heading {
    font-size: 2.25rem;
    font-weight: 600;
    color: #26272B;
    margin-bottom: 16px;
    font-family: var(--font-primary), sans-serif;
    line-height: 1.2;
    letter-spacing: -0.045rem;
}

.installer-listing-header .section-description {
    font-size: 1.125rem;
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Installer Grid */
.installer-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Installer Card */
.installer-card {
    border-top: 1px solid var(--Colors-Border-border-secondary, #E4E7EC);
    padding-top: 2.5rem;
    transition: all 0.3s ease;
}

.installer-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.installer-card-header-content {
    max-width: 28.125rem;
}

.installer-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

.company-name {
    color: #101828;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 155.56%;
    margin-bottom: 0;
}

/* Location Badge */
.location-badge {
    display: flex;
    padding: 0.125rem 0.5rem 0.125rem 0.375rem;
    align-items: center;
    gap: 0.375rem;
    width: fit-content;
    color: #344054;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 142.86%;
    border-radius: 0.375rem;
    border: 1px solid #D1D1D6;
    background: #FFF;
    box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
}

.location-badge svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Short Info */
.short-info {
    color: #475467;
    font-size: 1rem;
    line-height: 150%;
    font-weight: 400;
}

/* Contact Info */
.contact-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #26272B;
    font-size: 1rem;
    font-weight: 500;
    line-height: 150%;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.contact-item span {
    font-weight: 500;
}

/* Installer Actions */
.installer-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.btn-get-quote {
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    padding: 0.625rem 1rem;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    align-self: stretch;
    color: #FFF;
    font-size: 1rem;
    font-weight: 600;
    line-height: 150%;
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: #097529;

    box-shadow: 0px 0px 0px 1px rgba(16, 24, 40, 0.18) inset, 0px -2px 0px 0px rgba(16, 24, 40, 0.05) inset, 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
}

.btn-get-quote:hover {
    background: #1F2937;
    transform: translateY(-1px);
}

.btn-visit-website {
    align-items: center;
    text-decoration: none;
    display: flex;
    padding: 0.625rem 1rem;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    align-self: stretch;
    border: 1px solid #D1D1D6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    justify-content: center;
    color: #1A1A1E;
    font-size: 1rem;
    font-weight: 600;
    line-height: 150%;
}

.btn-visit-website:hover {
    background: #F9FAFB;
    color: #374151;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-visit-website svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

/* Removed duplicate loading styles - using enhanced version below */

/* Error State */
.installer-error {
    text-align: center;
    padding: 60px 20px;
    color: #EF4444;
    font-size: 1.1rem;
}

/* Empty State */
.installer-empty {
    text-align: center;
    padding: 60px 20px;
    background: #F9FAFB;
    border-radius: 12px;
    margin: 40px 0;
}

.installer-empty h3 {
    color: #374151;
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.installer-empty p {
    color: #6B7280;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Pagination Styles (based on wishlist pagination) */
.installer-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    border-top: 1px solid #E4E7EC;
    padding-top: 1.25rem;
}

.installer-pagination ul.page-numbers {
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.installer-pagination li:not(:has(.next), :has(.prev)) {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    align-items: center;
    color: #475467;
    text-align: center;
    font-family: var(--font-primary), sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.installer-pagination li:has(.current) {
    background: #66C008;
    color: #FFF;
}

.installer-pagination li:has(.prev),
.installer-pagination li:has(.next) {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.installer-pagination li:has(.next) {
    justify-content: flex-end;
}


.installer-pagination li:has(.prev) a,
.installer-pagination li:has(.next) a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475467;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.installer-pagination .page-numbers {
    color: #475467;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.installer-pagination .page-numbers.current {
    background: #66C008;
    color: #FFF;
}

.installer-pagination .page-numbers.dots {
    color: #9CA3AF;
    cursor: default;
}

.installer-pagination .page-numbers.dots:hover {
    background: transparent;
    color: #9CA3AF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .third-party-installer-listing {
        padding: 40px 0;
    }

    .installer-card-content {
        flex-direction: column;
        align-items: stretch;
    }

    .installer-card-header-content {
        max-width: 100%;
    }

    .installer-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .installer-actions>* {
        flex-basis: fit-content;
    }
}

@media (max-width: 480px) {

    .installer-card-header {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .installer-card-header>* {
        flex-basis: fit-content;
    }

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
}


/* Enhanced Loading and Error States */
.installer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f9fafb;
    border-radius: 8px;
    position: absolute;
    inset: 0;
    z-index: 1000;
}

.installer-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #66C008;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.installer-loading p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.installer-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 2rem 0;
}

.installer-error .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.installer-error h3 {
    color: #dc2626;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.installer-error p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    max-width: 400px;
}

.installer-error .retry-button {
    background-color: #66C008;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.installer-error .retry-button:hover {
    background-color: #54a306;
}

.installer-error .retry-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 192, 8, 0.3);
}

/* Loading state for content container */
.installer-content.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

/* Loading state for pagination */
.installer-pagination.loading a {
    opacity: 0.5;
    pointer-events: none;
}

.installer-pagination a.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

/* Mobile styles for loading/error states */
@media (max-width: 768px) {

    .installer-loading,
    .installer-error {
        padding: 3rem 1rem;
    }

    .installer-loading .loading-spinner {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }

    .installer-error .error-icon {
        font-size: 2.5rem;
    }

    .installer-error h3 {
        font-size: 1.125rem;
    }

    .installer-error p {
        font-size: 0.875rem;
    }
}