/* Bytenex Website Analyzer Frontend Styles */

.bytenex-analyzer-container,
.bytenex-analyzer-elementor-widget {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Header */
.bytenex-analyzer-header {
    text-align: center;
    margin-bottom: 2rem;
}

.bytenex-analyzer-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.bytenex-analyzer-header p {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Styles */
.bytenex-analyzer-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Captcha */
.captcha-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.captcha-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0 !important;
}

.captcha-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

.captcha-badge {
    text-align: right;
    font-size: 0.7rem;
    color: #6b7280;
}

/* Button */
.analyze-button {
    width: 100%;
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.analyze-button:hover {
    background: var(--primary-color-dark, #2563eb);
    transform: translateY(-1px);
}

.analyze-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

/* Progress */
.analyzer-progress {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.progress-header h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.progress-header p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.progress-steps {
    max-width: 400px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.progress-step.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.step-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #e5e7eb;
    margin-right: 0.75rem;
    position: relative;
}

.progress-step.active .step-icon {
    background: #3b82f6;
}

.progress-step.active .step-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.progress-step.completed .step-icon {
    background: #10b981;
}

.progress-step.completed .step-icon::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

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

/* Results */
.analyzer-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.analysis-results-container {
    padding: 2rem;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.results-header h3 {
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.results-header a {
    color: var(--primary-color, #3b82f6);
    text-decoration: none;
}

.results-header a:hover {
    text-decoration: underline;
}

/* Score Overview */
.score-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.score-card {
    text-align: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color, #3b82f6) calc(var(--score, 0) * 3.6deg), #e5e7eb 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
}

.score-circle span {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
}

.score-card h4 {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* Recommendations */
.recommendations-section {
    margin-bottom: 2rem;
}

.recommendations-section h4 {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.rec-category {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.rec-category h5 {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.recommendation {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recommendation.high-priority {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.02);
}

.recommendation.medium-priority {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.02);
}

.recommendation.low-priority {
    border-left-color: #06b6d4;
    background: rgba(6, 182, 212, 0.02);
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.rec-header strong {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    line-height: 1.4;
}

.priority-badge,
.category-badge {
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.priority-badge.high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.priority-badge.medium {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.priority-badge.low {
    background: #f0fdfa;
    color: #0d9488;
    border: 1px solid #a7f3d0;
}

.recommendation p {
    color: #4b5563;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.impact-section,
.implementation-section,
.testing-section,
.principle-section,
.reasoning-section,
.examples-section {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    border-left: 3px solid var(--accent-color, #059669);
}

.impact-label,
.impl-label,
.test-label,
.principle-label,
.reasoning-label,
.example-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.impact-section {
    border-left-color: #10b981;
}

.implementation-section {
    border-left-color: #3b82f6;
}

.testing-section {
    border-left-color: #8b5cf6;
}

.principle-section {
    border-left-color: #f59e0b;
}

.reasoning-section {
    border-left-color: #6b7280;
}

.examples-section {
    border-left-color: #ec4899;
}

.no-recommendations {
    text-align: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
    font-style: italic;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color, #3b82f6);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-color-dark, #2563eb);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Footer */
.bytenex-analyzer-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.9rem;
}

.bytenex-analyzer-footer a {
    color: var(--primary-color, #3b82f6);
    text-decoration: none;
}

.bytenex-analyzer-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bytenex-analyzer-header h2 {
        font-size: 1.5rem;
    }
    
    .bytenex-analyzer-form,
    .analyzer-progress,
    .analysis-results-container {
        padding: 1.5rem;
    }
    
    .score-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .score-overview {
        grid-template-columns: 1fr;
    }
    
    .score-circle {
        width: 60px;
        height: 60px;
    }
    
    .score-circle::before {
        width: 45px;
        height: 45px;
    }
    
    .score-circle span {
        font-size: 1.2rem;
    }
}

/* Elementor Preview */
.elementor-preview-notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: #0369a1;
    font-style: italic;
}