/*
  Physic Moon Theme CSS
  File: themes/custom/physicmoon_theme/css/theme.css

  Purpose:
  - Global body styling
  - Drupal page wrapper styling
  - Default typography
  - Admin-safe layout corrections
  - Footer/header safety
  - Mobile-first base
*/

:root {
  --pm-theme-ink: #151326;
  --pm-theme-night: #20183a;
  --pm-theme-violet: #5a478c;
  --pm-theme-lavender: #efeaf8;
  --pm-theme-moon: #f6e7b4;
  --pm-theme-cream: #fffaf0;
  --pm-theme-soft: #f8f5ee;
  --pm-theme-text: #272333;
  --pm-theme-muted: #6b6478;
  --pm-theme-border: rgba(90, 71, 140, 0.18);
  --pm-theme-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(246, 231, 180, 0.22), transparent 34rem),
    linear-gradient(180deg, var(--pm-theme-cream) 0%, #ffffff 48%, var(--pm-theme-soft) 100%);
  color: var(--pm-theme-text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

a {
  color: var(--pm-theme-violet);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--pm-theme-night);
}

img {
  max-width: 100%;
  height: auto;
}

.layout-container,
.dialog-off-canvas-main-canvas {
  min-height: 100vh;
}

/*
  Drupal local tasks/admin tabs.
  Keep tabs usable without disrupting public design.
*/
nav.tabs,
.tabs-wrapper {
  width: min(100% - 2rem, var(--pm-theme-max));
  margin: 1rem auto;
  font-family: Arial, Helvetica, sans-serif;
}

/*
  System messages.
*/
.messages {
  width: min(100% - 2rem, var(--pm-theme-max));
  margin: 1rem auto;
  border-radius: 14px;
}

/*
  Default content safety.
  Custom module pages use .pm-site and manage their own layout.
*/
main,
.main-content {
  min-height: 40vh;
}

/*
  Form defaults.
*/
input,
textarea,
select,
button {
  font: inherit;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--pm-theme-border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  color: var(--pm-theme-text);
}

textarea {
  min-height: 140px;
}

button,
input[type="submit"],
.button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.18rem;
  background: var(--pm-theme-violet);
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
.button:hover,
.button:focus,
a.button:hover,
a.button:focus {
  background: var(--pm-theme-night);
  color: var(--pm-theme-moon);
}

/*
  Generic Drupal rendered content.
*/
.node,
.block,
.view {
  max-width: 100%;
}

/*
  Mobile-first admin/public safety.
*/
@media (max-width: 719px) {
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  iframe {
    max-width: 100%;
  }
}

/*
  12. Single global theme footer
  The module pages do not render their own footer.
  The theme footer is the only public footer.
*/
.pm-theme-footer {
  background: #151326;
  color: rgba(255, 255, 255, 0.82);
  padding: 2rem 0;
  margin-top: 0;
}

.pm-theme-footer-inner {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
  display: grid;
  gap: 0.45rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
}

.pm-theme-footer-inner div:first-child {
  color: #ffffff;
  font-weight: 700;
}

@media (min-width: 720px) {
  .pm-theme-footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* ===== Physic Moon CMS-to-core design sync ===== */

.pmc-site--cms .pmc-logo-mark {
  width: auto;
  height: auto;
  background: transparent;
  box-shadow: none;
}

.pmc-site--cms .pmc-logo-mark img {
  display: block;
  width: auto;
  height: 52px;
  max-width: 260px;
}

.pmc-site--cms .pmc-logo {
  text-decoration: none;
}

.pmc-site--cms .pmc-feature-grid-output ul {
  display: contents;
}

.pmc-site--cms .pmc-feature-grid-output li {
  list-style: none;
  display: block;
  padding: 1.3rem;
  border: 1px solid rgba(214, 178, 94, 0.24);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(214, 178, 94, 0.13), transparent 16rem),
    rgba(255, 248, 234, 0.07);
  color: rgba(255, 248, 234, 0.82);
}

.pmc-site--cms .pmc-feature-grid-output li strong,
.pmc-site--cms .pmc-feature-grid-output li b {
  display: block;
  color: #fff8ea;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.pmc-site--cms .pmc-rich-text p:last-child,
.pmc-site--cms .pmc-section-head p:last-child {
  margin-bottom: 0;
}

.pmc-site--cms .pmc-small {
  font-size: 0.92rem;
  opacity: 0.78;
}

@media (max-width: 820px) {
  .pmc-site--cms .pmc-logo-mark img {
    height: 42px;
    max-width: 220px;
  }
}

/* ===== Final CMS Home readability cleanup ===== */

.pmc-site--cms .pmc-section-soft .pmc-feature-grid-output li {
  color: #24142f;
  background:
    radial-gradient(circle at top right, rgba(214, 178, 94, 0.14), transparent 14rem),
    rgba(255, 255, 255, 0.78);
  border-color: rgba(61, 35, 80, 0.14);
  box-shadow: 0 18px 50px rgba(38, 20, 60, 0.08);
}

.pmc-site--cms .pmc-section-soft .pmc-feature-grid-output li strong,
.pmc-site--cms .pmc-section-soft .pmc-feature-grid-output li b {
  color: #2b1738;
}

.pmc-site--cms .pmc-section-soft .pmc-feature-grid-output li p,
.pmc-site--cms .pmc-section-soft .pmc-feature-grid-output li span {
  color: #24142f;
}

.pmc-site--cms .pmc-section-soft .pmc-section-head h2 {
  max-width: 820px;
}

.pmc-site--cms .pmc-section-soft .pmc-section-head {
  margin-bottom: 2rem;
}

/* Keep CMS home from showing repeated hero-style sections too close together. */
.pmc-site--cms .pmc-section + .pmc-section-soft,
.pmc-site--cms .pmc-section-soft + .pmc-section {
  margin-top: 0;
}

/* ===== Physic Moon Webform styling ===== */

.path-webform,
.path-form,
body:has(.webform-submission-physic-moon-contact-form),
body:has(#webform-submission-physic-moon-contact-add-form) {
  background:
    radial-gradient(circle at 15% 12%, rgba(214, 178, 94, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(151, 98, 255, 0.18), transparent 30rem),
    linear-gradient(135deg, #160b2c, #26104a 55%, #120821);
}

.webform-submission-physic-moon-contact-form,
#webform-submission-physic-moon-contact-add-form {
  width: min(100%, 760px);
  margin: 3rem auto 4rem;
  padding: clamp(1.35rem, 4vw, 2.5rem);
  color: #fff8ea;
  border: 1px solid rgba(214, 178, 94, 0.28);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(214, 178, 94, 0.14), transparent 18rem),
    rgba(255, 248, 234, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.webform-submission-physic-moon-contact-form::before,
#webform-submission-physic-moon-contact-add-form::before {
  content: "Physic Moon Contact";
  display: block;
  margin-bottom: 0.65rem;
  color: #d6b25e;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.webform-submission-physic-moon-contact-form .form-item,
#webform-submission-physic-moon-contact-add-form .form-item {
  margin-bottom: 1.15rem;
}

.webform-submission-physic-moon-contact-form label,
#webform-submission-physic-moon-contact-add-form label {
  display: block;
  margin-bottom: 0.45rem;
  color: #fff8ea;
  font-weight: 800;
}

.webform-submission-physic-moon-contact-form .form-required::after,
#webform-submission-physic-moon-contact-add-form .form-required::after {
  color: #d6b25e;
}

.webform-submission-physic-moon-contact-form input[type="text"],
.webform-submission-physic-moon-contact-form input[type="email"],
.webform-submission-physic-moon-contact-form select,
.webform-submission-physic-moon-contact-form textarea,
#webform-submission-physic-moon-contact-add-form input[type="text"],
#webform-submission-physic-moon-contact-add-form input[type="email"],
#webform-submission-physic-moon-contact-add-form select,
#webform-submission-physic-moon-contact-add-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 0.95rem;
  color: #24142f;
  border: 1px solid rgba(214, 178, 94, 0.35);
  border-radius: 0.9rem;
  background: rgba(255, 248, 234, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.webform-submission-physic-moon-contact-form textarea,
#webform-submission-physic-moon-contact-add-form textarea {
  min-height: 160px;
  resize: vertical;
}

.webform-submission-physic-moon-contact-form input:focus,
.webform-submission-physic-moon-contact-form select:focus,
.webform-submission-physic-moon-contact-form textarea:focus,
#webform-submission-physic-moon-contact-add-form input:focus,
#webform-submission-physic-moon-contact-add-form select:focus,
#webform-submission-physic-moon-contact-add-form textarea:focus {
  outline: 3px solid rgba(214, 178, 94, 0.35);
  border-color: #d6b25e;
}

.webform-submission-physic-moon-contact-form .description,
#webform-submission-physic-moon-contact-add-form .description {
  margin-top: 0.35rem;
  color: rgba(255, 248, 234, 0.72);
  font-size: 0.9rem;
}

.webform-submission-physic-moon-contact-form .form-actions,
#webform-submission-physic-moon-contact-add-form .form-actions {
  margin-top: 1.5rem;
}

.webform-submission-physic-moon-contact-form .form-submit,
#webform-submission-physic-moon-contact-add-form .form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.88rem 1.35rem;
  color: #160b2c;
  font-weight: 900;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d6b25e, #f7df9c);
  box-shadow: 0 18px 40px rgba(214, 178, 94, 0.22);
  cursor: pointer;
}

.webform-submission-physic-moon-contact-form .form-submit:hover,
.webform-submission-physic-moon-contact-form .form-submit:focus-visible,
#webform-submission-physic-moon-contact-add-form .form-submit:hover,
#webform-submission-physic-moon-contact-add-form .form-submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(214, 178, 94, 0.3);
}

.webform-confirmation {
  width: min(100%, 760px);
  margin: 3rem auto 4rem;
  padding: 2rem;
  color: #fff8ea;
  border: 1px solid rgba(214, 178, 94, 0.28);
  border-radius: 1.5rem;
  background: rgba(255, 248, 234, 0.08);
}

@media (max-width: 820px) {
  .webform-submission-physic-moon-contact-form,
  #webform-submission-physic-moon-contact-add-form,
  .webform-confirmation {
    margin: 1.5rem auto 3rem;
    border-radius: 1.1rem;
  }

  .webform-submission-physic-moon-contact-form .form-submit,
  #webform-submission-physic-moon-contact-add-form .form-submit {
    width: 100%;
  }
}
