/* =====================================================================
   My Allegro Studio: the home page, family pages, feedback and studio info.
   Loaded after allegro-site.css (fonts, colours, header, footer) on those pages only.
   ===================================================================== */

body:has(.al-site) { background: var(--al-cream); color: var(--al-ink); font-family: var(--al-body); font-size: 17px; line-height: 1.6; }
.al-site { min-height: 100vh; display: flex; flex-direction: column; }
.my-main { flex: 1; padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 6vw, 80px); }
.my-wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--al-gutter); }
.my-narrow { max-width: 640px; }
.my-stack { display: flex; flex-direction: column; gap: 22px; }
.my-stack-s { display: flex; flex-direction: column; gap: 10px; }
.my-gap-l { gap: clamp(32px, 4vw, 52px); }

.my-main h1, .my-main h2, .my-main h3 { font-family: var(--al-heading); font-weight: 600; color: var(--al-black); margin: 0; }
.my-main h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.05; }
.my-main h1 span, .my-main h2 span { color: var(--al-wine); }
.my-main h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; }
.my-main h3 { font-size: 22px; line-height: 1.2; }
.my-main p { margin: 0; }
.my-main a:not(.al-btn) { color: var(--al-wine); text-underline-offset: 3px; }  /* buttons keep their own text colour */
.my-main .al-eyebrow { margin: 0; }
.my-muted { color: var(--al-text); }
.my-small { font-size: 15px; }
.my-center { text-align: center; }

/* Buttons (on top of .al-btn) */
.my-main .al-btn { color: var(--al-white); }
.my-main .al-btn--outline { color: var(--al-wine); }
.my-main .al-btn--gold { color: var(--al-black); }
.my-btn-sm { min-height: 46px; padding: 10px 18px; font-size: 16px; }
.my-btn-block { width: 100%; }
.my-btn-ink { background: transparent; border-color: var(--al-ink); color: var(--al-ink) !important; }
.my-btn-ink:hover { background: var(--al-ink); color: var(--al-white) !important; }
.my-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--al-wine); text-decoration: underline; cursor: pointer; min-height: 44px; }
.my-inline-icon { display: inline-flex; align-items: center; gap: 8px; }

/* Signed-in strip under the site header */
.my-bar { background: var(--al-sand); border-bottom: 1px solid var(--al-line); font-size: 15px; }
.my-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; min-height: 48px; }
.my-bar-home { font-weight: 700; color: var(--al-wine); text-decoration: none; }
.my-bar-who { color: var(--al-text); overflow-wrap: anywhere; flex: 1 1 auto; }
.my-bar-out { min-height: 36px; padding: 0 16px; border: 2px solid var(--al-wine); border-radius: 999px; background: transparent;
  color: var(--al-wine); font: 700 15px var(--al-body); cursor: pointer; }
.my-bar-out:hover { background: var(--al-wine); color: var(--al-white); }

/* Cards */
.my-card { background: var(--al-white); border: 1px solid var(--al-line); padding: clamp(18px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.my-card.is-top-wine { border-top: 4px solid var(--al-wine); }
.my-card.is-top-gold { border-top: 4px solid var(--al-gold); }
.my-card.is-top-ink { border-top: 4px solid var(--al-ink); }
.my-wine { background: var(--al-wine); color: var(--al-white); padding: clamp(18px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 12px; }
.my-wine h2, .my-wine h3 { color: var(--al-white) !important; }
.my-wine p, .my-wine .my-label { color: var(--al-cream); }
.my-main .my-wine a:not(.al-btn) { color: var(--al-gold-light); }

/* Three doors */
.my-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.my-door { gap: 14px; }
.my-door .al-btn { margin-top: auto; align-self: flex-start; }
.my-icon-dot { width: 48px; height: 48px; border-radius: 50%; background: var(--al-cream); color: var(--al-wine); display: flex; align-items: center; justify-content: center; flex: none; }

/* Quick links */
.my-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.my-quick a { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--al-cream); color: var(--al-ink) !important; text-decoration: none; min-height: 76px; }
.my-quick a:hover { background: var(--al-sand); }
.my-quick strong, .my-tiles strong, .my-rows strong { display: block; font-size: 17px; color: var(--al-black); }
.my-quick svg, .my-tiles svg, .my-rows svg { color: var(--al-wine); flex: none; }
.my-sub { display: block; font-size: 14px; line-height: 1.45; color: var(--al-text); }

.my-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.my-tiles a { background: var(--al-white); border: 1px solid var(--al-line); padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--al-ink) !important; text-decoration: none; min-height: 112px; }
.my-tiles a:hover { border-color: var(--al-gold); }

.my-rows { background: var(--al-white); border: 1px solid var(--al-line); display: flex; flex-direction: column; }
.my-rows > * { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--al-line); color: var(--al-ink) !important; text-decoration: none; min-height: 44px; }
.my-rows > *:last-child { border-bottom: 0; }
.my-rows > a:hover { background: var(--al-cream); }
.my-rows .my-grow { flex: 1; min-width: 0; }
.my-rows .my-chev { color: var(--al-text); }

.my-split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.my-split > div { flex: 1 1 420px; }
.my-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }

/* Wi-Fi */
.my-wifi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.my-label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.my-wifi-grid strong { font-size: 18px; overflow-wrap: anywhere; }
.my-copy { min-height: 46px; border: 0; background: var(--al-gold); color: var(--al-black); font: 700 16px var(--al-body); border-radius: 2px; cursor: pointer; padding: 0 18px; }
.my-copy:hover { background: var(--al-gold-light); }

/* Progress */
.my-progress { height: 10px; background: rgba(255, 255, 255, .22); border-radius: 5px; overflow: hidden; }
.my-progress > span { display: block; height: 100%; background: var(--al-gold); border-radius: 5px; }
.my-progress.is-light { background: var(--al-sand); }
.my-progress.is-light > span { background: var(--al-wine); }
.my-main a.my-wine { text-decoration: none; }

/* Lessons */
.my-lessons { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.my-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.my-facts dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--al-text); }
.my-facts dd { margin: 0; font-weight: 600; color: var(--al-black); }
.my-tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--al-gold-deep); background: var(--al-cream); padding: 3px 10px; border-radius: 12px; }

/* News */
.my-date { flex: 0 0 54px; height: 58px; background: var(--al-cream); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.my-date small { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--al-wine); text-transform: uppercase; }
.my-date b { font-family: var(--al-heading); font-size: 26px; line-height: 1; color: var(--al-black); }

/* Checklist */
.my-check { background: var(--al-white); border: 1px solid var(--al-line); display: flex; flex-direction: column; }
.my-check li { list-style: none; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px 14px 10px; border-bottom: 1px solid var(--al-line); }
.my-check li:last-child { border-bottom: 0; }
.my-check ul { margin: 0; padding: 0; }
.my-box { flex: 0 0 44px; width: 44px; height: 44px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.my-box[disabled] { cursor: default; }
.my-box > span { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--al-text); background: var(--al-white); display: flex; align-items: center; justify-content: center; color: var(--al-white); }
.my-box.is-done > span { background: var(--al-wine); border-color: var(--al-wine); }
.my-box.is-auto > span { background: var(--al-gold-deep); border-color: var(--al-gold-deep); }
.my-check-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 9px; }
.my-check-body strong { font-size: 17px; color: var(--al-black); }
.my-check li.is-done .my-check-body strong { color: var(--al-text); text-decoration: line-through; text-decoration-color: var(--al-grey); }
.my-check-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 15px; }
.my-check-meta a { font-weight: 600; }

/* Forms */
.my-form { display: flex; flex-direction: column; gap: 22px; }
.my-field { display: flex; flex-direction: column; gap: 8px; }
.my-field > label, .my-legend { font-size: 16px; font-weight: 700; color: var(--al-black); padding: 0; }
.my-input, .my-textarea, .my-select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--al-grey); background: var(--al-white); font: 400 17px var(--al-body); color: var(--al-black); border-radius: 2px; }
.my-textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; min-height: 130px; }
.my-input:focus, .my-textarea:focus, .my-select:focus { outline: 3px solid var(--al-gold-light); outline-offset: 1px; border-color: var(--al-wine); }
fieldset.my-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.my-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.my-chip { position: relative; }
.my-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.my-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--al-grey); background: var(--al-white); color: var(--al-ink); font-weight: 600; font-size: 16px; border-radius: 22px; cursor: pointer; }
.my-chip input:checked + span { background: var(--al-wine); border-color: var(--al-wine); color: var(--al-white); }
.my-chip input:focus-visible + span { outline: 3px solid var(--al-gold-light); outline-offset: 2px; }
.my-rating { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 460px; }
.my-rating .my-chip span { width: 100%; min-height: 64px; border-radius: 2px; flex-direction: column; justify-content: center; padding: 6px 2px; gap: 2px; }
.my-rating b { font-size: 20px; line-height: 1; }
.my-rating small { font-size: 12px; font-weight: 600; }
.my-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.my-err { color: #A23A2C; font-weight: 600; }
.my-ok { background: var(--al-white); border: 1px solid var(--al-line); border-left: 4px solid var(--al-gold); padding: 14px 16px; }

/* Add lessons to your calendar (components/CalendarFeedButtons.js) */
.my-cal-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.my-cal-link { width: 100%; font: 15px var(--al-body); padding: 10px 12px; border: 1px solid var(--al-line); background: var(--al-cream); }
.my-cal-more summary, details.my-cal-card > summary { cursor: pointer; font-weight: 600; color: var(--al-wine); min-height: 44px; display: flex; align-items: center; }
details.my-cal-card > summary { list-style: none; justify-content: space-between; gap: 12px; }
details.my-cal-card > summary::-webkit-details-marker { display: none; }
details.my-cal-card > summary::after { content: "+"; font-size: 24px; line-height: 1; }
details.my-cal-card[open] > summary::after { content: "–"; }

@media (max-width: 640px) {
  .my-main { padding-top: 24px; }
  .my-main .al-btn { width: 100%; }
  .my-door .al-btn { align-self: stretch; }
}

/* Maintenance notice (Settings › Maintenance) above every My Allegro Studio page */
.my-maint { background: var(--al-wine); color: var(--al-white); font-size: 15px; padding: 12px 0; }
.my-maint strong { color: var(--al-gold); }

/* Admin › View as: the preview strip on family pages */
.my-preview { background: var(--al-wine); color: var(--al-white); font-size: 15px; }
.my-preview .my-bar-who { color: var(--al-white); }
.my-preview .my-bar-out { border-color: var(--al-gold); color: var(--al-gold); }
.my-preview .my-bar-out:hover { background: var(--al-gold); color: var(--al-black); }
.my-main .my-preview-link, .my-preview-link { color: var(--al-gold-light); font-weight: 600; }
