/**
 * BVFI24 Geschäftsstellen Widget Styles
 * Modernes Design für externe Einbettung
 */

/* Reset und Basis-Styles */
.gs-widget * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.gs-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: none;
    margin: 0;
}

/* CSS-Variablen für konfigurierbare Farben */
.gs-widget {
    --gs-widget-primary-color: #3B82F6;
    --gs-widget-primary-light: #3B82F620;
    --gs-widget-primary-dark: #3B82F6;
}

/* Dark Theme */
.gs-widget.dark {
    background: #111827;
    color: #f9fafb;
}

/* Loading State */
.gs-widget-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.gs-widget-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--gs-widget-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.gs-widget-loading p {
    color: #6b7280;
    font-size: 14px;
}

/* Error State */
.gs-widget-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.gs-widget-error-icon {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.gs-widget-error p {
    color: #6b7280;
    font-size: 14px;
}

/* Hero Section */
.gs-widget-hero {
    position: relative;
    width: 100%;
    height: 256px;
    background: linear-gradient(to right, #3B82F6, #6366F1);
    overflow: hidden;
}

@media (min-width: 768px) {
    .gs-widget-hero {
        height: 320px;
    }
}

@media (min-width: 1024px) {
    .gs-widget-hero {
        height: 384px;
    }
}

.gs-widget-hero-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.gs-widget-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.gs-widget-hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.gs-widget-hero-text {
    text-align: center;
    color: white;
}

.gs-widget-hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .gs-widget-hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .gs-widget-hero-title {
        font-size: 3.75rem;
    }
}

.gs-widget-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .gs-widget-hero-subtitle {
        font-size: 1.5rem;
    }
}

/* Business Info */
.gs-widget-business-info {
    margin-bottom: 32px;
}

.gs-widget-business-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.gs-widget-business-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gs-widget-business-initial {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.gs-widget-business-details {
    flex: 1;
    min-width: 0;
}

.gs-widget-business-name {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.2;
}

.dark .gs-widget-business-name {
    color: #f9fafb;
}

.gs-widget-business-address {
    color: #6b7280;
    font-size: 1rem;
}

.gs-widget-business-description {
    margin-bottom: 16px;
}

.gs-widget-description-text {
    color: #374151;
    font-size: 1rem;
    line-height: 1.6;
}

.dark .gs-widget-description-text {
    color: #d1d5db;
}

/* Content Section */
.gs-widget-content {
    padding: 32px;
}

.gs-widget-icon {
    width: 20px;
    height: 20px;
    color: var(--gs-widget-primary-color);
    flex-shrink: 0;
}

/* Section Styles */
.gs-widget-section {
    margin-bottom: 32px;
}

.gs-widget-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.dark .gs-widget-section-title {
    color: #f9fafb;
    border-bottom-color: #374151;
}

/* Leiter Section */
.gs-widget-leiter {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gs-widget-leiter-card {
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 100%;
}

.dark .gs-widget-leiter-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

.gs-widget-leiter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.gs-widget-leiter-content {
    display: flex;
    gap: 24px;
    width: 100%;
}

.gs-widget-leiter-left {
    display: flex;
    gap: 16px;
    width: 50%;
    min-width: 0;
}

.gs-widget-leiter-avatar {
    width: 60px;
    height: 60px;
    border-radius: 8px; /* Eckig statt rund */
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gs-widget-leiter-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gs-widget-leiter-info {
    flex: 1;
    min-width: 0;
}

.gs-widget-leiter-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.dark .gs-widget-leiter-name {
    color: #f9fafb;
}

.gs-widget-leiter-company {
    font-size: 14px;
    font-weight: 500;
    color: var(--gs-widget-primary-color);
    margin-bottom: 2px;
}

.gs-widget-leiter-industry {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gs-widget-leiter-email,
.gs-widget-leiter-phone,
.gs-widget-leiter-website,
.gs-widget-leiter-address {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.gs-widget-leiter-description {
    width: 50%;
    min-width: 0;
    padding-left: 24px;
    border-left: 1px solid #e5e7eb;
}

.dark .gs-widget-leiter-description {
    border-left-color: #374151;
}

.gs-widget-leiter-description p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Vorstände Section - Grid Layout */
.gs-widget-vorstaende {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gs-widget-vorstand-card {
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    gap: 16px;
}

.dark .gs-widget-vorstand-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

.gs-widget-vorstand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.gs-widget-vorstand-avatar {
    width: 60px;
    height: 60px;
    border-radius: 8px; /* Eckig statt rund */
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gs-widget-vorstand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gs-widget-avatar-placeholder {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.8);
}

.gs-widget-vorstand-info {
    flex: 1;
    min-width: 0;
}

.gs-widget-vorstand-company {
    font-size: 14px;
    font-weight: 600;
    color: var(--gs-widget-primary-color);
    margin-bottom: 4px;
}

.dark .gs-widget-vorstand-company {
    color: var(--gs-widget-primary-color);
}

.gs-widget-vorstand-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.gs-widget-vorstand-industry {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gs-widget-vorstand-email,
.gs-widget-vorstand-phone,
.gs-widget-vorstand-website,
.gs-widget-vorstand-address {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

/* Branchenbuch Section */
.gs-widget-bb-search {
    margin-bottom: 20px;
}

.gs-widget-bb-search input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.gs-widget-bb-search input:focus {
    outline: none;
    border-color: var(--gs-widget-primary-color);
    box-shadow: 0 0 0 3px var(--gs-widget-primary-light);
}

.gs-widget-bb-entries {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gs-widget-bb-card {
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dark .gs-widget-bb-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

.gs-widget-bb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.gs-widget-bb-company {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.dark .gs-widget-bb-company {
    color: #f9fafb;
}

.gs-widget-bb-category {
    font-size: 12px;
    color: var(--gs-widget-primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.gs-widget-bb-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 12px;
}

.gs-widget-bb-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gs-widget-bb-address,
.gs-widget-bb-phone {
    font-size: 12px;
    color: #6b7280;
}

.gs-widget-bb-website {
    font-size: 12px;
    color: var(--gs-widget-primary-color);
    text-decoration: none;
}

.gs-widget-bb-website:hover {
    text-decoration: underline;
}

/* Pagination */
.gs-widget-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.gs-widget-pagination-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gs-widget-pagination-btn {
    padding: 8px 16px;
    background: var(--gs-widget-primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 44px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gs-widget-pagination-btn:hover {
    background: var(--gs-widget-primary-dark);
    transform: translateY(-1px);
}

.gs-widget-pagination-current {
    padding: 8px 16px;
    background: var(--gs-widget-primary-light);
    color: var(--gs-widget-primary-color);
    border: 1px solid var(--gs-widget-primary-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    min-width: 44px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gs-widget-hero {
        height: 224px;
    }

    .gs-widget-business-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .gs-widget-business-avatar {
        width: 56px;
        height: 56px;
    }

    .gs-widget-business-initial {
        font-size: 1.25rem;
    }

    .gs-widget-content {
        padding: 24px;
    }

    .gs-widget-title {
        font-size: 24px;
    }

    .gs-widget-vorstaende {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gs-widget-leiter {
        gap: 16px;
    }

    .gs-widget-bb-entries {
        grid-template-columns: repeat(2, 1fr);
    }

    .gs-widget-vorstand-card,
    .gs-widget-leiter-card {
        flex-direction: column;
        text-align: center;
    }

    .gs-widget-vorstand-avatar,
    .gs-widget-leiter-avatar {
        align-self: center;
    }

    .gs-widget-leiter-content {
        flex-direction: column;
    }

    .gs-widget-leiter-left {
        width: 100%;
    }

    .gs-widget-leiter-description {
        width: 100%;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-top: 16px;
        margin-top: 16px;
    }
}

@media (max-width: 480px) {
    .gs-widget {
        border-radius: 12px;
    }

    .gs-widget-hero {
        height: 192px;
    }

    .gs-widget-business-header {
        gap: 10px;
        margin-bottom: 16px;
    }

    .gs-widget-business-avatar {
        width: 48px;
        height: 48px;
    }

    .gs-widget-business-initial {
        font-size: 1rem;
    }

    .gs-widget-content {
        padding: 20px;
    }

    .gs-widget-business-name {
        font-size: 1.5rem;
    }

    .gs-widget-section-title {
        font-size: 18px;
    }

    .gs-widget-vorstaende {
        grid-template-columns: 1fr;
    }
    
    .gs-widget-bb-entries {
        grid-template-columns: 1fr;
    }
} 