/*
PM-V2.3 Smart Concierge
IMP-GPT-005 — Conversation UI Simplification
Version 2.4.0

Purpose:
- Removes the redundant Current Display strip.
- Keeps Previous/Next navigation persistent and outside the chat thread.
- Keeps the message field visible at the bottom.
- Retains responsive desktop and mobile behavior.
*/

#pmv2-smart-concierge {
  --pmv2-sc-blue: #245b96;
  --pmv2-sc-blue-dark: #173f70;
  --pmv2-sc-border: rgba(31, 41, 55, 0.14);
  --pmv2-sc-panel: rgba(250, 250, 249, 0.30);
  --pmv2-sc-surface: rgba(255, 255, 255, 0.88);
  --pmv2-sc-text: #172033;
  --pmv2-sc-muted: #596579;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100000;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--pmv2-sc-text);
}

#pmv2-smart-concierge *,
#pmv2-smart-concierge *::before,
#pmv2-smart-concierge *::after {
  box-sizing: border-box;
}

.pmv2-sc-launcher {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--pmv2-sc-blue);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.pmv2-sc-launcher svg {
  width: 29px;
  height: 29px;
}

#pmv2-smart-concierge[data-open="true"] .pmv2-sc-launcher {
  display: none;
}

.pmv2-sc-panel {
  display: none;
  width: min(430px, calc(100vw - 24px));
  height: min(700px, calc(100vh - 24px));
  overflow: hidden;
  background: var(--pmv2-sc-panel);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#pmv2-smart-concierge[data-open="true"] .pmv2-sc-panel {
  display: flex;
  flex-direction: column;
}

.pmv2-sc-header {
  flex: 0 0 auto;
  min-height: 82px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--pmv2-sc-border);
  background: rgba(255, 255, 255, 0.40);
}

.pmv2-sc-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pmv2-sc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pmv2-sc-blue);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.pmv2-sc-title,
.pmv2-sc-subtitle {
  margin: 0;
}

.pmv2-sc-title {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.pmv2-sc-subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: var(--pmv2-sc-muted);
}

.pmv2-sc-controls {
  display: flex;
  gap: 8px;
}

.pmv2-sc-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--pmv2-sc-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: var(--pmv2-sc-text);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.pmv2-sc-body {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.pmv2-sc-messages {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 18px 12px;
  scroll-behavior: smooth;
}

.pmv2-sc-message {
  max-width: 92%;
  margin: 0 0 10px;
  padding: 13px 15px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.pmv2-sc-message.assistant {
  margin-right: auto;
  background: var(--pmv2-sc-surface);
  border: 1px solid rgba(31, 41, 55, 0.10);
}

.pmv2-sc-message.visitor {
  margin-left: auto;
  background: var(--pmv2-sc-blue);
  color: #fff;
}

.pmv2-sc-actions {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 0 18px;
}

.pmv2-sc-actions:empty {
  display: none;
}

.pmv2-sc-action-btn {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--pmv2-sc-blue);
  border-radius: 12px;
  background: #fff;
  color: var(--pmv2-sc-blue-dark);
  font-weight: 700;
  cursor: pointer;
}

.pmv2-sc-action-btn.primary {
  background: var(--pmv2-sc-blue);
  color: #fff;
}

.pmv2-sc-navigation-bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--pmv2-sc-border);
  background: rgba(247, 247, 246, 0.40);
}

.pmv2-sc-nav-btn {
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.pmv2-sc-nav-previous {
  border: 1px solid var(--pmv2-sc-blue);
  background: rgba(255, 255, 255, 0.88);
  color: var(--pmv2-sc-blue-dark);
}

.pmv2-sc-nav-next {
  border: 1px solid var(--pmv2-sc-blue);
  background: var(--pmv2-sc-blue);
  color: #fff;
}

.pmv2-sc-nav-btn span[aria-hidden="true"] {
  font-size: 30px;
  line-height: 0.7;
  font-weight: 400;
}

.pmv2-sc-input-row {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--pmv2-sc-border);
  background: rgba(255, 255, 255, 0.40);
}

.pmv2-sc-input-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pmv2-sc-input {
  min-width: 0;
  flex: 1 1 auto;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(31, 41, 55, 0.18);
  border-radius: 24px;
  background: #fff;
  color: var(--pmv2-sc-text);
  font-size: 15px;
  outline: none;
}

.pmv2-sc-input:focus {
  border-color: var(--pmv2-sc-blue);
  box-shadow: 0 0 0 3px rgba(36, 91, 150, 0.14);
}

.pmv2-sc-send {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--pmv2-sc-blue);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

.pmv2-sc-input:disabled,
.pmv2-sc-send:disabled,
.pmv2-sc-nav-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* IMP-GPT-006 — Collapsible visit introduction */
.pmv2-sc-intro {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--pmv2-sc-border);
  background: rgba(255, 255, 255, 0.40);
}

.pmv2-sc-intro-toggle {
  width: 100%;
  min-height: 36px;
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: var(--pmv2-sc-blue-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.pmv2-sc-intro-toggle-label {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.pmv2-sc-intro-chevron {
  font-size: 19px;
  line-height: 1;
  transition: transform 240ms ease;
}

.pmv2-sc-intro-content {
  max-height: 390px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
  padding: 0 18px 14px;
  transition:
    max-height 260ms ease,
    opacity 220ms ease,
    transform 260ms ease,
    padding 260ms ease;
}

.pmv2-sc-intro-card {
  padding: 16px 17px;
  border: 1px solid rgba(36, 91, 150, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(244, 248, 253, 0.98), rgba(255, 255, 255, 0.70));
  box-shadow: 0 7px 20px rgba(23, 63, 112, 0.06);
}

.pmv2-sc-intro-card p {
  margin: 0 0 9px;
  font-size: 14px;
  line-height: 1.45;
}

.pmv2-sc-intro-card ul {
  margin: 6px 0 11px;
  padding-left: 22px;
}

.pmv2-sc-intro-card li {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.4;
}

.pmv2-sc-intro-title {
  color: var(--pmv2-sc-text);
  font-size: 18px !important;
  font-weight: 700;
}

.pmv2-sc-intro-lead {
  margin-bottom: 2px !important;
  font-weight: 700;
}

.pmv2-sc-intro-help {
  margin-bottom: 0 !important;
  color: var(--pmv2-sc-blue-dark);
  font-weight: 700;
}

.pmv2-sc-intro[data-expanded="true"] .pmv2-sc-intro-toggle {
  min-height: 28px;
  padding-top: 5px;
  padding-bottom: 3px;
}

.pmv2-sc-intro[data-expanded="false"] .pmv2-sc-intro-toggle-label {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pmv2-sc-intro[data-expanded="false"] .pmv2-sc-intro-content {
  max-height: 0;
  opacity: 0;
  transform: translateY(-12px);
  padding-top: 0;
  padding-bottom: 0;
}

.pmv2-sc-intro[data-expanded="false"] .pmv2-sc-intro-chevron {
  transform: translateY(1px);
}


.pmv2-sc-launcher-prompt,
.pmv2-sc-hide-label,
.pmv2-sc-navigation-bar-mobile {
  display: none;
}

.pmv2-sc-intro-tip {
  display: none;
  margin: 12px 0 0 !important;
  padding-top: 11px;
  border-top: 1px solid rgba(36, 91, 150, 0.14);
  color: var(--pmv2-sc-blue-dark);
  font-weight: 400;
}


  #pmv2-smart-concierge[data-device="mobile"] {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-launcher {
    width: auto;
    max-width: min(280px, calc(100vw - 16px));
    height: 48px;
    margin-left: auto;
    padding: 0 16px 0 12px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-launcher-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-launcher-icon svg {
    width: 24px;
    height: 24px;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-launcher-prompt {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-panel {
    width: 100%;
    height: min(78dvh, 620px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top));
    border-radius: 18px;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-header {
    min-height: 60px;
    padding: 8px 10px 8px 12px;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-title-wrap { gap: 9px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-avatar { width: 34px; height: 34px; font-size: 13px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-title { font-size: 16px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-subtitle { font-size: 12px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-controls { gap: 6px; }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-hide-btn {
    width: auto;
    min-width: 68px;
    height: 40px;
    padding: 0 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--pmv2-sc-blue);
    color: #fff;
    border-color: var(--pmv2-sc-blue);
    font-size: 14px;
    font-weight: 700;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-hide-icon { font-size: 20px; line-height: 1; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-hide-label { display: inline; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-controls .pmv2-sc-icon-btn:not(.pmv2-sc-hide-btn) { width: 40px; height: 40px; }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-navigation-bar-mobile {
    display: grid;
    flex: 0 0 auto;
    padding: 8px 10px;
    gap: 8px;
    border-top: 0;
    border-bottom: 1px solid var(--pmv2-sc-border);
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-navigation-bar-desktop { display: none; }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-nav-btn {
    min-height: 42px;
    padding: 7px 8px;
    border-radius: 12px;
    font-size: 13px;
    gap: 6px;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-nav-btn span[aria-hidden="true"] { font-size: 26px; }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-toggle {
    min-height: 32px;
    padding: 6px 10px;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-content {
    max-height: 360px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 8px;
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-card { padding: 12px 13px; border-radius: 14px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-card p, #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-card li { font-size: 13px; line-height: 1.35; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-card li { margin: 4px 0; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-card ul { margin: 5px 0 8px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-title { font-size: 16px !important; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-tip { display: block; }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-messages { padding: 10px 10px 8px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-message { font-size: 14px; padding: 10px 12px; margin-bottom: 8px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-actions { padding: 0 10px; gap: 6px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-action-btn { min-height: 40px; padding: 8px 10px; }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-input-row {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-input { height: 44px; font-size: 16px; }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-send { width: 44px; height: 44px; }

@media (max-height: 560px) {
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-panel { height: calc(100dvh - 12px); }
  #pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-content { max-height: 260px; }
}

/* IMP-GPT-019 v1.3.0 — Mobile companion refinement */

/* The contextual beacon must only appear while Smart Concierge is minimized. */
#pmv2-smart-concierge[data-device="mobile"][data-open="true"] .pmv2-sc-launcher {
  display: none !important;
}

/* Compress the mobile header while preserving readable controls. */
#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-header {
  min-height: 52px;
  padding: 6px 8px 6px 10px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-title-wrap {
  gap: 7px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-title {
  font-size: 14px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-subtitle {
  margin-top: 1px;
  font-size: 10.5px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-controls {
  gap: 5px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-hide-btn {
  min-width: 60px;
  height: 34px;
  padding: 0 10px;
  gap: 5px;
  font-size: 12.5px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-hide-icon {
  font-size: 17px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-controls .pmv2-sc-icon-btn:not(.pmv2-sc-hide-btn) {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

/* Keep display navigation directly below the header, but visually lighter. */
#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-navigation-bar-mobile {
  padding: 6px 8px;
  gap: 6px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-nav-btn {
  min-height: 36px;
  padding: 5px 7px;
  border-radius: 10px;
  font-size: 12px;
  gap: 5px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-nav-btn span[aria-hidden="true"] {
  font-size: 22px;
}

/* Recover a little more vertical room for the conversation. */
#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-intro-toggle {
  min-height: 28px;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* IMP-GPT-019 v1.3.2 — Collapsed mobile introduction must release its height */
#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-content {
  max-height: 0 !important;
  opacity: 0;
  transform: translateY(-12px);
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

/* IMP-GPT-019 v1.3.4 — Mobile consultant action and final control balance */

/* Hide Close on mobile; Hide is the single dismiss control. */
#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-controls
  .pmv2-sc-icon-btn:not(.pmv2-sc-hide-btn) {
  display: none !important;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-controls {
  gap: 0;
}

/* Consultant action is mobile-only and sits directly below display navigation. */
.pmv2-sc-consultant-bar-mobile {
  display: none;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-consultant-bar-mobile {
  display: block;
  flex: 0 0 auto;
  padding: 0 8px 6px;
  border-bottom: 1px solid var(--pmv2-sc-border);
  background: rgba(247, 247, 246, 0.40);
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-consultant-btn {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--pmv2-sc-blue);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pmv2-sc-blue-dark);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Slightly increase display-navigation height from the compact accepted state. */
#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-nav-btn {
  min-height: 40px;
  padding-top: 7px;
  padding-bottom: 7px;
}



/* IMP-GPT-020 — Consultant Experience Polish */

/* Once collapsed, only the chevron remains. */
#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-toggle-label {
  display: none !important;
}

#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-toggle {
  justify-content: flex-end;
  min-height: 22px;
  padding: 2px 8px;
}

/* Distinct service-action styling. */
#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-consultant-btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--pmv2-sc-blue-dark);
  border: 1px solid var(--pmv2-sc-blue);
  font-size: 13px;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-consultant-icon {
  font-size: 15px;
  line-height: 1;
}


/* IMP-GPT-020 v1.0.1 — Direct consultant form and final mobile spacing */

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-consultant-bar-mobile {
  padding-top: 7px;
}

#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"] {
  min-height: 16px;
}

#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-toggle {
  min-height: 16px;
  height: 16px;
  padding: 0 7px;
  justify-content: flex-end;
}

#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-chevron {
  font-size: 15px;
  line-height: 1;
}


/* IMP-GPT-020 v1.0.2 — Responsive desktop consultant form */
#pmv2-smart-concierge[data-device="desktop"][data-consultant-workflow="active"] .pmv2-sc-panel {
  height: auto;
  max-height: min(700px, calc(100vh - 24px));
}

#pmv2-smart-concierge[data-device="desktop"][data-consultant-workflow="active"] .pmv2-sc-header {
  min-height: 72px;
}

#pmv2-smart-concierge[data-device="desktop"][data-consultant-workflow="active"] .pmv2-cr-wrap {
  border-radius: 14px;
}


/* IMP-GPT-020 v1.0.3 — Desktop regression safeguards */
#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-hide-label {
  display: none !important;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-navigation-bar-desktop {
  display: grid !important;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-navigation-bar-mobile,
#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-consultant-bar-mobile {
  display: none !important;
}


/* IMP-GPT-020 v1.0.4 — Desktop UX restore; mobile remains frozen */

/* Hide is the only panel-dismiss control on both desktop and mobile. */
#pmv2-smart-concierge .pmv2-sc-controls .pmv2-sc-icon-btn:not(.pmv2-sc-hide-btn) {
  display: none !important;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-hide-label {
  display: inline !important;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-hide-btn {
  width: auto;
  min-width: 72px;
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--pmv2-sc-blue);
  color: #fff;
  border-color: var(--pmv2-sc-blue);
  font-size: 14px;
  font-weight: 700;
}

/* Desktop uses the upper navigation row directly beneath the header. */
#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-navigation-bar-mobile {
  display: grid !important;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  border-top: 0;
  border-bottom: 1px solid var(--pmv2-sc-border);
  background: rgba(247, 247, 246, 0.40);
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-navigation-bar-desktop {
  display: none !important;
}

/* Desktop also gets the governed consultant action directly below navigation. */
#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-consultant-bar-mobile {
  display: block !important;
  flex: 0 0 auto;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--pmv2-sc-border);
  background: rgba(247, 247, 246, 0.40);
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-consultant-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--pmv2-sc-blue);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--pmv2-sc-blue-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Preserve normal desktop welcome panel on load. */
#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-intro {
  display: block;
}

/* Ensure Close Form remains available and visible in the desktop form. */
#pmv2-smart-concierge[data-device="desktop"][data-consultant-workflow="active"] .pmv2-cr-close-form {
  display: inline-flex !important;
}

/* ============================================================
   IMP-GPT-021 — Smart Concierge UI Stabilization
   Desktop and mobile presentations are explicitly separated.
   ============================================================ */

/* Shared: Hide is the only panel-dismiss control. */
#pmv2-smart-concierge .pmv2-sc-controls .pmv2-sc-icon-btn:not(.pmv2-sc-hide-btn) {
  display: none !important;
}

/* ---------------- Desktop presentation ---------------- */

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-hide-label {
  display: inline !important;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-hide-btn {
  width: auto;
  min-width: 72px;
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--pmv2-sc-blue);
  color: #fff;
  border-color: var(--pmv2-sc-blue);
  font-size: 14px;
  font-weight: 700;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-navigation-bar-mobile {
  display: grid !important;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  border-top: 0;
  border-bottom: 1px solid var(--pmv2-sc-border);
  background: rgba(247, 247, 246, 0.40);
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-navigation-bar-desktop {
  display: none !important;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-consultant-bar-mobile {
  display: block !important;
  flex: 0 0 auto;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--pmv2-sc-border);
  background: rgba(247, 247, 246, 0.40);
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-consultant-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--pmv2-sc-blue);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--pmv2-sc-blue-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#pmv2-smart-concierge[data-device="desktop"] .pmv2-sc-intro {
  display: block;
}

#pmv2-smart-concierge[data-device="desktop"][data-consultant-workflow="active"] .pmv2-sc-panel {
  height: auto;
  max-height: min(700px, calc(100vh - 24px));
}

#pmv2-smart-concierge[data-device="desktop"][data-consultant-workflow="active"] .pmv2-cr-wrap {
  flex: 0 0 auto;
  width: auto;
  max-height: min(58vh, 520px);
  margin: 10px 12px;
  overflow-y: auto;
  border-radius: 14px;
}

#pmv2-smart-concierge[data-device="desktop"][data-consultant-workflow="active"] .pmv2-cr-close-form {
  display: inline-flex !important;
}

/* ---------------- Mobile presentation ---------------- */

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-hide-label {
  display: inline !important;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-navigation-bar-mobile {
  display: grid !important;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-navigation-bar-desktop {
  display: none !important;
}

#pmv2-smart-concierge[data-device="mobile"] .pmv2-sc-consultant-bar-mobile {
  display: block !important;
}

#pmv2-smart-concierge[data-device="mobile"][data-open="true"] .pmv2-sc-launcher,
#pmv2-smart-concierge[data-device="desktop"][data-open="true"] .pmv2-sc-launcher {
  display: none !important;
}

#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-content {
  max-height: 0 !important;
  opacity: 0;
  transform: translateY(-12px);
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-toggle-label {
  display: none !important;
}

#pmv2-smart-concierge[data-device="mobile"]
  .pmv2-sc-intro[data-expanded="false"]
  .pmv2-sc-intro-toggle {
  min-height: 16px;
  height: 16px;
  padding: 0 7px;
  justify-content: flex-end;
}

#pmv2-smart-concierge[data-device="mobile"][data-consultant-workflow="active"] .pmv2-sc-navigation-bar,
#pmv2-smart-concierge[data-device="mobile"][data-consultant-workflow="active"] .pmv2-sc-navigation-bar-mobile,
#pmv2-smart-concierge[data-device="mobile"][data-consultant-workflow="active"] .pmv2-sc-consultant-bar-mobile,
#pmv2-smart-concierge[data-device="mobile"][data-consultant-workflow="active"] .pmv2-sc-intro,
#pmv2-smart-concierge[data-device="mobile"][data-consultant-workflow="active"] .pmv2-sc-messages,
#pmv2-smart-concierge[data-device="mobile"][data-consultant-workflow="active"] .pmv2-sc-actions,
#pmv2-smart-concierge[data-device="mobile"][data-consultant-workflow="active"] .pmv2-sc-input-row {
  display: none !important;
}

