/**
 * Frontend CSS for AI Readiness Analyzer
 * This file should be saved as: assets/frontend.css
 */

 .ai-analyzer-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-analyzer-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.ai-analyzer-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.ai-analyzer-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-help {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.analyze-button, 
.submit-contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
}

.analyze-button:hover, 
.submit-contact:hover {
    transform: translateY(-2px);
}

.analyze-button:disabled, 
.submit-contact:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: none;
    text-align: center;
    margin: 10px 0;
}

.spinner::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.analysis-results {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.contact-form-section {
    background: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.contact-form-section h4 {
    color: #2c3e50;
    margin-top: 0;
}

.gdpr-consent {
    margin: 15px 0;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 4px;
}

.gdpr-consent label {
    display: block;
    margin: 10px 0;
    font-size: 14px;
}

.gdpr-consent input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.privacy-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.analysis-header h3 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    word-break: break-word;
}

.score-display {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-right: 20px;
    flex-shrink: 0;
}

.score-excellent { 
    background: linear-gradient(135deg, #4CAF50, #45a049); 
}

.score-good { 
    background: linear-gradient(135deg, #FF9800, #f57c00); 
}

.score-poor { 
    background: linear-gradient(135deg, #f44336, #d32f2f); 
}

.score-info {
    flex-grow: 1;
}

.score-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.score-status {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.score-status-blurb {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.platform-detected {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 15px 0;
    color: #1976d2;
}

.checks-section,
.recommendations-section {
    margin: 25px 0;
}

.checks-section h4,
.recommendations-section h4 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.check-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.check-pass {
    background: #d4edda;
    border-left-color: #28a745;
}

.check-fail {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.check-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.check-pass .check-icon {
    background: #28a745;
    color: white;
}

.check-fail .check-icon {
    background: #dc3545;
    color: white;
}

.check-warning .check-icon {
    background: #ffc107;
    color: white;
}

.check-message {
    flex-grow: 1;
    font-size: 14px;
}

.check-score {
    background: #17a2b8;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.upsell-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    border-style: solid;
    border-color: red;
}

.upsell-box h5 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.upsell-box p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.upsell-button {
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s ease;
}

.upsell-button:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.recommendation {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.recommendation.critical {
    border-left: 4px solid #dc3545;
}

.recommendation.high {
    border-left: 4px solid #fd7e14;
}

.recommendation.medium {
    border-left: 4px solid #ffc107;
}

.recommendation.low {
    border-left: 4px solid #28a745;
}

.recommendation h6 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
}

.recommendation p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.technical-details {
    margin: 25px 0;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.toggle-header {
    background: #f8f9fa;
    padding: 15px;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-header:hover {
    background: #e9ecef;
}

.toggle-arrow {
    transition: transform 0.3s ease;
}

.details-content {
    padding: 15px;
}

.details-content h5 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.details-content code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 15px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .ai-analyzer-container {
        margin: 10px;
        padding: 15px;
    }
    
    .score-display {
        flex-direction: column;
        text-align: center;
    }
    
    .score-circle {
        margin: 0 0 15px 0;
    }
    
    .check-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .check-icon {
        margin-bottom: 5px;
    }
}


/* Add this to your assets/frontend.css */

/* Consultation box for non-WordPress/Shopify platforms */
/*.consultation-box {
    background: #f0f8ff;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.consultation-button {
    background: #4a90e2;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    margin-top: 10px;
}

.consultation-button:hover {
    background: #357abd;
    color: white;
}
*/
.consultation-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    border-style: solid;
    border-color: red;
}

.consultation-box h5 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.consultation-box p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.consultation-button {
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s ease;
}

.consultation-button:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* Priority labels */
.priority-label {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.priority-label.critical {
    background: #dc3545;
    color: white;
}

.priority-label.high {
    background: #fd7e14;
    color: white;
}

.priority-label.medium {
    background: #ffc107;
    color: #333;
}

.priority-label.low {
    background: #6c757d;
    color: white;
}

/* Technical details note */
.technical-details-note {
    background: #f8f9fa;
    border-left: 3px solid #6c757d;
    padding: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* Not found messages */
.not-found {
    color: #dc3545;
    font-style: italic;
}

/* Metadata display */
.metadata-list {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.metadata-item {
    margin: 5px 0;
    font-family: monospace;
    font-size: 13px;
}

/* Enhanced recommendation styling */
.recommendation {
    border-left: 4px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    background: #fafafa;
}

.recommendation.priority-critical {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.recommendation.priority-high {
    border-left-color: #fd7e14;
    background: #fff8f0;
}

.recommendation.priority-medium {
    border-left-color: #ffc107;
    background: #fffdf0;
}

.recommendation.priority-low {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

/* Add to your assets/frontend.css */

.check-score-detailed {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
    min-width: 80px;
}

.score-fraction {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.score-percentage {
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.2;
}

/* Color coding based on percentage */
.check-pass .score-fraction {
    color: #28a745;
}

.check-warning .score-fraction {
    color: #ffc107;
}

.check-fail .score-fraction {
    color: #dc3545;
}

.check-pass .score-percentage {
    color: #155724;
}

.check-warning .score-percentage {
    color: #856404;
}

.check-fail .score-percentage {
    color: #721c24;
}

/* Ensure check items have proper flex layout */
.check-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    border-left: 4px solid;
}

.check-message {
    flex-grow: 1;
    margin: 0 10px;
}

/* Add this to your assets/frontend.css */

/* Email Confirmation */
.email-confirmation {
    background: #e7f5e7;
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    color: #2e7d2e;
}

.email-confirmation p {
    margin: 0;
    font-weight: 500;
}

/* Enhanced GDPR Consent Section */
.gdpr-consent label {
    display: block;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.gdpr-consent input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: top;
    margin-top: 2px;
}

/* Highlight the email summary option */
.email-summary-option {
    background: #f0f8ff !important;
    padding: 8px !important;
    border-radius: 4px !important;
    border: 1px solid #4a90e2 !important;
    margin: 12px 0 !important;
}

.privacy-note {
    font-size: 12px !important;
    color: #666 !important;
    font-style: italic;
    margin-top: 10px !important;
}

/* Result Sharing Section */
.result-sharing {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.result-sharing h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.share-link-container {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.share-link {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    background: white;
}

.copy-link-btn {
    padding: 10px 15px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.copy-link-btn:hover {
    background: #005a87;
}

.analysis-date {
    margin: 10px 0 0 0;
    color: #6c757d;
}

.quick-share {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin: 15px 0;
    text-align: center;
}

.quick-share a {
    color: #155724;
    font-weight: bold;
    text-decoration: none;
}

.quick-share a:hover {
    text-decoration: underline;
}

/* Priority labels for recommendations */
.priority-label {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.priority-label.critical {
    background: #dc3545;
    color: white;
}

.priority-label.high {
    background: #fd7e14;
    color: white;
}

.priority-label.medium {
    background: #ffc107;
    color: #333;
}

.priority-label.low {
    background: #6c757d;
    color: white;
}

/* Technical details note */
.technical-details-note {
    background: #f8f9fa;
    border-left: 3px solid #6c757d;
    padding: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* Enhanced scoring display */
.check-score-detailed {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
    min-width: 80px;
}

.score-fraction {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.score-percentage {
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.2;
}

/* Color coding based on status */
.check-pass .score-fraction {
    color: #28a745;
}

.check-warning .score-fraction {
    color: #ffc107;
}

.check-fail .score-fraction {
    color: #dc3545;
}

.check-pass .score-percentage {
    color: #155724;
}

.check-warning .score-percentage {
    color: #856404;
}

.check-fail .score-percentage {
    color: #721c24;
}

/* Ensure check items have proper flex layout */
.check-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    border-left: 4px solid;
}

.check-message {
    flex-grow: 1;
    margin: 0 10px;
}

/* Enhanced recommendation styling */
.recommendation {
    border-left: 4px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    background: #fafafa;
}

.recommendation.priority-critical {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.recommendation.priority-high {
    border-left-color: #fd7e14;
    background: #fff8f0;
}

.recommendation.priority-medium {
    border-left-color: #ffc107;
    background: #fffdf0;
}

.recommendation.priority-low {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

/* Result viewer styles */
.ai-analyzer-result-viewer {
    max-width: 800px;
    margin: 0 auto;
}

.result-token-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.token-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}

.token-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.token-form button {
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.token-form button:hover {
    background: #005a87;
}

.loading-result {
    text-align: center;
    padding: 40px;
}

.loading-result .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Not found messages */
.not-found {
    color: #dc3545;
    font-style: italic;
}

/* Metadata display */
.metadata-list {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.metadata-item {
    margin: 5px 0;
    font-family: monospace;
    font-size: 13px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .share-link-container,
    .token-form {
        flex-direction: column;
    }
    
    .copy-link-btn,
    .token-form button {
        margin-top: 10px;
    }
    
    .check-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .check-score-detailed {
        align-items: flex-start;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .result-sharing {
        padding: 15px;
    }
    
    .consultation-box,
    .upsell-box {
        padding: 15px;
    }
}


/* Fair Use Policy Notice */
.fair-use-notice {
    text-align: center;
    margin: 10px 0 5px 0;
    color: #666;
    font-style: italic;
}

.fair-use-notice small {
    font-size: 12px;
    line-height: 1.4;
}