/* site-extras.css — named utilities for things the pre-built theme.css lacks.
 *
 * theme.css is a compiled Tailwind bundle with no arbitrary-value support at
 * runtime and, notably, no form-input styles at all (its only form-adjacent
 * selector is .transition-transform). Rather than invent Tailwind classes that
 * would silently do nothing, the homepage uses the named classes below.
 *
 * Keep this file small and additive. Never restyle existing site elements here.
 */

/* --- card grids ------------------------------------------------------------
 * theme.css is ~5 concatenated Tailwind builds, so utilities are declared many
 * times over. The LAST `.sm\:grid-cols-2` sits after the LAST `.lg\:grid-cols-3`,
 * and media queries carry no specificity, so above 1024px the sm rule wins and a
 * three-column grid silently renders as two. These named classes load after
 * theme.css and sidestep the collision entirely.
 */
.cc-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .cc-grid-2,
  .cc-grid-3,
  .cc-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cc-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cc-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --- translucent card on the dark navy bands -------------------------------
 * Replaces bg-[#F7F5EF]/[0.06], which has no compiled selector.
 */
.cc-card-dark {
  background-color: rgba(247, 245, 239, 0.06);
}

/* --- bullet lists without default padding ---------------------------------
 * Replaces p-0, absent from theme.css.
 */
.cc-bare-list {
  padding-left: 0;
  margin-left: 0;
}

/* --- form fields ---------------------------------------------------------- */
.cc-full {
  width: 100%;
}

.cc-break {
  overflow-wrap: anywhere;
}

.cc-label {
  display: block;
}

.cc-field {
  margin-top: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  color: #273442;
  border: 1px solid rgba(7, 59, 115, 0.22);
  border-radius: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}

.cc-field::placeholder {
  color: #8494a5;
}

.cc-field:focus-visible {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.28);
}

.cc-field-tall {
  min-height: 8rem;
  padding-top: 0.875rem;
  resize: vertical;
}

/* native select needs its own arrow since appearance is stripped */
select.cc-field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23073B73' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
}

/* --- RingRobin embedded form ----------------------------------------------
 * The widget injects its own markup with default blue styling. These rules
 * bring it in line with the site's navy/gold system. Scoped under
 * .rr-form-embed so nothing else on the page is affected, and written to
 * survive the widget's own class names changing: selectors target element
 * types inside the container rather than RingRobin's generated classes.
 */
.rr-form-embed input[type="text"],
.rr-form-embed input[type="email"],
.rr-form-embed input[type="tel"],
.rr-form-embed select,
.rr-form-embed textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  color: #273442;
  border: 1px solid rgba(7, 59, 115, 0.22);
  border-radius: 0.5rem;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.rr-form-embed textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.rr-form-embed input:focus-visible,
.rr-form-embed select:focus-visible,
.rr-form-embed textarea:focus-visible {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.28);
}

.rr-form-embed label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #073b73;
}

/* Submit button: match the site's gold CTA rather than RingRobin's blue.
 *
 * The widget writes its colours INLINE from a `primaryColor` value held in the
 * form's own RingRobin styling config (defaulting to #3b82f6), and an inline
 * style beats an ordinary stylesheet rule. `!important` is therefore required
 * here, and is the narrowest fix available from the page side. The alternative
 * is changing primaryColor inside the RingRobin dashboard, which would be
 * cleaner but is not under this repo's control.
 */
.rr-form-embed button,
.rr-form-embed input[type="submit"] {
  width: 100% !important;
  flex: 1 1 100% !important;
  min-height: 3rem;
  margin-top: 0.5rem;
  padding: 0.875rem 1.5rem !important;
  background: #ffd700 !important;
  background-color: #ffd700 !important;
  color: #05294d !important;
  border: 0 !important;
  border-radius: 0.75rem !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 12px 28px -14px rgba(5, 41, 77, 0.42),
              0 5px 12px -8px rgba(255, 215, 0, 0.45);
}

/* The back button in a multi-step form stays secondary. */
.rr-form-embed button.rr-prev {
  background: #e1eeff !important;
  background-color: #e1eeff !important;
  color: #073b73 !important;
  box-shadow: none;
}

.rr-form-embed button:hover,
.rr-form-embed input[type="submit"]:hover {
  background-color: #e6c200 !important;
  transform: translateY(-2px);
}

.rr-form-embed button.rr-prev:hover {
  background-color: #cfe2fc !important;
}

.rr-form-embed button:focus-visible,
.rr-form-embed input[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.4);
}

/* --- FAQ disclosure ------------------------------------------------------- */
.cc-faq summary::-webkit-details-marker {
  display: none;
}

.cc-faq summary {
  position: relative;
  padding-right: 2rem;
}

.cc-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  color: #007bff;
}

.cc-faq[open] summary::after {
  content: "\2212"; /* minus */
}
