/* Image Accessibility Tracker Frontend Styles */

.iat-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Loading State */
.iat-loading {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.iat-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: iat-spin 1s linear infinite;
}

@keyframes iat-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Info Display */
.iat-info {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: iat-fadeIn 0.5s ease-out;
}

.iat-info h3 {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
}

.iat-section {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.iat-section:last-child {
    border-bottom: none;
}

.iat-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

/* Info Grid */
.iat-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.iat-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.iat-label {
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
}

.iat-value {
    color: #333;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    margin-left: 10px;
    font-weight: 600;
    font-size: 16px;
    word-break: break-all;
}

/* Test Results */
.iat-test-results {
    margin-top: 10px;
}

.iat-test-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.iat-test-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.iat-test-domain {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.iat-test-status {
    font-size: 12px;
    font-weight: 600;
}

.iat-test-success {
    color: #28a745;
}

.iat-test-failure {
    color: #dc3545;
}

/* Privacy Note */
.iat-privacy-note {
    margin: 0;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    color: #004085;
    font-size: 13px;
    line-height: 1.4;
}

/* Error State */
.iat-error {
    text-align: center;
    padding: 40px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

.iat-error h3 {
    margin: 0 0 15px 0;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .iat-container {
        margin: 10px;
        max-width: none;
    }
    
    .iat-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .iat-value {
        margin-left: 0;
        font-size: 14px;
    }
    
    .iat-test-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .iat-section {
        padding: 15px;
    }
    
    .iat-info h3 {
        padding: 15px;
        font-size: 18px;
    }
    
    .iat-section h4 {
        font-size: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .iat-info {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .iat-section {
        border-bottom-color: #333;
    }
    
    .iat-section h4 {
        color: #e0e0e0;
    }
    
    .iat-info-item,
    .iat-test-item {
        background: #2a2a2a;
        border-color: #333;
    }
    
    .iat-label,
    .iat-test-domain {
        color: #ccc;
    }
    
    .iat-value {
        color: #e0e0e0;
    }
    
    .iat-privacy-note {
        background: #1a2332;
        color: #b3d4fc;
    }
    
    .iat-loading {
        background: #2a2a2a;
        border-color: #333;
        color: #e0e0e0;
    }
}

/* Animations */
@keyframes iat-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iat-section {
    animation: iat-slideIn 0.3s ease-out forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.iat-section:nth-child(1) { animation-delay: 0.1s; }
.iat-section:nth-child(2) { animation-delay: 0.2s; }
.iat-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes iat-slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Print Styles */
@media print {
    .iat-container {
        box-shadow: none;
        max-width: none;
        margin: 0;
    }
    
    .iat-info {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .iat-section {
        break-inside: avoid;
    }
    
    .iat-spinner {
        display: none;
    }
    
    .iat-test-results {
        display: none;
    }
}