/* Richtext link & document-link styles */
.rich-text a {
    color: #2563eb !important;
    text-decoration: none;
}

.rich-text a:hover {
    text-decoration: underline;
}

/* ── Document-link icon ── */
.rich-text a[href^="/documents/"],
.puck-richtext a[href^="/documents/"] {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #2563eb !important;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.rich-text a[href^="/documents/"]:hover,
.puck-richtext a[href^="/documents/"]:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
}

.rich-text a[href^="/documents/"]::before,
.puck-richtext a[href^="/documents/"]::before {
    content: "";
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z' /%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z' /%3E%3C/svg%3E");
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* ── RichText & Puck RichText: restore list markers and headings stripped by global reset ── */
.rich-text ul,
.puck-richtext ul {
    list-style-type: disc !important;
    padding-left: 1.5em !important;
    margin: 0.5em 0;
}

.rich-text ol,
.puck-richtext ol {
    list-style-type: decimal !important;
    padding-left: 1.5em !important;
    margin: 0.5em 0;
}

.rich-text li,
.puck-richtext li {
    display: list-item !important;
    margin: 0.25em 0;
}

.rich-text h1,
.puck-richtext h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0.5em 0;
}

.rich-text h2,
.puck-richtext h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0.5em 0;
}

.rich-text h3,
.puck-richtext h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.5em 0;
}

.rich-text h4,
.puck-richtext h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5em 0;
}

.rich-text h5,
.puck-richtext h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.5em 0;
}

.rich-text h6,
.puck-richtext h6 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5em 0;
}

.rich-text,
.puck-richtext {
    overflow-wrap: break-word;
    word-break: normal;
}

.rich-text p,
.puck-richtext p {
    margin: 0.5em 0;
    overflow-wrap: break-word;
    word-break: normal;
}

.puck-richtext a {
    color: #2563eb;
    text-decoration: underline;
}

/* ── Puck Files component ── */
.puck-files__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.puck-files {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

.puck-files__item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.puck-files__icon {
    font-size: 1.25rem;
}

.puck-files__link {
    color: #3b82f6;
    text-decoration: none;
}

.puck-files__link:hover {
    text-decoration: underline;
}

/* ── Base image styles ── */
.richtext-image {
    max-width: 100%;
    height: auto;
}

/* ── Alignment: full-width ── */
.richtext-image.full-width {
    width: 100%;
    display: block;
    margin: 1rem 0;
}

/* ── Alignment: center ── */
.richtext-image.center {
    display: block;
    margin: 1rem auto;
}

/* ── Alignment: left (block, no float — text does NOT wrap) ── */
.richtext-image.left {
    display: block;
    margin: 1rem auto 1rem 0;
}

/* ── Alignment: right (block, no float — text does NOT wrap) ── */
.richtext-image.right {
    display: block;
    margin: 1rem 0 1rem auto;
}

/* ── Text color inline styles (Draftail) ── */
.rich-text .text-yellow {
    color: #FFD600;
}

.rich-text .text-blue {
    color: #3B82F6;
}

.rich-text .text-white {
    color: #FFFFFF;
}

.rich-text .text-gray {
    color: #9CA3AF;
}

.rich-text .text-green {
    color: #22C55E;
}

.rich-text .text-red {
    color: #EF4444;
}