/* INC020 · The Shared Experience
 * Source of truth for partner conversations, notification inbox, Dream Studio,
 * and compact plan controls. Scoped to Couple's Passport only.
 */
#mgps-app .cp-activity-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
#mgps-app .cp-activity-bell svg{height:21px;width:21px;stroke:#E9B75F}
#mgps-app .cp-unread-count{position:absolute;top:-7px;right:-9px;min-width:22px;height:22px;padding:0 5px;display:grid;place-items:center;background:#E9B75F;color:#11100F;font:bold 11px/1 system-ui,sans-serif;border:2px solid #11100F;border-radius:50%}
#mgps-app .cp-plan-filterbar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:14px 22px;align-items:end;margin-top:clamp(18px,3vw,38px)}
#mgps-app .cp-plan-selectors{display:flex;flex-wrap:wrap;gap:12px;min-width:0}
#mgps-app .cp-plan-selectors label{display:flex;flex-direction:column;gap:6px;min-width:155px;color:#F7E6CF;font-size:12px;font-weight:650}
#mgps-app .cp-plan-selectors select{width:100%;padding:11px 35px 11px 14px;min-height:46px;appearance:auto;border:1px solid #AD766A;border-radius:12px;background:#292320;color:#FFF3E3;font:600 14px/1.3 system-ui,sans-serif;}
#mgps-app .cp-plan-filterbar .cp-ia-search-label{min-width:min(100%,250px);max-width:420px;flex:1 1 240px}
#mgps-app .cp-plan-filterbar .cp-ia-search-label input{min-height:46px;border-radius:12px}
#mgps-app .cp-ia-context-actions>div{gap:6px 20px}
#mgps-app .cp-ia-context-actions>div .cp-button{background:transparent!important;border:0!important;border-bottom:1px solid #8B5C52!important;border-radius:2px!important;padding:9px 0!important;min-height:40px;color:#F7E6CF!important;font-weight:600}
#mgps-app .cp-ia-context-actions>div .cp-button:hover{color:#E9B75F!important;border-color:#E9B75F!important}
#mgps-app .cp-ia-plan-actions{align-items:center;gap:12px;flex-wrap:wrap}
#mgps-app .cp-shared-room{margin:28px 0 42px;max-width:100%}
#mgps-app .cp-shared-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:23px}
#mgps-app .cp-shared-heading h2{font-family:Georgia,serif;font-size:clamp(29px,4vw,44px);color:#FFF3E3;line-height:1.1;margin:6px 0 9px}
#mgps-app .cp-shared-heading p{color:#F7E6CF;margin:0;max-width:660px}
#mgps-app .cp-shared-ideas{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:clamp(14px,2vw,24px)}
#mgps-app .cp-shared-idea{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:245px;padding:clamp(22px,2.5vw,36px);border:1px solid #795349;border-radius:27px 27px 27px 11px;background:radial-gradient(ellipse at 100% 0%,rgba(229,106,99,.12),transparent 70%),#201D1B}
#mgps-app .cp-shared-idea::before{content:"";width:47px;height:2px;display:block;margin-bottom:22px;background:#E56A63;transform:rotate(-5deg)}
#mgps-app .cp-shared-idea h3{font:normal clamp(27px,3vw,38px)/1.1 Georgia,serif;color:#FFF3E3!important;margin:12px 0}
#mgps-app .cp-shared-idea p{color:#F7E6CF;font-size:14px;line-height:1.65;margin:0 0 24px;overflow-wrap:anywhere;white-space:pre-line}
#mgps-app .cp-shared-idea-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:auto}
#mgps-app .cp-shared-empty{padding:clamp(22px,3.5vw,42px);background:linear-gradient(135deg,#2a2220,#191615);border:1px solid #86574d;border-radius:28px 28px 28px 12px;max-width:100%;color:#F7E6CF}
#mgps-app .cp-shared-empty h2,#mgps-app .cp-shared-empty h3{font:normal clamp(25px,3vw,35px)/1.1 Georgia,serif;color:#FFF3E3!important;max-width:650px}
#mgps-app .cp-shared-empty p{max-width:640px;color:#F7E6CF}
#mgps-app .cp-partner-inbox{display:grid;gap:10px;margin:24px 0 50px}
#mgps-app .cp-partner-notification{display:flex;align-items:center;gap:18px;min-width:0;padding:19px 24px;background:#201D1B;border:1px solid #735047;border-radius:19px}
#mgps-app .cp-partner-notification.is-unread{border-left:4px solid #E9B75F;background:#292220}
#mgps-app .cp-notification-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border:1px solid #94695D;border-radius:14px;color:#E9B75F}
#mgps-app .cp-notification-icon svg{width:21px;height:21px}
#mgps-app .cp-notification-body{flex:1;min-width:0}
#mgps-app .cp-notification-body h2{font:normal clamp(19px,2.2vw,25px)/1.2 Georgia,serif;color:#FFF3E3!important;margin:6px 0}
#mgps-app .cp-notification-body p{font-size:13px;color:#F7E6CF;margin:2px 0}
#mgps-app .cp-conversation{max-width:920px;margin:12px auto 60px;padding:clamp(18px,3vw,40px);border-radius:28px;background:#201D1B;border:1px solid #81584D;color:#FFF3E3}
#mgps-app .cp-conversation-head h1{font:normal clamp(34px,5vw,56px)/1.05 Georgia,serif;color:#FFF3E3!important;margin:14px 0 10px}
#mgps-app .cp-conversation-head p{color:#F7E6CF;font-size:14px;margin:0 0 18px}
#mgps-app .cp-message-timeline{display:flex;flex-direction:column;gap:18px;min-height:170px;padding:22px 0;border-top:1px solid #795047;border-bottom:1px solid #795047}
#mgps-app .cp-message{max-width:min(85%,600px);min-width:0;padding:16px 22px 13px;border:1px solid #846155;border-radius:22px 22px 22px 7px;background:#2b2421;color:#FFF3E3}
#mgps-app .cp-message.mine{align-self:flex-end;border-color:#E9B75F;background:#3a2c20;border-radius:22px 22px 7px 22px}
#mgps-app .cp-message-author{display:block;color:#E9B75F;font-weight:700;font-size:12px;margin-bottom:8px}
#mgps-app .cp-message p{color:#FFF3E3;font-size:15px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 9px}
#mgps-app .cp-message time{display:block;color:#F7E6CF;font-size:11px;text-align:right}
#mgps-app .cp-message-empty{padding:30px 12px;text-align:center;color:#F7E6CF}
#mgps-app .cp-message-empty h2{color:#FFF3E3!important;font:normal 27px/1.12 Georgia,serif}
#mgps-app .cp-message-compose{display:grid;gap:11px;margin-top:25px}
#mgps-app .cp-message-compose label{font-weight:650;color:#FFF3E3}
#mgps-app .cp-message-compose textarea{background:#292320;color:#FFF3E3;border:1px solid #AD766A;border-radius:14px;padding:14px;min-height:100px;resize:vertical;width:100%;font:inherit}
#mgps-app .cp-message-compose textarea::placeholder{color:#EBD8C8}
#mgps-app .cp-compose-foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;color:#F7E6CF}
#mgps-app .cp-compose-foot small{font-size:12px;max-width:440px}
#mgps-app .cp-dream-studio{position:relative;isolation:isolate;width:min(670px,100%);background:#201D1B!important;overflow:auto}
#mgps-app .cp-dream-studio .cp-dream-spark{position:absolute;top:78px;right:28px;font-size:clamp(45px,7vw,80px);color:#E9B75F;opacity:.26;pointer-events:none;z-index:-1}
#mgps-app .cp-dream-studio h2{font:normal clamp(38px,5vw,58px)/1.04 Georgia,serif;color:#FFF3E3!important;max-width:480px;margin:15px 0}
#mgps-app .cp-dream-studio>p{font-size:15px;line-height:1.65;max-width:510px;color:#F7E6CF!important}
#mgps-app .cp-dream-studio #cp-form>.cp-form-label:first-child{margin-top:22px;font-size:14px}
#mgps-app .cp-dream-studio #cp-form>.cp-form-label:first-child input{min-height:57px!important;font:normal 20px Georgia,serif!important;border-color:#D6A75D!important;border-radius:15px;padding:15px 18px}
#mgps-app .cp-dream-details{margin:20px 0;border-top:1px solid #795047;border-bottom:1px solid #795047;padding:12px 0}
#mgps-app .cp-dream-details summary{cursor:pointer;min-height:44px;display:flex;justify-content:space-between;align-items:center;color:#F7E6CF;font-weight:650;list-style:none}
#mgps-app .cp-dream-details summary::-webkit-details-marker{display:none}
#mgps-app .cp-dream-details[open] summary{color:#E9B75F}
#mgps-app .cp-dream-details textarea{min-height:110px}
#mgps-app :is(.cp-dream-details summary,.cp-activity-bell,.cp-partner-inbox button,.cp-message-compose button,.cp-plan-selectors select):focus-visible{outline:3px solid #E9B75F!important;outline-offset:3px!important}
@media(max-width:700px){
 #mgps-app .cp-plan-filterbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 #mgps-app .cp-plan-selectors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 #mgps-app .cp-plan-selectors label{min-width:0}
 #mgps-app .cp-plan-filterbar .cp-ia-search-label{min-width:0;width:100%;max-width:none}
 #mgps-app .cp-partner-notification{padding:16px;gap:10px;flex-wrap:wrap}
 #mgps-app .cp-partner-notification>.cp-button{margin-left:auto}
 #mgps-app .cp-notification-icon{flex-basis:32px;width:32px;height:32px}
 #mgps-app .cp-message{max-width:94%}
 #mgps-app .cp-conversation{padding:20px 14px;border-radius:21px}
 #mgps-app .cp-shared-idea{min-height:190px}
 #mgps-app .cp-shared-room{margin-bottom:26px}
}
@media(max-width:350px){
 #mgps-app .cp-activity-bell{min-width:33px!important;width:33px!important}
 #mgps-app .cp-activity-bell svg{width:17px;height:17px}
 #mgps-app .cp-unread-count{top:-6px;right:-7px}
}
@media(prefers-reduced-motion:reduce){#mgps-app .cp-partner-notification,#mgps-app .cp-shared-idea{transition:none!important}}
/* Native popup palettes are explicit; OS defaults must not create light-on-light choices. */
#mgps-app .cp-plan-selectors select option,
#mgps-app .cp-plan-selectors select optgroup{background:#292320!important;color:#FFF3E3!important;}
#mgps-app .cp-booking-details{margin:12px 0 18px;padding:0 14px;border:1px solid #6d5843;border-radius:8px;background:#211914;color:#fff2e2}
#mgps-app .cp-booking-details summary{min-height:44px;padding:11px 0;cursor:pointer;font-weight:650}
#mgps-app .cp-booking-details summary span{float:right;color:#d2b99e;font-size:.8rem;font-weight:400}
#mgps-app .cp-booking-details[open]>div{padding:4px 0 10px}
#mgps-app .cp-booking-details summary:focus-visible{outline:3px solid #f1ba73;outline-offset:4px}

/* Mango Getaway colors and typography. The active theme can provide the tokens. */
:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) {
  --mg-ui-canvas: var(--mg-brand-canvas, #14110e);
  --mg-ui-panel: var(--mg-brand-panel, #211c17);
  --mg-ui-field: var(--mg-brand-field, #2a221b);
  --mg-ui-text: var(--mg-brand-text, #fff5e6);
  --mg-ui-muted: var(--mg-brand-muted, #c8baaa);
  --mg-ui-gold: var(--mg-brand-gold, #f4a641);
  --mg-ui-hover: var(--mg-brand-hover, #ffd394);
  --mg-ui-edge: var(--mg-brand-edge, #a18a71);
  --mg-ui-error: var(--mg-brand-error, #ffb4a5);
  --mg-ui-display: var(--mg-brand-display, "Cormorant Garamond", Georgia, serif);
  --mg-ui-sans: var(--mg-brand-sans, "DM Sans", "Segoe UI", sans-serif);
  color-scheme: dark;
  accent-color: var(--mg-ui-gold);
  font-family: var(--mg-ui-sans) !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is(h1, h2, h3, h4, h5, h6, [role="heading"]):not(:where(.has-text-color, .has-text-color *)) {
  font-family: var(--mg-ui-display) !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is(select, textarea, input:not([type]):not([role="switch"]),
  input:is([type="text"], [type="search"], [type="email"], [type="password"], [type="tel"], [type="url"],
  [type="number"], [type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"])) {
  color-scheme: dark !important;
  background-color: var(--mg-ui-field) !important;
  color: var(--mg-ui-text) !important;
  -webkit-text-fill-color: var(--mg-ui-text) !important;
  border-color: var(--mg-ui-edge) !important;
  font-family: var(--mg-ui-sans);
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list)  select :is(option, optgroup) {
  color-scheme: dark !important;
  background-color: var(--mg-ui-field) !important;
  color: var(--mg-ui-text) !important;
  -webkit-text-fill-color: var(--mg-ui-text) !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list)  select:not([multiple]) {
  appearance: auto !important;
  background-image: none !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list)  select option:checked {
  background-color: var(--mg-ui-gold) !important;
  color: var(--mg-ui-canvas) !important;
  -webkit-text-fill-color: var(--mg-ui-canvas) !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list)  :is(select:disabled, textarea:disabled, input:disabled:not([type="hidden"]),
  select option:disabled, select optgroup:disabled, select optgroup:disabled option) {
  background-color: var(--mg-ui-panel) !important;
  color: var(--mg-ui-muted) !important;
  -webkit-text-fill-color: var(--mg-ui-muted) !important;
  opacity: 1 !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is(input, textarea)::placeholder {
  color: var(--mg-ui-muted) !important;
  -webkit-text-fill-color: var(--mg-ui-muted) !important;
  opacity: 1 !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list)  input:is(:autofill, :-webkit-autofill) {
  -webkit-text-fill-color: var(--mg-ui-text) !important;
  box-shadow: 0 0 0 1000px var(--mg-ui-field) inset !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is(input, textarea, select)[aria-invalid="true"] {
  border-color: var(--mg-ui-error) !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :focus-visible {
  outline: 2px solid var(--mg-ui-gold) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px var(--mg-ui-canvas);
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is(button, [role="button"])[aria-disabled="true"],
:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list)  button:disabled {
  background: var(--mg-ui-panel) !important;
  border-color: var(--mg-ui-edge) !important;
  color: var(--mg-ui-muted) !important;
  -webkit-text-fill-color: var(--mg-ui-muted) !important;
  opacity: 1 !important;
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is(dialog, [role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"], [popover]) {
  color: var(--mg-ui-text);
  background-color: var(--mg-ui-panel);
  border-color: var(--mg-ui-edge);
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list)  dialog::backdrop {
  background: rgb(20 17 14 / 76%);
}

:is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is([role="option"], [role="menuitem"]):is(:hover, :focus-visible, [aria-selected="true"]) {
  color: var(--mg-ui-canvas);
  background-color: var(--mg-ui-gold);
}

@media (forced-colors: active) {
  :is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :is(input, textarea, select, option, optgroup, button, [role="button"]) {
    -webkit-text-fill-color: currentColor !important;
  }

  :is(#mgps-app, .mgps-guest, .mgps-account-link, .mgps-challenge-list) :focus-visible {
    outline-color: Highlight !important;
  }
}

#mgps-app .cp-dialog { background: var(--mg-ui-panel) !important; color: var(--mg-ui-text) !important; border-color: var(--mg-ui-edge) !important; }
#mgps-app .cp-dialog :is(h2,h3), .mgps-guest :is(h1,h2) {
  color: var(--mg-ui-gold) !important; -webkit-text-fill-color: var(--mg-ui-gold) !important;
}
#mgps-app .cp-dialog :is(.cp-form-label, p, summary) { color: var(--mg-ui-text); }
#mgps-app .cp-dialog .cp-dismiss { color: var(--mg-ui-text); background: var(--mg-ui-field); border-color: var(--mg-ui-edge); }
#mgps-app .cp-dialog .cp-booking-details { color: var(--mg-ui-text); background: var(--mg-ui-canvas); }
#mgps-app .cp-dialog .cp-booking-details summary span { color: var(--mg-ui-muted); }
#mgps-app :is(.cp-create-menu,.cp-tool-drawer,.cp-plan-selectors) {
  color: var(--mg-ui-text); background-color: var(--mg-ui-panel); border-color: var(--mg-ui-edge);
}
.mgps-guest { color: var(--mg-ui-text); background-color: var(--mg-ui-canvas); }
.mgps-account-link, .mgps-challenge-list {
  color: var(--mg-ui-text); background: var(--mg-ui-panel);
  padding: 22px; border-radius: 16px; margin-block: 24px;
}
.mgps-account-link :is(h2,label,code), .mgps-challenge-list :is(h2,h3) { color: var(--mg-ui-text); }
.mgps-account-link h2, .mgps-challenge-list :is(h2,h3) { color: var(--mg-ui-gold); }
.mgps-account-link label { display: block; }
.mgps-account-link code { background: var(--mg-ui-field); }
.mgps-account-link button[type="submit"] {
  background: var(--mg-ui-gold); color: var(--mg-ui-canvas); padding: 10px 18px; border-radius: 8px;
}
.mgps-account-link button[type="submit"]:hover { background: var(--mg-ui-hover); }
.mgps-challenge-list article { border-top: 1px solid var(--mg-ui-edge); padding: 16px 0; }
@media (max-width:600px) {
  .mgps-guest { min-height:0; }
  .mgps-guest .mgps-guest-intro { min-height:0;padding:24px 20px 19px; }
  .mgps-guest .mgps-guest-brand { margin-bottom:15px; }
  .mgps-guest .mgps-guest-brand-icon { width:44px;height:44px;flex-basis:44px; }
  .mgps-guest .mgps-guest-brand-logo { width:175px;max-width:calc(100% - 52px);max-height:72px; }
  .mgps-guest .mgps-guest-intro h1 { font-size:clamp(33px,10vw,46px);margin:9px 0;overflow-wrap:break-word; }
  .mgps-guest .mgps-guest-intro p { font-size:15px;margin:0; }
  .mgps-guest .mgps-guest-card { padding:19px 20px 30px; }
  .mgps-guest .mgps-guest-card .mgps-button { display:inline-flex;align-items:center;min-height:44px; }
  .mgps-guest .mgps-guest-card label input { font-size:16px;min-height:44px; }
}
