/* modules/custom/mm_guitaroscope2/css/guitaroscope-classic.css
 * The Almanac as an embedded block inside the MacMarr theme.
 * No body-level overrides: the site header/footer stay visible.
 */

/* Whole-node parchment backdrop (title + card sit on it) */
.g2-almanac {
  background-color: #e9d5ae; /* fallback tone */
  background-image: url('/modules/custom/mm_guitaroscope2/images/parchment-bg.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;

  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 2rem;
}

/* Title on the parchment */
.g2-almanac .title h1.g2-title {
  font-family: "IM Fell DW Pica", serif;
  color: #1a1a1a;
}

.g2-almanac .title .subtitle {
  color: #4a3f30;
}

/* Inner horoscope card — solid colour */
.g2-page {
  max-width: 860px;
  margin: 1.5rem auto 0.5rem;
  padding: 2rem;

  background-color: rgba(245, 230, 200, 0.97); /* warm tan, solid */

  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  color: #2a221a;
  font-family: "Crimson Pro", serif;
}

/* Section headers inside the card */
.g2-stars h2,
.g2-horoscope h2,
.g2-birthday h2 {
  font-family: "IM Fell DW Pica", serif;
  font-size: 26px;
  margin: 18px 0 8px;
  text-align: center;
  color: #2a221a;
}

.g2-stars p {
  margin: 0 0 14px;
  font-style: italic;
}

/* Sign rows: image | label | text */
.g2-signs-grid { margin-top: 8px; }

.g2-sign {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.12);
}

.g2-sign:last-child { border-bottom: none; }

.g2-sign-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 56px;
  margin-top: 2px;
}

.g2-sign-label {
  flex: 0 0 auto;           /* size to the name — never break mid-word */
  min-width: 120px;         /* keep a common column for the short names */
  white-space: nowrap;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  color: #2a221a;
}

.g2-sign-text {
  flex: 1 1 auto;
  margin: 0;
  line-height: 1.55;
}

/* Birthday block */
.g2-birthday { margin-top: 22px; }
.g2-birthday p { margin: 0 0 6px; }
.g2-guitar-suggestion { margin: 6px 0 0; font-style: italic; }

/* Embedded signup form (one checkbox: "Get the Guitaroscope every Monday") */
.g2-signup {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  font-size: 1rem;
}

.g2-signup .form-item { margin: 10px 0; }

.g2-signup input[type="email"],
.g2-signup input[type="text"] {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
}

.g2-signup label { font-weight: 600; color: #2a221a; }
.g2-signup .form-checkbox { accent-color: #6b4f1d; }

.g2-signup fieldset { border: none; margin: 12px 0; padding: 0; }
.g2-signup fieldset legend { font-weight: 700; padding: 0; }

.g2-signup .form-submit,
.g2-signup button {
  font: inherit;
  font-weight: 600;
  padding: 8px 22px;
  background: #6b4f1d;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.g2-signup .form-submit:hover,
.g2-signup button:hover { background: #2a221a; }

.g2-signup .description,
.g2-signup .form-item__description { font-size: 0.9rem; color: #4a3f30; }
.g2-signup .messages { margin-top: 10px; }

/* Responsive tweak */
@media (max-width: 640px) {
  .g2-page { padding: 1.25rem; }
  .g2-sign { flex-wrap: wrap; }
  .g2-sign-label { flex: 0 0 100%; margin-top: 6px; }
  .g2-sign-text { flex-basis: 100%; }
  .g2-sign-actions { flex-direction: row; flex-basis: 100%; justify-content: flex-end; }
}

/* --- Find your sign --- */
.g2-finder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 18px;
}

.g2-finder-label { font-weight: 600; color: #2a221a; }

.g2-finder-select,
.g2-finder-select:disabled {
  font-family: inherit;
  font-size: 1rem;
  padding: 4px 8px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  opacity: 1;
  -webkit-text-fill-color: #1a1a1a; /* stop Safari greying out the disabled state */
}

.g2-finder-result { font-style: italic; color: #4a3f30; }

/* --- Per-sign share / copy --- */
.g2-sign {
  scroll-margin-top: 96px; /* clears the sticky site header when anchored */
}

.g2-sign-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  position: relative;
}

/* Share-target dropdown (desktop fallback for the native share sheet) */
.g2-share-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  padding: 6px;
  background: #fffdf5;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  z-index: 20;
}

.g2-share-menu.g2-open { display: flex; }

.g2-sign-actions .g2-share-menu a,
.g2-sign-actions .g2-share-menu button {
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #2a221a;
  text-decoration: none;
  cursor: pointer;
}

.g2-sign-actions .g2-share-menu a:hover,
.g2-sign-actions .g2-share-menu button:hover { background: rgba(122, 92, 46, 0.12); }

.g2-sign-actions button {
  font: inherit;
  font-size: 0.85rem;
  padding: 3px 10px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
  color: #2a221a;
  cursor: pointer;
}

.g2-sign-actions button:hover { background: #ffffff; }

/* --- Highlight for the remembered / selected sign --- */
.g2-sign.g2-active {
  background: rgba(255, 249, 220, 0.85);
  box-shadow: 0 0 0 2px rgba(122, 92, 46, 0.35) inset;
  border-radius: 8px;
  transition: background 0.4s ease;
}
