/* DPA Document Styling - Nordic Hosting */

/* General Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    font-size: 11pt;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
    max-width: 210mm;
    margin: 0 auto;
    padding: 20mm;
}

/* Document Container */
.document {
    background: white;
}

/* Header */
.document-header {
    border-bottom: 3px solid #0369a1;
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.logo-section h1 {
    font-size: 24pt;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 5px;
}

.logo-section .subtitle {
    font-size: 14pt;
    color: #64748b;
    font-weight: 500;
}

.metadata {
    text-align: right;
    font-size: 9pt;
    color: #64748b;
}

.metadata p {
    margin: 2px 0;
}

/* Print Button */
.print-button-container {
    text-align: center;
    margin: 20px 0;
}

.print-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0369a1;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.print-button:hover {
    background: #0c4a6e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.print-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.print-icon {
    width: 20px;
    height: 20px;
}

/* Parties Section */
.parties {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.party-description {
    color: #64748b;
    font-size: 10pt;
}

.party {
    margin: 15px 0;
}

.party p {
    margin: 5px 0;
}

.party strong {
    color: #0369a1;
    font-size: 11pt;
}

/* Table of Contents */
.toc {
    background: #f8fafc;
    border-left: 4px solid #0369a1;
    padding: 20px 30px;
    margin: 30px 0;
    page-break-inside: avoid;
}

.toc h2 {
    font-size: 14pt;
    color: #0369a1;
    margin-bottom: 15px;
}

.toc ol {
    margin-left: 20px;
}

.toc li {
    margin: 8px 0;
    font-size: 10pt;
}

.toc a {
    color: #334155;
    text-decoration: none;
    transition: color 0.2s;
}

.toc a:hover {
    color: #0369a1;
    text-decoration: underline;
}

/* Content Sections */
.content-section {
    margin: 30px 0;
    page-break-inside: avoid;
}

.content-section h2 {
    font-size: 13pt;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.content-section h3 {
    font-size: 11pt;
    font-weight: 600;
    color: #334155;
    margin-top: 20px;
    margin-bottom: 10px;
}

.content-section ol {
    margin-left: 25px;
    margin-top: 10px;
}

.content-section ol li {
    margin: 10px 0;
    padding-left: 5px;
}

.content-section ol ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

.content-section ul {
    margin-left: 25px;
    margin-top: 10px;
}

.content-section ul li {
    margin: 8px 0;
}

/* Bilag (Appendix) Sections */
.bilag {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 25px;
    margin: 40px 0;
}

.bilag h2 {
    color: #0c4a6e;
    border-bottom-color: #0369a1;
}

/* Tables */
.subprocessors-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 10pt;
}

.subprocessors-table thead {
    background: #0369a1;
    color: white;
}

.subprocessors-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.subprocessors-table td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
}

.subprocessors-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.subprocessors-table tbody tr[colspan="2"] td {
    background: #e0f2fe;
    font-weight: 600;
    color: #0c4a6e;
}

/* Contact Info */
.contact-info {
    background: #eff6ff;
    border-left: 4px solid #0369a1;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.contact-info h3 {
    color: #0369a1;
    margin-bottom: 15px;
}

.contact-info p {
    margin: 8px 0;
    font-size: 10pt;
}

.contact-info strong {
    color: #0c4a6e;
}

/* Notes and Callouts */
.note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin: 15px 0;
    font-size: 10pt;
    border-radius: 4px;
}

/* Footer */
.document-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
    font-size: 9pt;
    color: #64748b;
}

.document-footer p {
    margin: 5px 0;
}

.print-date {
    font-style: italic;
    color: #94a3b8;
}

/* Print Styles */
@media print {
    /* Hide print button when printing */
    .print-button-container {
        display: none;
    }

    body {
        padding: 0;
        max-width: 100%;
    }
    
    .document-header,
    .content-section,
    .bilag {
        page-break-inside: avoid;
    }
    
    .content-section {
        page-break-after: auto;
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
    
    .toc {
        page-break-after: always;
    }
    
    a {
        color: #0369a1;
        text-decoration: none;
    }
    
    /* Add page numbers */
    @page {
        margin: 20mm;
        
        @bottom-center {
            content: "Side " counter(page) " av " counter(pages);
            font-size: 9pt;
            color: #64748b;
        }
    }
}

/* Screen-only elements */
@media screen {
    body {
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 15px;
        font-size: 10pt;
    }
    
    .document-header {
        flex-direction: column;
    }
    
    .metadata {
        text-align: left;
        margin-top: 15px;
    }
    
    .subprocessors-table {
        font-size: 9pt;
    }
    
    .subprocessors-table th,
    .subprocessors-table td {
        padding: 8px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .document-header {
        border-bottom-color: black;
    }
    
    .logo-section h1,
    .content-section h2,
    .toc h2 {
        color: black;
    }
}

