/**
 * Improved Frontend Accessibility Widget Styles
 * Modern, professional, and fully accessible design
 */

.eea-accessibility-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    max-width: 380px;
    margin: 20px auto;
}

.eea-accessibility-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}

.eea-widget-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.eea-widget-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 24px;
}

.eea-widget-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.eea-widget-status {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.eea-status-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.eea-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.eea-status-dot.compliant {
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

.eea-status-dot.partial {
    background: #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
}

.eea-status-dot.non-compliant {
    background: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.2);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.eea-status-text {
    font-size: 16px;
    font-weight: 500;
}

.eea-percentage {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0;
    display: flex;
    align-items: baseline;
}

.eea-percentage-number {
    font-size: 32px;
    margin-right: 4px;
}

.eea-percentage-bar {
    background: rgba(255,255,255,0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.eea-percentage-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 4px;
    transition: width 1s ease-out;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.eea-widget-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.eea-feature-item {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
}

.eea-feature-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.eea-feature-icon {
    font-size: 20px;
    margin-bottom: 4px;
    display: block;
}

.eea-feature-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.eea-widget-actions {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.eea-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.eea-btn-primary {
    background: #ffffff;
    color: #667eea;
}

.eea-btn-primary:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.eea-btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.3);
}

.eea-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

.eea-widget-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    width: 100%;
    text-align: center;
}

.eea-widget-toggle:hover {
    background: rgba(255,255,255,0.25);
}

/* Expanded state */
.eea-accessibility-widget.expanded .eea-widget-details {
    max-height: 500px;
    opacity: 1;
    margin-top: 16px;
}

.eea-widget-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0;
    margin-top: 0;
}

.eea-widget-details-content {
    padding: 16px;
}

.eea-detail-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.eea-detail-item:last-child {
    border-bottom: none;
}

.eea-detail-icon {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
}

.eea-detail-text {
    flex: 1;
    font-size: 14px;
}

.eea-detail-value {
    font-weight: 600;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 480px) {
    .eea-accessibility-widget {
        margin: 10px;
        padding: 20px;
    }
    
    .eea-widget-features {
        grid-template-columns: 1fr;
    }
    
    .eea-widget-actions {
        flex-direction: column;
    }
    
    .eea-percentage-number {
        font-size: 28px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .eea-accessibility-widget {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .eea-accessibility-widget {
        border: 2px solid #ffffff;
        background: #000000;
    }
    
    .eea-btn-primary {
        border: 2px solid #667eea;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}