/* Wiederverkäufer Blubber Frontend Styles */
.wvb-table-container {
    background: var(--wvb-background, #ffffff);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 20px 0;
    font-family: var(--wvb-font, inherit);
}

/* Filter Bar */
.wvb-filter-bar {
    display: flex;
    gap: 8px;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    overflow-x: auto;
    margin-bottom: 0;
}

.wvb-filter-btn {
    padding: 10px 16px;
    background: var(--wvb-primary, #2e77a0);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.wvb-filter-btn:hover {
    background: var(--wvb-secondary, #166e9c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.wvb-filter-btn.active {
    background: var(--wvb-secondary, #166e9c);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.wvb-show-all {
    background: #6c757d;
    margin-left: auto;
}

.wvb-show-all:hover {
    background: #5a6268;
}

.wvb-show-all.active {
    background: #545b62;
}

/* Tabelle */
.wvb-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--wvb-font, inherit);
}

.wvb-table th {
    background: var(--wvb-primary, #2e77a0);
    color: white;
    padding: 15px 12px;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    border: none;
    position: relative;
}

.wvb-table th:hover {
    background: var(--wvb-secondary, #166e9c);
}

.wvb-table th::after {
    content: '↕';
    margin-left: 8px;
    opacity: 0.7;
    font-size: 12px;
}

.wvb-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.wvb-table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.wvb-table tbody tr:last-child td {
    border-bottom: none;
}

/* Logo in Tabelle */
.wvb-table-logo {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

.wvb-table-logo img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Status Anzeige */
.wvb-status-open {
    color: #28a745;
    font-weight: 500;
}

.wvb-status-closed {
    color: #dc3545;
    font-weight: 500;
}

.wvb-status-unknown {
    color: #6c757d;
    font-weight: 500;
}

.wvb-status-indicator {
    margin-right: 6px;
    font-size: 16px;
    vertical-align: middle;
}

/* Details Button */
.wvb-details-btn {
    padding: 8px 16px;
    background: var(--wvb-primary, #2e77a0);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.wvb-details-btn:hover {
    background: var(--wvb-secondary, #166e9c);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Modal */
.wvb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    overflow-y: auto;
    animation: wvbModalBgFadeIn 0.3s ease;
}

@keyframes wvbModalBgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wvb-modal-content {
    position: relative;
    background: white;
    margin: 40px auto;
    padding: 30px;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: wvbModalFadeIn 0.3s ease;
}

@keyframes wvbModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wvb-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.wvb-close:hover {
    color: #dc3545;
    background: #f8f9fa;
}

/* Modal Header - NEUES LAYOUT */
.wvb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--wvb-primary, #2e77a0);
    position: relative;
}

.wvb-modal-logo {
    flex-shrink: 0;
    margin-right: 20px;
}

.wvb-modal-logo img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    object-fit: cover;
    background: #f8f9fa;
}

.wvb-modal-title {
    flex: 1;
    margin: 0;
    color: var(--wvb-primary, #2e77a0);
    font-size: 28px;
    line-height: 1.2;
    text-align: center;
    font-weight: 700;
}

.wvb-modal-spacer {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-left: 20px;
    visibility: hidden;
}

/* Modal Inhalte */
.wvb-contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.wvb-contact-row {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.wvb-contact-label {
    font-weight: bold;
    min-width: 100px;
    color: #495057;
    flex-shrink: 0;
}

.wvb-contact-value {
    flex: 1;
}

.wvb-contact-value a {
    color: var(--wvb-primary, #2e77a0);
    text-decoration: none;
    transition: color 0.3s ease;
}

.wvb-contact-value a:hover {
    color: var(--wvb-secondary, #166e9c);
    text-decoration: underline;
}

.wvb-opening-hours,
.wvb-description-content {
    margin-bottom: 25px;
}

.wvb-opening-hours h3,
.wvb-description-content h3 {
    color: var(--wvb-primary, #2e77a0);
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.wvb-hours-display {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 15px;
}

.wvb-current-status {
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 500;
    border-left: 4px solid;
    font-size: 15px;
}

.wvb-current-status.open {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.wvb-current-status.closed {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.wvb-description-content {
    line-height: 1.7;
}

.wvb-description-content h2,
.wvb-description-content h3,
.wvb-description-content h4 {
    color: var(--wvb-primary, #2e77a0);
    margin-top: 20px;
    margin-bottom: 10px;
}

.wvb-description-content ul,
.wvb-description-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.wvb-description-content blockquote {
    border-left: 3px solid var(--wvb-secondary, #166e9c);
    padding-left: 15px;
    margin-left: 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
}

/* Loading und Error States */
.wvb-loading,
.wvb-error {
    text-align: center;
    padding: 40px;
    font-size: 16px;
}

.wvb-loading {
    color: var(--wvb-primary, #2e77a0);
}

.wvb-error {
    color: #dc3545;
}

.wvb-no-retailers {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wvb-filter-bar {
        padding: 10px;
        gap: 6px;
    }
    
    .wvb-filter-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .wvb-table thead {
        display: none;
    }
    
    .wvb-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .wvb-table td {
        display: block;
        border: none;
        padding: 8px 0;
        position: relative;
        padding-left: 120px;
    }
    
    .wvb-table td::before {
        content: attr(data-label);
        font-weight: bold;
        position: absolute;
        left: 0;
        width: 110px;
        color: #495057;
    }
    
    .wvb-table td:last-child {
        text-align: center;
        padding-left: 0;
    }
    
    .wvb-table td:last-child::before {
        display: none;
    }
    
    .wvb-modal-content {
        margin: 20px auto;
        padding: 20px;
        width: 95%;
    }
    
    /* Mobile Header Layout */
    .wvb-modal-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .wvb-modal-logo {
        margin-right: 0;
        order: 1;
    }
    
    .wvb-modal-title {
        order: 2;
        font-size: 24px;
    }
    
    .wvb-modal-spacer {
        display: none;
    }
    
    .wvb-modal-logo img {
        width: 70px;
        height: 70px;
    }
    
    .wvb-contact-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wvb-contact-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .wvb-table-logo {
        display: block;
        margin: 0 auto 10px auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wvb-filter-bar {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .wvb-show-all {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .wvb-modal-content {
        padding: 15px;
    }
    
    .wvb-close {
        right: 10px;
        top: 10px;
    }
    
    .wvb-modal-title {
        font-size: 22px;
    }
    
    .wvb-modal-logo img {
        width: 60px;
        height: 60px;
    }
}

/* Druck-Styles */
@media print {
    .wvb-filter-bar,
    .wvb-details-btn,
    .wvb-close {
        display: none !important;
    }
    
    .wvb-table-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .wvb-modal {
        position: static;
        background: white;
    }
    
    .wvb-modal-content {
        margin: 0;
        box-shadow: none;
        border: 1px solid #000;
    }
}