/* Text notices: the same look on the board (display.html) and in the gabbai's editor (admin.html).
   Sizes use --u, one design pixel of the board; the editor sets --u so its box is a small copy of the board's frame. */
@font-face { font-family: 'AdamEve'; src: url('fonts/FbAdamEveVF.ttf') format('truetype'); font-weight: 100 900; }

.nt { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden;
  padding: calc(46 * var(--u)) calc(76 * var(--u)); font-family: 'AdamEve', 'Segoe UI', Arial, sans-serif; color: #fff;
  background-size: cover; background-position: center; text-align: center; text-wrap: pretty; }
/* line spacing: chosen per notice (--lh), a little tighter for the big sizes */
.nt .rt { position: relative; z-index: 2; width: 100%; font-size: calc(36 * var(--u)); line-height: var(--lh, 1.15); text-wrap: pretty; outline: none; }
.nt .rt * { text-wrap: pretty; }
.nt .rt div, .nt .rt p { margin: 0; }
.nt .rt ul, .nt .rt ol { text-align: start; padding-inline-start: 1.2em; margin: .2em 0; }
.nt .rt font[size="1"] { font-size: .55em; }
.nt .rt font[size="2"] { font-size: .75em; }
.nt .rt font[size="3"] { font-size: 1em; }
.nt .rt font[size="4"] { font-size: 1.3em; }
.nt .rt font[size="5"] { font-size: 1.65em; }
.nt .rt font[size="6"] { font-size: 2.1em; }
.nt .rt font[size="7"] { font-size: 2.8em; }
/* a line written all in one size gets that size itself, so its spacing follows the text and not the normal size
   (rich-text.js marks such lines with data-size) */
.nt .rt [data-size] font[size] { font-size: 1em; }
.nt .rt [data-size="1"] { font-size: .55em; }
.nt .rt [data-size="2"] { font-size: .75em; }
.nt .rt [data-size="4"] { font-size: 1.3em; }
.nt .rt [data-size="5"] { font-size: 1.65em; line-height: calc(var(--lh, 1.15) - .05); }
.nt .rt [data-size="6"] { font-size: 2.1em; line-height: calc(var(--lh, 1.15) - .1); }
.nt .rt [data-size="7"] { font-size: 2.8em; line-height: calc(var(--lh, 1.15) - .15); }
.nt .rt b, .nt .rt strong { font-weight: 800; }

/* backgrounds */
.nt.bg-blue  { background-image: linear-gradient(180deg, #285B60, #1f4a4e); }
.nt.bg-night { background-image: linear-gradient(180deg, #40576B, #354859); }
.nt.bg-green { background-image: linear-gradient(180deg, #38634F, #2e5242); }
.nt.bg-wine  { background-image: linear-gradient(180deg, #874F45, #73413a); }
.nt.bg-paper { background-image: linear-gradient(180deg, #fbf4e3, #f0e3c4); color: #2b2216; }
.nt.bg-white { background-color: #fffdf8; color: #1d2740; }
/* text shadow on pictures: a light brown, 20%, easy on the eye (gabbai) */
.nt.bg-image { background-color: #333; text-shadow: 0 calc(2 * var(--u)) calc(5 * var(--u)) rgba(160, 115, 60, .2); }
/* our framed parchments: the frame is part of the picture, so the text keeps clear of the corners */
.nt.bg-ornate      { background-image: url('notices/bg/ornate.jpg'); }
.nt.bg-ornateBeads { background-image: url('notices/bg/ornate-beads.jpg'); }
.nt.bg-grapes      { background-image: url('notices/bg/grapes.jpg'); }
.nt.bg-ornate, .nt.bg-ornateBeads, .nt.bg-grapes { color: #2b2216; padding: calc(84 * var(--u)) calc(150 * var(--u)); }

/* backgrounds the gabbai uploaded and kept: text colour follows the picture (light picture: dark text) */
.nt.bg-custom { background-color: #f6efe0; color: #2b2216; }
.nt.bg-custom.bg-dark { background-color: #333; color: #fff; text-shadow: 0 calc(2 * var(--u)) calc(5 * var(--u)) rgba(160, 115, 60, .2); }
.nt.bg-padded { padding: calc(84 * var(--u)) calc(150 * var(--u)); }

/* frames (on the plain backgrounds) */
.nt.fr-line::after, .nt.fr-double::after { content: ''; position: absolute; z-index: 1; pointer-events: none; inset: calc(18 * var(--u));
  border: calc(3 * var(--u)) solid #c9a861; border-radius: calc(10 * var(--u)); }
.nt.fr-double::after { border-width: calc(7 * var(--u)); border-style: double; }
.nt .nc { position: absolute; z-index: 1; width: calc(150 * var(--u)); height: auto; pointer-events: none;
  filter: drop-shadow(0 calc(2 * var(--u)) calc(4 * var(--u)) rgba(110, 72, 30, .3)); }
.nt .nc.tr { top: calc(8 * var(--u)); right: calc(8 * var(--u)); }
.nt .nc.tl { top: calc(8 * var(--u)); left: calc(8 * var(--u)); transform: scaleX(-1); }
.nt .nc.br { bottom: calc(8 * var(--u)); right: calc(8 * var(--u)); transform: scaleY(-1); }
.nt .nc.bl { bottom: calc(8 * var(--u)); left: calc(8 * var(--u)); transform: scale(-1, -1); }
.nt.fr-line, .nt.fr-double { padding: calc(56 * var(--u)) calc(86 * var(--u)); }
.nt.fr-ornate { padding: calc(84 * var(--u)) calc(150 * var(--u)); }
