/*
 * Ringer index panel, in the Ringing World house style (from Peter Sheppard, Idio).
 * On ringingworld.co.uk the theme already loads Open Sans and Arno Pro; this file
 * only names them, with close fallbacks for anywhere they aren't loaded.
 */
.rwri {
  --rw-blue: #000085;      /* Primary dark blue */
  --rw-red: #C80000;       /* Secondary red (hover) */
  --rw-offwhite: #F0F1E6;  /* Background */
  --rw-grey1: #A19C8A;     /* Borders and rules; too light for text */
  --rw-grey2: #D1CFC7;
  --rw-text-muted: #5E5A4D; /* Darker than Grey 1 so small text stays readable */
  --rw-serif: "Arno Pro", "EB Garamond", Garamond, Georgia, serif;
  --rw-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  max-width: 44rem;
  font-family: var(--rw-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  color: #1E1E1E;
}

/* Headings: Arno Pro, weight 400 */
.rwri-title { font-family: var(--rw-serif); font-size: 2.4rem; font-weight: 400; line-height: 1.15; color: var(--rw-blue); margin: 0 0 .5rem; }
.rwri-h { font-family: var(--rw-serif); font-size: 1.6rem; font-weight: 400; line-height: 1.2; color: var(--rw-blue); margin: 1.6rem 0 .4rem; }

/* Links */
.rwri a, .rwri-link { color: var(--rw-blue); font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }
.rwri a:hover, .rwri a:focus-visible { color: var(--rw-red); }

/* Buttons: dark blue, Arno Pro 1.1rem white, red on hover */
.rwri-button, .rwri-tab {
  font-family: var(--rw-serif); font-size: 1.1rem; font-weight: 400; line-height: 1.2;
  border: 2px solid var(--rw-blue); border-radius: 0; cursor: pointer;
  padding: .55rem 1.2rem; transition: background-color .15s, border-color .15s, color .15s;
}
.rwri-button { background: var(--rw-blue); color: #fff; margin-top: 1.2rem; }
.rwri-button:hover, .rwri-button:focus-visible { background: var(--rw-red); border-color: var(--rw-red); }
.rwri-button[disabled] { opacity: .5; cursor: default; }

.rwri-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.rwri-tab { background: transparent; color: var(--rw-blue); }
.rwri-tab.is-active { background: var(--rw-blue); color: #fff; }
.rwri-tab:hover, .rwri-tab:focus-visible { background: var(--rw-red); border-color: var(--rw-red); color: #fff; }

/* Forms */
.rwri-label { display: block; margin: .8rem 0 .2rem; font-weight: 600; }
.rwri-input {
  display: block; width: 100%; box-sizing: border-box; margin-top: .25rem;
  padding: .6rem .75rem; font: inherit; color: #1E1E1E; background: #fff;
  border: 1px solid var(--rw-grey1); border-radius: 0;
}
.rwri-input:focus { outline: 2px solid var(--rw-blue); outline-offset: 1px; border-color: var(--rw-blue); }

/* Lists, tables, notes */
.rwri-list { list-style: none; padding: 0; margin: .6rem 0; }
.rwri-list li { padding: .7rem 0; border-bottom: 1px solid var(--rw-grey2); }
.rwri-muted { color: var(--rw-text-muted); font-size: .92em; margin: .15rem 0; }
.rwri-lead { font-size: 1.15em; margin: 0 0 .2rem; }
.rwri-note { background: #fff; border-left: 4px solid var(--rw-blue); padding: .6rem .85rem; margin: .8rem 0; }
.rwri-error { color: var(--rw-red); font-weight: 600; }
.rwri-band { border-collapse: collapse; margin: .8rem 0; }
.rwri-band td { padding: .35rem .7rem .35rem 0; vertical-align: top; border-bottom: 1px solid var(--rw-grey2); }
.rwri-bell { text-align: right; color: var(--rw-text-muted); width: 2rem; }
.rwri-footer { margin-top: 2.2rem; padding-top: .8rem; border-top: 1px solid var(--rw-grey2); font-size: .82em; color: var(--rw-text-muted); }
.rwri-footer a { font-weight: 400; }

/* Submit form (works like the PWA) */
.rwri-field { margin-bottom: .4rem; }
.rwri-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0 .8rem; }
.rwri-picker { position: relative; }
.rwri-suggest {
  position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 0; padding: 0; list-style: none;
  background: #fff; border: 1px solid var(--rw-grey1); border-top: 0; max-height: 18rem; overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.rwri-suggest li { border-bottom: 1px solid var(--rw-grey2); }
.rwri-suggest button {
  display: block; width: 100%; text-align: left; padding: .55rem .75rem; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer;
}
.rwri-suggest button:hover, .rwri-suggest button:focus-visible { background: var(--rw-offwhite); }
.rwri-s-main { display: block; font-weight: 600; color: var(--rw-blue); }
.rwri-s-sub { display: block; font-size: .85em; color: var(--rw-text-muted); }
.rwri-s-new { color: var(--rw-red) !important; font-weight: 600; }
.rwri-s-none { padding: .55rem .75rem; color: var(--rw-text-muted); }
.rwri-picked {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  margin-top: .25rem; padding: .55rem .75rem; background: #fff; border: 1px solid var(--rw-grey1);
}
.rwri-picked.is-warn { border-color: var(--rw-red); }
.rwri-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--rw-blue); text-decoration: underline; cursor: pointer; }
.rwri-linkbtn:hover { color: var(--rw-red); }
.rwri-bellhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.rwri-count { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.rwri-count .rwri-tab { padding: .2rem .75rem; }
.rwri-bellrow { display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; align-items: start; padding: .35rem 0; }
.rwri-bellrow.has-conflict { background: rgba(200,0,0,.05); outline: 1px solid rgba(200,0,0,.35); padding: .35rem; }
.rwri-bellno { padding-top: .8rem; text-align: right; color: var(--rw-text-muted); font-weight: 600; }
.rwri-bellpick .rwri-input, .rwri-bellpick .rwri-picked { margin-top: 0; }
.rwri-check { padding-top: .7rem; white-space: nowrap; font-weight: 600; cursor: pointer; }
.rwri-check input { width: 1.1rem; height: 1.1rem; vertical-align: -2px; accent-color: var(--rw-blue); }
.rwri-conflict { margin-top: .4rem; }
.rwri-conflict p { margin: 0 0 .4rem; }
.rwri-small { font-size: .95rem !important; padding: .35rem .8rem !important; margin: 0 .4rem .4rem 0 !important; }
textarea.rwri-input { resize: vertical; }
.rwri a.rwri-buttonlink { display: inline-block; color: #fff; text-decoration: none; font-weight: 400; margin-top: .2rem; }
.rwri a.rwri-buttonlink:hover, .rwri a.rwri-buttonlink:focus-visible { color: #fff; background: var(--rw-red); border-color: var(--rw-red); }
.rwri-hint { display: block; margin-top: .2rem; font-size: .85em; color: var(--rw-text-muted); }
.rwri-hint.is-bad { color: var(--rw-red); font-weight: 600; }
