/**
 * Website Analyzer Styles - Enhanced Version 2.0
 * Virtuous Impact Solutions
 * Improved colors, visibility, and contrast
 */

/* ===========================
   Base Container Styles
   =========================== */

.vis-analyzer-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1f2937;
}

/* ===========================
   Header Section
   =========================== */

.vis-analyzer-header {
    text-align: center;
    margin-bottom: 50px;
}

.vis-analyzer-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 15px;
    line-height: 1.2;
}

.vis-analyzer-subtitle {
    font-size: 1.25rem;
    color: #4b5563;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===========================
   Step Container
   =========================== */

.vis-analyzer-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.vis-analyzer-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   Form Container - Step 1
   =========================== */

.vis-form-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.vis-form-intro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 40px;
    text-align: center;
}

.vis-form-intro h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: #ffffff;
}

.vis-form-intro p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.98;
    color: #ffffff;
}

.vis-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.vis-benefits-list li {
    padding: 10px 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: #ffffff;
}

.vis-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

/* ===========================
   Form Styles
   =========================== */

.vis-form {
    padding: 40px;
    background: #ffffff;
}

.vis-form-group {
    margin-bottom: 25px;
}

.vis-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
    font-weight: 700;
}

.vis-form-group input[type="text"],
.vis-form-group input[type="email"],
.vis-form-group input[type="tel"],
.vis-form-group input[type="url"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: #111827;
}

.vis-form-group input::placeholder {
    color: #9ca3af;
}

.vis-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #ffffff;
}

.vis-form-group input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.vis-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Checkbox Group */
.vis-checkbox-group {
    margin-top: 30px;
}

.vis-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: 400;
    color: #374151;
}

.vis-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.vis-checkbox-label span {
    color: #374151;
}

/* Form Actions */
.vis-form-actions {
    margin-top: 30px;
}

.vis-btn {
    display: inline-block;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.vis-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    width: 100%;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.vis-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.vis-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.vis-btn-secondary {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
    margin-left: 15px;
}

.vis-btn-secondary:hover {
    background: #667eea;
    color: #ffffff;
}

/* Button Loader */
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

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

.vis-privacy-note {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}

.vis-privacy-note small {
    color: #6b7280;
}

/* ===========================
   Loading Screen - Step 2
   =========================== */

.vis-loading-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.08);
    padding: 60px 40px;
    text-align: center;
}

.vis-loading-animation {
    margin-bottom: 30px;
}

.vis-spinner-large {
    width: 80px;
    height: 80px;
    border: 6px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.vis-loading-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 15px;
}

.vis-loading-text {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 40px;
}

.vis-loading-progress {
    max-width: 500px;
    margin: 0 auto;
}

.vis-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.vis-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.vis-progress-text {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

/* ===========================
   Results Screen - Step 3
   =========================== */

.vis-results-container {
    animation: fadeIn 0.6s ease;
}

/* Overall Score */
.vis-overall-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.vis-overall-score h3 {
    font-size: 1.75rem;
    margin-bottom: 30px;
    font-weight: 700;
    color: #ffffff;
}

.vis-score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 25px;
}

.vis-score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.vis-score-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 12;
}

.vis-score-progress {
    fill: none;
    stroke: #10b981;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 2s ease, stroke 0.5s ease;
}

.vis-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.vis-score-number {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
}

.vis-score-label {
    font-size: 1.5rem;
    opacity: 0.95;
    color: #ffffff;
}

.vis-score-status {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

/* Scores Grid */
.vis-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.vis-score-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vis-score-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.vis-card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.vis-score-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
}

.vis-card-score {
    margin-bottom: 15px;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
}

.score-max {
    font-size: 1.25rem;
    color: #9ca3af;
}

.vis-card-details {
    margin-top: 15px;
    text-align: left;
    font-size: 0.9rem;
    color: #6b7280;
}

.vis-card-details p {
    margin: 5px 0;
    color: #6b7280;
}

.vis-card-details strong {
    color: #374151;
}

.vis-card-status {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 15px;
}

.vis-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Recommendations */
.vis-recommendations {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.vis-recommendations h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 30px;
}

.vis-recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vis-recommendation-item {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.vis-recommendation-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.vis-rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.vis-rec-priority {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.vis-rec-priority.high {
    background: #fee2e2;
    color: #991b1b;
}

.vis-rec-priority.medium {
    background: #fef3c7;
    color: #92400e;
}

.vis-rec-priority.low {
    background: #dbeafe;
    color: #1e40af;
}

.vis-rec-category {
    padding: 6px 14px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
}

.vis-rec-body {
    margin-top: 15px;
}

.vis-rec-issue {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.5;
}

.vis-rec-solution {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
}

.vis-rec-solution strong {
    color: #374151;
}

.vis-no-issues {
    text-align: center;
    font-size: 1.2rem;
    color: #10b981;
    padding: 30px;
}

/* Results CTA */
.vis-results-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.vis-cta-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.vis-cta-content p {
    font-size: 1.15rem;
    margin-bottom: 30px;
    opacity: 0.98;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
}

.vis-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.vis-results-cta .vis-btn {
    min-width: 220px;
}

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

.vis-results-cta .vis-btn-primary:hover {
    background: #f9fafb;
    color: #764ba2;
    transform: translateY(-2px);
}

.vis-results-cta .vis-btn-secondary {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.vis-results-cta .vis-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===========================
   Error Message
   =========================== */

.vis-error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fee2e2;
    color: #991b1b;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    border: 2px solid #fca5a5;
}

.vis-error-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vis-error-icon {
    font-size: 1.5rem;
}

#error-text {
    color: #991b1b;
    font-weight: 500;
}

/* ===========================
   Success Message
   =========================== */

.vis-success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #d1fae5;
    color: #065f46;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    border: 2px solid #6ee7b7;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .vis-analyzer-title {
        font-size: 2rem;
    }
    
    .vis-analyzer-subtitle {
        font-size: 1.1rem;
    }
    
    .vis-form,
    .vis-form-intro {
        padding: 30px 25px;
    }
    
    .vis-scores-grid {
        grid-template-columns: 1fr;
    }
    
    .vis-recommendations {
        padding: 25px 20px;
    }
    
    .vis-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vis-btn-secondary {
        margin-left: 0 !important;
        margin-top: 10px;
    }
    
    .vis-results-cta .vis-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .vis-analyzer-title {
        font-size: 1.75rem;
    }
    
    .vis-score-number {
        font-size: 3rem;
    }
    
    .vis-rec-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .vis-form-container,
    .vis-loading-container,
    .vis-results-cta,
    .vis-error-message {
        display: none !important;
    }
    
    .vis-results-container {
        box-shadow: none;
    }
    
    .vis-score-card,
    .vis-recommendation-item {
        break-inside: avoid;
    }
    
    * {
        color: #000 !important;
        background: #fff !important;
    }
}
