/**
 * Monolox Document Check - Frontend Styles
 */

.doccheck-pro {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Progress Steps */
.doccheck-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.doccheck-progress .step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 14px;
}

.doccheck-progress .step span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.doccheck-progress .step.active {
    color: #2563eb;
}

.doccheck-progress .step.active span {
    background: #2563eb;
    color: #fff;
}

.doccheck-progress .step.completed span {
    background: #10b981;
    color: #fff;
}

.doccheck-progress .line {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 15px;
}

.doccheck-progress .line.active {
    background: #2563eb;
}

/* Cards */
.doccheck-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    display: none;
}

.doccheck-card.active {
    display: block;
}

.card-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

@media (max-width: 768px) {
    .card-layout {
        grid-template-columns: 1fr;
    }
}

/* Section Badge */
.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Upload Section */
.upload-section h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #1e293b;
}

.upload-subtitle {
    color: #64748b;
    margin: 0 0 25px 0;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: #f8fafc;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.drop-icon {
    margin-bottom: 15px;
}

.drop-text {
    color: #64748b;
    margin: 0 0 15px 0;
}

.btn-upload {
    display: inline-block;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-upload:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    margin: 20px 0;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    color: #166534;
}

.file-size {
    color: #64748b;
    font-size: 13px;
}

.file-remove {
    margin-left: auto;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-back {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 10px 0;
    margin-top: 20px;
}

.btn-back:hover {
    color: #3b82f6;
}

/* Info Section */
.info-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
}

.info-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #334155;
}

.steps-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-step {
    display: flex;
    gap: 12px;
}

.info-step-num {
    width: 24px;
    height: 24px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.info-step strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
}

.info-step span {
    color: #64748b;
    font-size: 13px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.trust-badge {
    background: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Package Grid */
.step-subtitle {
    color: #64748b;
    margin-bottom: 25px;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .package-grid {
        grid-template-columns: 1fr;
    }
}

.package-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    background: #fff;
}

.package-card:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.package-card.featured {
    border-color: #3b82f6;
    background: linear-gradient(to bottom, #eff6ff, #fff);
}

.package-card.selected {
    border-color: #10b981;
    background: #f0fdf4;
}

.package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.package-card h3 {
    margin: 10px 0 5px 0;
    font-size: 18px;
    color: #1e293b;
}

.package-subtitle {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 15px 0;
}

.package-price {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.package-description {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
    min-height: 40px;
}

.btn-select-package {
    width: 100%;
    padding: 12px;
    border: 2px solid #3b82f6;
    background: #fff;
    color: #3b82f6;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-select-package:hover {
    background: #3b82f6;
    color: #fff;
}

.btn-select-package.btn-free {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.btn-select-package.btn-free:hover {
    background: #059669;
    border-color: #059669;
}

/* Analysis Progress */
.analysis-progress {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 20px auto 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

/* Results */
#analysis-results h2 {
    margin-top: 0;
}

.result-summary {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 20px;
    text-align: center;
}

/* Score Box */
.score-box {
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.score-box.score-green {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
}

.score-box.score-yellow {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}

.score-box.score-red {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
}

.score-circle {
    margin-bottom: 15px;
}

.score-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.score-green .score-value { color: #10b981; }
.score-yellow .score-value { color: #f59e0b; }
.score-red .score-value { color: #ef4444; }

.score-label {
    display: block;
    font-size: 14px;
    color: #64748b;
    margin-top: 5px;
    font-weight: 500;
}

.score-bar-container {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.score-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.score-green .score-bar { background: linear-gradient(90deg, #10b981, #34d399); }
.score-yellow .score-bar { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.score-red .score-bar { background: linear-gradient(90deg, #ef4444, #f87171); }

.score-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 14px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f1f5f9;
}

.stat-item.stat-yes { color: #10b981; background: #ecfdf5; }
.stat-item.stat-no { color: #ef4444; background: #fef2f2; }
.stat-item.stat-unclear { color: #f59e0b; background: #fffbeb; }

/* Category Stats */
.result-category h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-stats {
    font-size: 13px;
    font-weight: normal;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 12px;
}

#results-container {
    margin-bottom: 30px;
}

.result-category {
    margin-bottom: 20px;
}

.result-category h3 {
    background: #f1f5f9;
    padding: 12px 15px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    color: #475569;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-top: none;
}

.result-item:last-child {
    border-radius: 0 0 8px 8px;
}

.result-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.result-icon.yes { color: #10b981; }
.result-icon.no { color: #ef4444; }
.result-icon.unclear { color: #f59e0b; }

.result-content {
    flex: 1;
}

.result-question {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 5px;
}

.result-answer {
    color: #64748b;
    font-size: 14px;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.result-actions .btn-primary {
    margin-top: 0;
    width: auto;
    flex: 1;
}

/* Disclaimer */
.disclaimer {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 15px;
}

.disclaimer p {
    margin: 0;
    color: #92400e;
    font-size: 13px;
}

/* E-Mail Option */
.email-option {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.email-option h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #0369a1;
}

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

.email-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

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

.btn-send-email {
    background: #0ea5e9;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-send-email:hover:not(:disabled) {
    background: #0284c7;
}

.btn-send-email:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.email-success {
    color: #059669;
    font-weight: 600;
    padding: 10px;
}

@media (max-width: 480px) {
    .email-form {
        flex-direction: column;
    }
}

/* ============================================
   V3-Report Styles
   ============================================ */

.v3-report-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.v3-report-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
}

.v3-report-content {
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
    max-height: none;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.v3-report-content.collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.v3-report-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, #f8fafc);
}

.v3-toggle-btn {
    display: block;
    margin: 16px auto 0;
    padding: 8px 20px;
    background: #e2e8f0;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
}

.v3-toggle-btn:hover {
    background: #cbd5e1;
}

.v3-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e40af;
    margin: 20px 0 10px 0;
    padding: 8px 12px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0 6px 6px 0;
}

.v3-section-title:first-child {
    margin-top: 0;
}

.v3-list-item {
    padding: 6px 0 6px 20px;
    margin: 4px 0;
}

.v3-list-num {
    font-weight: 700;
    color: #3b82f6;
    display: inline-block;
    width: 24px;
    margin-left: -20px;
}

.v3-bullet {
    padding: 4px 0 4px 16px;
    margin: 2px 0;
    border-left: 2px solid #e2e8f0;
}

.v3-quote {
    font-style: italic;
    color: #1e40af;
    background: #eff6ff;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Ampel-Farben */
.ampel {
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin: 4px 0;
}

.ampel-gruen {
    background: #dcfce7;
    color: #166534;
}

.ampel-gelb {
    background: #fef9c3;
    color: #854d0e;
}

.ampel-rot {
    background: #fee2e2;
    color: #991b1b;
}

/* V3-Report Print Styles */
@media print {
    .v3-report-box {
        border: 1px solid #000;
        background: #fff !important;
        page-break-inside: avoid;
    }
    
    .v3-toggle-btn {
        display: none;
    }
    
    .v3-report-content.collapsed {
        max-height: none;
    }
    
    .v3-report-content.collapsed::after {
        display: none;
    }
}
