/* =====================================================
   Legal Pages CSS - Mobile-First Responsive
   For Impressum, Datenschutz, Disclaimer, AGB
   ===================================================== */

/* ===== Legal Page Container - Mobile First ===== */
.legal-page {
    padding: var(--spacing-lg, 32px) 0;
    background: #f8f9fa;
    min-height: 70vh;
}

.legal-content {
    background: #ffffff;
    padding: var(--spacing-md, 24px);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Typography - Mobile First ===== */
.legal-content h1 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 3px solid #0066cc;
    line-height: 1.2;
}

.legal-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    font-style: italic;
    line-height: 1.5;
}

.legal-section {
    margin: 32px 0;
}

.legal-section h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 12px;
    margin-top: 24px;
    line-height: 1.3;
}

.legal-section h3 {
    font-size: 18px;
    color: #555;
    margin-bottom: 10px;
    margin-top: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.legal-section h4 {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    margin-top: 12px;
    font-weight: 600;
}

.legal-section p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
    font-size: 15px;
}

.legal-section ul, .legal-section ol {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-section li {
    margin: 8px 0;
    line-height: 1.7;
    color: #444;
    font-size: 15px;
}

/* ===== Links ===== */
.legal-section a {
    color: #0066cc;
    text-decoration: none;
    transition: all 0.15s ease;
    word-break: break-word;
}

.legal-section a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.legal-section a:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== Emphasis ===== */
.legal-section strong {
    font-weight: 600;
    color: #333;
}

.legal-section em {
    font-style: italic;
}

/* ===== Special Sections ===== */
.final-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--radius-md, 8px);
    padding: var(--spacing-md, 24px);
    margin-top: 40px;
}

.final-warning h2 {
    color: #dc3545;
}

.contact-box {
    background: #e6f2ff;
    border-left: 4px solid #0066cc;
    padding: var(--spacing-md, 24px);
    border-radius: var(--radius-sm, 4px);
    margin: 24px 0;
}

.highlight-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm, 4px);
    padding: var(--spacing-sm, 16px);
    margin: 16px 0;
}

/* ===== Tables ===== */
.legal-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    overflow-x: auto;
    display: block;
}

.legal-section th,
.legal-section td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.legal-section th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.legal-section td {
    background: #ffffff;
}

/* ===== Footer ===== */
.legal-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.legal-footer p {
    margin-bottom: 8px;
}

/* ===== Blockquotes ===== */
.legal-section blockquote {
    border-left: 4px solid #0066cc;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: #666;
}

/* ===== Code Blocks ===== */
.legal-section code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #dc3545;
}

.legal-section pre {
    background: #f8f9fa;
    padding: 16px;
    border-radius: var(--radius-sm, 4px);
    overflow-x: auto;
    margin: 16px 0;
}

.legal-section pre code {
    background: none;
    padding: 0;
}

/* ===== Responsive - Tablet ===== */
@media (min-width: 768px) {
    .legal-page {
        padding: var(--spacing-xl, 48px) 0;
    }
    
    .legal-content {
        padding: var(--spacing-lg, 32px) var(--spacing-xl, 48px);
    }
    
    .legal-content h1 {
        font-size: 36px;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .legal-subtitle {
        font-size: 18px;
        margin-bottom: 32px;
    }
    
    .legal-section h2 {
        font-size: 26px;
        margin-top: 32px;
    }
    
    .legal-section h3 {
        font-size: 20px;
        margin-top: 20px;
    }
    
    .legal-section p,
    .legal-section li {
        font-size: 16px;
    }
    
    .legal-section ul,
    .legal-section ol {
        padding-left: 32px;
    }
    
    .legal-section table {
        font-size: 15px;
        display: table;
    }
    
    .final-warning,
    .contact-box {
        padding: var(--spacing-lg, 32px);
    }
    
    .legal-footer {
        margin-top: 50px;
        padding-top: 30px;
        font-size: 15px;
    }
}

/* ===== Responsive - Desktop ===== */
@media (min-width: 1024px) {
    .legal-content h1 {
        font-size: 40px;
    }
    
    .legal-section h2 {
        font-size: 28px;
    }
    
    .legal-section h3 {
        font-size: 22px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .legal-page {
        background: white;
        padding: 0;
    }
    
    .legal-content {
        box-shadow: none;
        padding: 0;
        max-width: 100%;
    }
    
    .legal-content h1 {
        font-size: 24pt;
        page-break-after: avoid;
    }
    
    .legal-section h2,
    .legal-section h3 {
        page-break-after: avoid;
    }
    
    .legal-section {
        page-break-inside: avoid;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* ===== Accessibility ===== */
.legal-section :focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .legal-content {
        border: 2px solid #000;
    }
    
    .legal-section a {
        text-decoration: underline;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .legal-section a {
        transition: none;
    }
}
