/**
 * FBZ Fachberater-Suche Plugin Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --fbz-primary-color: #143c6d;
    --fbz-primary-dark: #0f2d52;
    --fbz-accent-color: #dcb56e;
    --fbz-text-color: #333;
    --fbz-light-gray: #f8f9fa;
    --fbz-medium-gray: #e9ecef;
    --fbz-white: #ffffff;
    --fbz-border-radius: 8px;
}

.fbsuche-page-container {
    font-family: 'Poppins', sans-serif;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: transparent;
}

.fbsuche-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.fbsuche-page-header h2 {
    color: var(--fbz-primary-color);
    margin: 0;
    font-weight: 600;
}

.fbsuche-page-header p {
    color: #6c757d;
}

.fbsuche-search-container {
    background-color: var(--fbz-white);
    padding: 2rem;
    border-radius: var(--fbz-border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 2.5rem;
}

.fbsuche-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.fbsuche-form-group {
    display: flex;
    flex-direction: column;
}

.fbsuche-form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9em;
    color: var(--fbz-primary-dark);
}

.fbsuche-form-group input,
.fbsuche-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--fbz-medium-gray);
    border-radius: var(--fbz-border-radius);
    font-size: 1rem;
    box-sizing: border-box;
}

.fbsuche-form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.fbsuche-button,
.fbsuche-button-secondary,
.fbsuche-toggle-button {
    padding: 0.8rem 1.5rem;
    border-radius: var(--fbz-border-radius);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fbsuche-button {
    background-color: var(--fbz-primary-color);
    color: var(--fbz-white);
}

.fbsuche-button:hover {
    background-color: var(--fbz-primary-dark);
    transform: translateY(-2px);
}

.fbsuche-button-secondary {
    background-color: var(--fbz-medium-gray);
    color: var(--fbz-text-color);
}

.fbsuche-button-secondary:hover {
    background-color: #d3d9df;
}

.fbsuche-results-container h3 {
    color: var(--fbz-primary-color);
    margin-bottom: 1.5rem;
}

.fbsuche-advisor-card {
    background-color: var(--fbz-white);
    border-radius: var(--fbz-border-radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-areas:
        "photo details"
        "photo contact"
        "selbstvorstellung selbstvorstellung"
        "extras extras";
    gap: 1rem 1.5rem;
    border: 1px solid #e9ecef;
    align-items: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fbsuche-advisor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.fbsuche-advisor-photo {
    grid-area: photo;
}

.fbsuche-advisor-details {
    grid-area: details;
}

.fbsuche-advisor-contact {
    grid-area: contact;
}

.fbsuche-advisor-selbstvorstellung {
    grid-area: selbstvorstellung;
    border-top: 1px solid var(--fbz-medium-gray);
    padding-top: 1rem;
    margin-top: 1rem;
}

.fbsuche-advisor-extras {
    grid-area: extras;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    border-top: 1px solid var(--fbz-medium-gray);
    padding-top: 1rem;
    margin-top: 1rem;
}

.fbsuche-advisor-fachbereich-box,
.fbsuche-advisor-memberships {
    flex: 1;
    min-width: 250px;
}

.fbsuche-advisor-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f0f0;
}

.fbsuche-advisor-name {
    margin: 0 0 0.25rem 0;
    color: var(--fbz-primary-color);
    font-weight: 600;
}

.fbsuche-advisor-company {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    color: #6c757d;
}

.fbsuche-advisor-contact p,
.fbsuche-advisor-fachbereich-box h4,
.fbsuche-advisor-memberships h4,
.fbsuche-advisor-selbstvorstellung h4 {
    margin: 0 0 0.5rem 0;
    color: var(--fbz-primary-dark);
    font-weight: 600;
}

.fbsuche-advisor-contact p {
    font-weight: 400;
    color: var(--fbz-text-color);
}

.fbsuche-advisor-contact strong {
    font-weight: 600;
    margin-right: 0.5em;
}

.fbsuche-advisor-contact a {
    color: var(--fbz-accent-color);
    font-weight: 600;
    text-decoration: none;
}

.fbsuche-advisor-contact a:hover {
    text-decoration: underline;
}

.fbsuche-advisor-fachbereich-box .fachbereich-main {
    font-weight: 600;
    color: var(--fbz-primary-dark);
    margin-bottom: 0.75rem;
    font-size: 1.1em;
}

.fbsuche-advisor-fachbereich-box ul,
.fbsuche-advisor-memberships ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fbsuche-advisor-fachbereich-box li {
    background-color: #e8f0f8;
    color: var(--fbz-primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

.fbsuche-advisor-memberships li {
    display: flex;
    align-items: center;
    background-color: #f1f3f5;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85em;
}

.fbsuche-advisor-memberships img {
    margin-right: 8px;
    height: 20px;
}

.fbsuche-no-results,
.fbsuche-error {
    background-color: var(--fbz-white);
    padding: 2rem;
    text-align: center;
    border-radius: var(--fbz-border-radius);
}

.fbsuche-error {
    background-color: #fff3f3;
    border-left: 4px solid #dc3545;
    text-align: left;
}

.fbsuche-error h3 {
    color: #dc3545;
    margin-top: 0;
}

.fbsuche-collapsible-text {
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease-in-out;
}

.fbsuche-collapsible-text.is-expanded {
    max-height: 1000px;
}

.fbsuche-collapsible-text:not(.is-expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(to bottom, transparent, white);
}

.fbsuche-toggle-button {
    background: none;
    border: none;
    color: var(--fbz-accent-color);
    font-weight: bold;
    padding: 0.5rem 0;
    display: none;
}

.fbsuche-pagination {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.fbsuche-pagination a,
.fbsuche-pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--fbz-border-radius);
    text-decoration: none;
    color: var(--fbz-primary-dark);
    background-color: var(--fbz-white);
    border: 1px solid var(--fbz-medium-gray);
}

.fbsuche-pagination a:hover {
    background-color: var(--fbz-light-gray);
    border-color: #adb5bd;
}

.fbsuche-pagination .active {
    background-color: var(--fbz-primary-color);
    color: var(--fbz-white);
    font-weight: bold;
    border-color: var(--fbz-primary-color);
}

.fbsuche-pagination .disabled {
    color: #adb5bd;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .fbsuche-page-container {
        padding: 0.5rem !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .fbsuche-advisor-card {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "photo"
            "details"
            "contact"
            "selbstvorstellung"
            "extras" !important;
        text-align: center !important;
        padding: 1rem !important;
        overflow: hidden !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .fbsuche-advisor-photo {
        justify-self: center !important;
    }
    
    .fbsuche-advisor-details,
    .fbsuche-advisor-contact,
    .fbsuche-advisor-selbstvorstellung,
    .fbsuche-advisor-extras {
        max-width: 100% !important;
        overflow: hidden !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .fbsuche-advisor-name {
        font-size: 1.1rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        hyphens: auto !important;
        max-width: 100% !important;
    }
    
    .fbsuche-advisor-contact p {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        max-width: 100% !important;
    }
    
    .fbsuche-advisor-contact a {
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        display: inline-block !important;
        max-width: 100% !important;
    }
    
    .fbsuche-advisor-extras {
        flex-direction: column !important;
    }
    
    .fbsuche-advisor-fachbereich-box,
    .fbsuche-advisor-memberships {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    .fbsuche-advisor-fachbereich-box h4,
    .fbsuche-advisor-memberships h4 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    .fbsuche-advisor-fachbereich-box li,
    .fbsuche-advisor-memberships li {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        white-space: normal !important;
    }
    
    .fbsuche-advisor-fachbereich-box ul,
    .fbsuche-advisor-memberships ul {
        max-width: 100% !important;
    }
    
    .fbsuche-form-actions {
        flex-direction: column !important;
    }
    
    .fbsuche-button,
    .fbsuche-button-secondary {
        width: 100% !important;
    }
    
    .fbsuche-search-container {
        padding: 1rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
