/* Shared rich-text rules (TinyMCE output) on landing, photographer, jury, admin */
.competition-rules-block {
    margin-top: 1.5rem;
}

.competition-rules-block .competition-rules-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.competition-rules-block .competition-rules-subheading {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem;
}

.competition-rules-content {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: inherit;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.competition-rules-content > *:first-child {
    margin-top: 0;
}

.competition-rules-content > *:last-child {
    margin-bottom: 0;
}

.competition-rules-content h1,
.competition-rules-content h2,
.competition-rules-content h3,
.competition-rules-content h4 {
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    line-height: 1.3;
}

.competition-rules-content h1 { font-size: 1.5rem; }
.competition-rules-content h2 { font-size: 1.25rem; }
.competition-rules-content h3 { font-size: 1.1rem; }
.competition-rules-content h4 { font-size: 1rem; }

.competition-rules-content p {
    margin-bottom: 0.75rem;
}

.competition-rules-content ul,
.competition-rules-content ol {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
}

.competition-rules-content li {
    margin-bottom: 0.35rem;
}

.competition-rules-content a {
    color: var(--bs-link-color, #0d6efd);
    text-decoration: underline;
}

.competition-rules-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.competition-rules-content th,
.competition-rules-content td {
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.competition-rules-content th {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.04);
}

.competition-rules-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

.competition-rules-content blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.03);
}

.competition-rules-content pre,
.competition-rules-content code {
    font-family: ui-monospace, monospace;
    font-size: 0.85em;
}

.competition-rules-content pre {
    padding: 0.75rem 1rem;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.25rem;
}

/* Jury judging header uses a dark background */
.judging-page .competition-rules-modal .competition-rules-content {
    color: #212529;
}
