/**
 * GDPR Scanner Styles - Editorial Design
 * Matches the exact aesthetic of the HTML page
 * Fraunces + DM Sans | Warm paper tones | Subtle & professional
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap');

/* Variables - EXACT match with HTML page */
:root {
    --ink: #0e1117;
    --ink-soft: #2a2f3e;
    --ink-muted: #6b7280;
    --paper: #f7f5f0;
    --paper-warm: #eeeae2;
    --accent: #c8491a;
    --accent-light: #f0d5c8;
    --white: #ffffff;
    --border: #d8d2c6;
    
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    
    --radius: 4px;
    --radius-lg: 12px;
    --shadow: 0 2px 12px rgba(14,17,23,0.08);
}

/* Container */
.gdpr-scanner-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.7;
    background: transparent;
}

/* Progress Bar - Subtle */
.progress-container {
    background: var(--paper-warm);
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar {
    background: var(--accent);
    height: 100%;
    transition: width 0.5s ease;
}

/* Step Indicators - Minimal */
.step-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paper-warm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    color: var(--ink-muted);
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}

.step-indicator.completed {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

/* Step Header - Editorial style */
.step-header {
    background: var(--ink);
    color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    text-align: center;
    position: relative;
}

.step-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

.step-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.step-header p {
    font-family: var(--font-body);
    margin: 0.75rem 0 0 0;
    opacity: 0.75;
    font-size: 0.95rem;
}

/* Form Container - Clean paper style */
.step-content {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: none;
    padding: 2rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Form Groups */
.gdpr-scanner-container .form-group {
    margin-bottom: 1.5rem;
}

.gdpr-scanner-container .form-group label {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ink);
    font-size: 0.9rem;
}

.gdpr-scanner-container .form-group label .required {
    color: var(--accent);
    font-weight: 600;
}

/* Input Fields - Clean and minimal */
.gdpr-scanner-container input[type="text"],
.gdpr-scanner-container input[type="email"],
.gdpr-scanner-container input[type="tel"],
.gdpr-scanner-container input[type="url"],
.gdpr-scanner-container select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--white);
    transition: all 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.gdpr-scanner-container select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-color: var(--white);
    padding-right: 2.5rem;
}

.gdpr-scanner-container input:focus,
.gdpr-scanner-container select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 73, 26, 0.1);
}

.gdpr-scanner-container input::placeholder {
    color: var(--ink-muted);
    opacity: 0.6;
}

/* Help text */
.gdpr-scanner-container .form-help {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* Grid Layout */
.gdpr-scanner-container .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Question Styling - Clean boxes */
.question-item {
    background: var(--paper);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.question-item:hover {
    border-left-color: var(--accent);
    box-shadow: var(--shadow);
}

.question-item > label {
    font-family: var(--font-body);
    font-weight: 500;
    display: block;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink);
}

/* Radio buttons - VERTICAL, editorial style */
.question-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.question-options label {
    font-family: var(--font-body);
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.question-options label:hover {
    border-color: var(--accent-light);
    background: var(--paper);
}

.question-options input[type="radio"] {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.question-options label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-light);
    font-weight: 500;
}

/* Buttons - Editorial style */
.btn {
    font-family: var(--font-body);
    padding: 0.85rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: #a83a12;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 73, 26, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--paper-warm);
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--paper);
    border-color: var(--ink-muted);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Results Section */
.score-box {
    background: var(--paper);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 2.5rem;
    text-align: center;
    margin: 2rem 0;
    border-radius: var(--radius-lg);
}

.score-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.score-rating {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--ink-muted);
    font-weight: 400;
}

/* Score breakdown */
.score-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.breakdown-item {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.breakdown-item h4 {
    font-family: var(--font-body);
    margin: 0 0 0.5rem 0;
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.breakdown-score {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.breakdown-bar {
    background: var(--paper-warm);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-fill {
    background: var(--accent);
    height: 100%;
    transition: width 1s ease;
}

/* Issues List */
.issues-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.issues-list li {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 3px solid #dc3545;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 2.5rem 0;
    padding: 2rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.cta-section h3 {
    font-family: var(--font-display);
    margin: 0 0 0.75rem 0;
    color: var(--ink);
    font-size: 1.5rem;
    font-weight: 600;
}

.cta-section p {
    margin: 0 0 1.5rem 0;
    color: var(--ink-muted);
    font-size: 1rem;
}

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.cta-button:hover {
    background: #a83a12;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 73, 26, 0.25);
    color: var(--white);
    text-decoration: none;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(247, 245, 240, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink-muted);
}

/* Messages */
.success-message {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-left: 3px solid #48bb78;
    color: #276749;
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.success-message .icon {
    font-size: 1.5rem;
}

.warning-box {
    background: #fffaf0;
    border: 1px solid #fbd38d;
    border-left: 3px solid #f6ad55;
    color: #975a16;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.privacy-note {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-left: 3px solid #4299e1;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #2b6cb0;
    margin-top: 1.5rem;
    line-height: 1.6;
}

.privacy-note a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}

.privacy-note a:hover {
    text-decoration: underline;
}

/* Review Table */
#review-content table {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border-collapse: collapse;
}

#review-content table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

#review-content table td:first-child {
    background: var(--paper);
    font-weight: 500;
    width: 35%;
    color: var(--ink);
}

#review-content table td:last-child {
    color: var(--ink-muted);
}

#review-content table tr:last-child td {
    border-bottom: none;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.trust-badge {
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.85rem;
}

.trust-badge .icon {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .step-header {
        padding: 2rem 1.5rem;
    }
    
    .step-header h2 {
        font-size: 1.3rem;
    }
    
    .step-content {
        padding: 1.5rem;
    }
    
    .gdpr-scanner-container .form-row {
        grid-template-columns: 1fr;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.scanner-step {
    animation: fadeIn 0.4s ease;
}
