/* Webhosting Vergleich Frontend Styles */

.whvch-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* CSS Variables for customizable colors */
:root {
    --whvch-primary: #4CAF50;
    --whvch-dark: #388E3C;
    --whvch-light: #81C784;
    --whvch-bg: #f5f5f5;
    --whvch-text: #2c3e50;
    --whvch-border: #e0e0e0;
    --whvch-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.whvch-wrapper * {
    box-sizing: border-box;
}

/* Stats Section */
.whvch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.whvch-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--whvch-shadow);
    text-align: center;
    transition: transform 0.3s;
}

.whvch-stat-card:hover {
    transform: translateY(-5px);
}

.whvch-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--whvch-primary);
    margin-bottom: 0.5rem;
}

.whvch-stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Filters */
.whvch-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--whvch-shadow);
    margin-bottom: 2rem;
}

.whvch-filters h3 {
    color: var(--whvch-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.whvch-filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.whvch-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.whvch-filter-item label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--whvch-text);
}

.whvch-filter-item input,
.whvch-filter-item select {
    padding: 0.75rem;
    border: 2px solid var(--whvch-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.whvch-filter-item input:focus,
.whvch-filter-item select:focus {
    outline: none;
    border-color: var(--whvch-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.whvch-search-box {
    grid-column: 1 / -1;
}

.whvch-search-box input {
    width: 100%;
}

/* Sort Controls */
.whvch-sort-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.whvch-sort-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--whvch-border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.95rem;
}

.whvch-sort-btn:hover {
    border-color: var(--whvch-primary);
}

.whvch-sort-btn.whvch-active {
    background: var(--whvch-primary);
    color: white;
    border-color: var(--whvch-primary);
}

.whvch-compare-toggle-btn {
    padding: 0.6rem 1.2rem;
    background: var(--whvch-dark);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    margin-left: auto;
}

.whvch-compare-toggle-btn:hover {
    background: var(--whvch-primary);
    transform: translateY(-2px);
}

.whvch-compare-toggle-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Provider Grid */
.whvch-providers-grid {
    display: grid;
    gap: 1.5rem;
}

.whvch-provider-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--whvch-shadow);
    padding: 1.5rem;
    transition: all 0.3s;
}

.whvch-provider-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.whvch-provider-card.whvch-selected {
    border: 3px solid var(--whvch-primary);
}

.whvch-provider-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.whvch-provider-info {
    flex: 1;
}

.whvch-rank-badge {
    background: var(--whvch-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.whvch-provider-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--whvch-text);
    margin: 0 0 0.25rem 0;
}

.whvch-provider-location {
    color: #666;
    font-size: 0.9rem;
}

.whvch-market-position {
    display: inline-block;
    background: var(--whvch-light);
    color: var(--whvch-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.whvch-provider-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.whvch-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.whvch-detail-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.whvch-detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--whvch-text);
}

.whvch-price-tag {
    color: var(--whvch-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.whvch-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.whvch-feature-badge {
    background: #f0f0f0;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--whvch-text);
}

.whvch-feature-badge.whvch-highlight {
    background: rgba(76, 175, 80, 0.1);
    color: var(--whvch-dark);
    font-weight: 600;
}

.whvch-eco-badge {
    background: var(--whvch-primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.whvch-special-features {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--whvch-primary);
    margin-top: 1rem;
}

.whvch-special-features h4 {
    font-size: 0.9rem;
    color: var(--whvch-dark);
    margin: 0 0 0.5rem 0;
}

.whvch-special-features p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.whvch-card-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.whvch-compare-checkbox {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--whvch-border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.whvch-compare-checkbox:hover {
    border-color: var(--whvch-primary);
    background: rgba(76, 175, 80, 0.05);
}

.whvch-compare-checkbox.whvch-checked {
    background: var(--whvch-primary);
    color: white;
    border-color: var(--whvch-primary);
}

.whvch-compare-checkbox.whvch-checked .whvch-checkbox-icon::before {
    content: '☑';
}

.whvch-cta-button {
    flex: 2;
    background: var(--whvch-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.whvch-cta-button:hover {
    background: var(--whvch-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* No Results */
.whvch-no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--whvch-shadow);
}

.whvch-no-results h3 {
    color: var(--whvch-text);
    margin-bottom: 1rem;
}

/* Comparison Modal */
.whvch-comparison-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
}

.whvch-comparison-modal.whvch-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.whvch-comparison-content {
    background: white;
    border-radius: 12px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.whvch-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--whvch-border);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.whvch-comparison-header h2 {
    margin: 0;
    color: var(--whvch-primary);
}

.whvch-close-comparison {
    background: #ff4444;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.whvch-close-comparison:hover {
    background: #cc0000;
    transform: rotate(90deg);
}

.whvch-comparison-body {
    padding: 1.5rem;
}

.whvch-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.whvch-comparison-table th,
.whvch-comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--whvch-border);
}

.whvch-comparison-table th {
    background: var(--whvch-primary);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 5;
}

.whvch-comparison-table tr:hover {
    background: #f9f9f9;
}

.whvch-comparison-provider-header {
    background: var(--whvch-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.whvch-comparison-provider-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--whvch-dark);
    margin-bottom: 0.5rem;
}

.whvch-comparison-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--whvch-primary);
}

/* Footer */
.whvch-footer {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--whvch-shadow);
    margin-top: 2rem;
    text-align: center;
}

.whvch-footer p {
    color: #666;
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .whvch-wrapper {
        padding: 1rem;
    }
    
    .whvch-provider-details {
        grid-template-columns: 1fr;
    }
    
    .whvch-filter-group {
        grid-template-columns: 1fr;
    }
    
    .whvch-sort-controls {
        flex-direction: column;
    }
    
    .whvch-compare-toggle-btn {
        margin-left: 0;
        width: 100%;
    }
    
    .whvch-card-actions {
        flex-direction: column;
    }
    
    .whvch-comparison-modal {
        padding: 1rem;
    }
    
    .whvch-comparison-table {
        font-size: 0.85rem;
    }
    
    .whvch-comparison-table th,
    .whvch-comparison-table td {
        padding: 0.5rem;
    }
}

/* Loading State */
.whvch-loading {
    text-align: center;
    padding: 2rem;
}

.whvch-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--whvch-border);
    border-top-color: var(--whvch-primary);
    border-radius: 50%;
    animation: whvch-spin 1s linear infinite;
}

@keyframes whvch-spin {
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .whvch-filters,
    .whvch-sort-controls,
    .whvch-compare-checkbox,
    .whvch-cta-button {
        display: none;
    }
    
    .whvch-provider-card {
        page-break-inside: avoid;
    }
}
