/* Formal legal document styling — shared across public, admin preview, and signed records */

.waiver-document,
.waiver-document-paper {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #1a1a1a;
}

.waiver-document-paper {
    background: #fafaf8;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    padding: 2rem 2.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.waiver-document-content h1 {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #8b0000;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    border-bottom: 2px solid #8b0000;
    padding-bottom: 0.75rem;
}

.waiver-document-content h2 {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 1.5rem 0 0.5rem;
    counter-increment: section;
}

.waiver-document-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin: 1rem 0 0.4rem;
}

.waiver-document-content p {
    margin: 0.6rem 0;
    text-align: justify;
}

.waiver-document-content strong {
    font-weight: 700;
    color: #111;
}

.waiver-document-content em {
    font-style: italic;
    color: #444;
}

.waiver-document-content hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 1.25rem 0;
}

.waiver-document-content ul,
.waiver-document-content ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding: 0;
}

.waiver-document-content li {
    margin: 0.3rem 0;
}

.waiver-document-content blockquote {
    border-left: 3px solid #8b0000;
    margin: 1rem 0;
    padding: 0.75rem 1.25rem;
    background: #f5f0f0;
    font-style: italic;
    color: #333;
}

.waiver-document-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.waiver-document-content th,
.waiver-document-content td {
    border: 1px solid #ccc;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.waiver-document-content th {
    background: #f0f0f0;
    font-weight: 700;
}

/* Dark-theme public page wrapper */
.waiver-document {
    background: var(--bg-3, #25262b);
    color: #e8e8e8;
    border-radius: 8px;
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.waiver-document .waiver-document-content {
    color: #e8e8e8;
}

.waiver-document .waiver-document-content h1 {
    color: #ff4444;
    border-bottom-color: #ff4444;
}

.waiver-document .waiver-document-content h2,
.waiver-document .waiver-document-content h3 {
    color: #f0f0f0;
}

.waiver-document .waiver-document-content strong {
    color: #fff;
}

.waiver-document .waiver-document-content blockquote {
    background: rgba(255, 8, 8, 0.08);
    border-left-color: #ff4444;
    color: #ddd;
}

.waiver-document .waiver-document-content table th,
.waiver-document .waiver-document-content table td {
    border-color: rgba(255, 255, 255, 0.15);
}

.waiver-document .waiver-document-content table th {
    background: rgba(255, 255, 255, 0.06);
}

.waiver-attached-image-wrap {
    margin: 1rem 0;
    text-align: center;
}

.waiver-attached-image {
    max-width: 100%;
    max-height: 320px;
    border: 1px solid #ccc;
    border-radius: 4px;
    object-fit: contain;
}

.waiver-document .waiver-attached-image {
    border-color: rgba(255, 255, 255, 0.2);
}

@media print {
    .waiver-document-paper {
        box-shadow: none;
        border: none;
        max-height: none;
        overflow: visible;
        padding: 0;
    }

    .waiver-document-content h1 {
        color: #000;
        border-bottom-color: #000;
    }
}