.gcw-container {
  position: fixed;
  right: 16px;
  bottom: max(60px, env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  width: min(390px, calc(100vw - 24px));
  font-family: "Montserrat", sans-serif;
  transition: bottom 0.2s ease;
}

.gcw-container.gcw-preview-closed {
  bottom: max(0px, calc(env(safe-area-inset-bottom, 0px) - 30px));
}

.gcw-launcher {
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.gcw-preview-card {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  border: 3px solid #c2b280;
  box-shadow: 0 10px 26px rgba(7, 19, 63, 0.24);
  padding: 12px 14px;
  margin-bottom: 10px;
  opacity: 0;
  animation: gcwPreviewFadeIn 0.5s ease forwards;
  animation-delay: 3s;
}

@keyframes gcwPreviewFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gcw-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.gcw-preview-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #222;
  line-height: 1.2;
}

.gcw-preview-close {
  border: none;
  background: transparent;
  color: #6c6c6c;
  font-size: 1.55rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.gcw-preview-copy {
  margin: 0;
  color: #525252;
  font-size: 1.02rem;
  line-height: 1.35;
}

.gcw-preview-notch {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -11px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 11px solid #ffffff;
  filter: drop-shadow(0 2px 0 #c2b280);
}

.gcw-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 10px;
  overflow: hidden;
  background: #002243;
  box-shadow: 0 10px 24px rgba(0, 34, 67, 0.28);
  opacity: 0;
  animation: gcwPreviewFadeIn 0.5s ease forwards;
  animation-delay: 3s;
}

.gcw-action {
  border: none;
  background: transparent;
  color: #eef2ff;
  padding: 10px 6px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 56px;
}

.gcw-action:first-child {
  border-left: none;
}

.gcw-action:hover {
  background: rgba(255, 255, 255, 0.1);
}

.gcw-action-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gcw-action-icon svg {
  width: 18px;
  height: 18px;
}

.gcw-action[data-action="email"] .gcw-action-icon {
  font-size: 1.22rem;
}

.gcw-action[data-action="email"] .gcw-action-icon svg {
  width: 18px;
  height: 18px;
}

.gcw-action-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.gcw-launcher.gcw-preview-minimized .gcw-preview-card {
  display: none;
}

.gcw-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 100%;
  max-height: min(620px, 75vh);
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.gcw-panel.active {
  display: flex;
}

.gcw-default-screen,
.gcw-book-screen,
.gcw-text-screen,
.gcw-email-screen {
  display: none;
  flex-direction: column;
  min-height: 0;
  height: min(620px, 75vh);
}

.gcw-panel[data-mode="default"] .gcw-default-screen,
.gcw-panel[data-mode="chat"] .gcw-default-screen,
.gcw-panel[data-mode="book"] .gcw-book-screen,
.gcw-panel[data-mode="text"] .gcw-text-screen,
.gcw-panel[data-mode="email"] .gcw-email-screen {
  display: flex;
}

.gcw-panel[data-mode="default"] .gcw-default-screen,
.gcw-panel[data-mode="chat"] .gcw-default-screen {
  height: auto;
}

.gcw-panel[data-mode="chat"] .gcw-default-screen {
  height: min(620px, 75vh);
}

.gcw-panel[data-mode="chat"] .gcw-home-title,
.gcw-panel[data-mode="chat"] .gcw-home-grid,
.gcw-panel[data-mode="chat"] .gcw-home-assistant {
  display: none;
}

.gcw-panel[data-mode="default"] .gcw-messages {
  display: none;
}

.gcw-panel[data-mode="chat"] .gcw-default-body {
  display: flex;
  flex-direction: column;
}

.gcw-panel[data-mode="chat"] .gcw-messages {
  max-height: none;
  flex: 1;
}

.gcw-default-header {
  background: #002243;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gcw-default-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.gcw-icon-btn {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.gcw-default-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  background: #f8f7f2;
}

.gcw-home-title {
  margin: 0;
  color: #002243;
  font-size: 2.1rem;
  line-height: 1.15;
  font-weight: 700;
  font-family: "Libre Baskerville", serif;
}

.gcw-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, minmax(80px, auto));
  gap: 8px;
  margin-top: 14px;
}

.gcw-home-action {
  border: none;
  border-radius: 10px;
  background: linear-gradient(160deg, #0d3e74, #002243);
  color: #eef2ff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.gcw-home-action:hover {
  background: linear-gradient(160deg, #164f8f, #0a2f57);
}

.gcw-home-action-book {
  grid-row: 1 / span 2;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
}

.gcw-home-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.5rem;
  line-height: 1;
}

.gcw-home-action-icon svg {
  width: 20px;
  height: 20px;
}

.gcw-home-action-label {
  font-size: 1.03rem;
  line-height: 1.2;
  font-weight: 600;
}

.gcw-home-assistant {
  margin: 14px 0 10px;
  color: #002243;
  font-size: 0.97rem;
  font-weight: 600;
}

.gcw-messages {
  max-height: 130px;
  overflow-y: auto;
  padding-bottom: 4px;
}

.gcw-messages:empty {
  display: none;
}

.gcw-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.gcw-message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: #c2b280;
  flex-shrink: 0;
}

.gcw-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gcw-message-text {
  flex: 1;
}

.gcw-message-text p {
  margin: 0 0 4px 0;
  font-size: 0.94rem;
  color: #111;
  line-height: 1.45;
}

.gcw-message-time {
  font-size: 0.74rem;
  color: #8a8a8a;
}

.gcw-message.gcw-user {
  flex-direction: row-reverse;
}

.gcw-message.gcw-user .gcw-message-text {
  background: #002243;
  color: #fff;
  border-radius: 12px 12px 4px 12px;
  padding: 10px 12px;
}

.gcw-message.gcw-user .gcw-message-text p,
.gcw-message.gcw-user .gcw-message-time {
  color: #fff;
}

.gcw-options {
  display: none;
}

.gcw-option-btn {
  background: #fff;
  border: 2px solid #c2b280;
  color: #111;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 calc(50% - 4px);
  min-width: 130px;
}

.gcw-option-btn:hover {
  background: #c2b280;
  color: #fff;
}

.gcw-default-footer {
  padding: 0 16px 14px;
  background: #f8f7f2;
  border-top: none;
}

.gcw-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 2px solid #c2b280;
  border-radius: 10px;
  padding: 6px;
  background: #fff;
}

.gcw-input {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 0;
  font-size: 1.02rem;
  color: #002243;
  background: transparent;
  outline: none;
}

.gcw-input:focus {
  border-color: transparent;
}

.gcw-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: #c2b280;
  color: #002243;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gcw-send-btn svg {
  width: 18px;
  height: 18px;
}

.gcw-default-footnote {
  margin: 8px 0 0;
  font-size: 0.75rem;
  text-align: center;
  color: #777;
}

.gcw-brand-screen {
  background: #f8f7f2;
  border: 1px solid rgba(194, 178, 128, 0.45);
}

.gcw-brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  background: #002243;
  border-bottom: 1px solid rgba(194, 178, 128, 0.4);
}

.gcw-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gcw-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #c2b280;
  color: #002243;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.gcw-brand-text strong {
  display: block;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.1;
}

.gcw-brand-text span {
  display: block;
  color: #c2b280;
  font-size: 0.74rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.gcw-brand-controls {
  display: flex;
  align-items: center;
}

.gcw-brand-control {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(194, 178, 128, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 1.35rem;
  font-weight: 500;
  cursor: pointer;
}

.gcw-brand-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 0;
}

.gcw-title {
  margin: 0 0 8px;
  color: #002243;
  font-size: 2.05rem;
  line-height: 1.2;
  font-weight: 700;
  font-family: "Libre Baskerville", serif;
}

.gcw-subtitle {
  margin: 0 0 14px;
  color: #3f4652;
  font-size: 0.97rem;
}

.gcw-step {
  display: none;
}

.gcw-step.active {
  display: block;
}

.gcw-list {
  border-top: 1px solid rgba(0, 34, 67, 0.16);
}

.gcw-list-btn {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(0, 34, 67, 0.16);
  background: transparent;
  text-align: left;
  padding: 13px 10px;
  color: #002243;
  font-size: 1rem;
  cursor: pointer;
}

.gcw-list-btn:hover {
  background: rgba(0, 34, 67, 0.08);
}

.gcw-list-btn.selected {
  background: #002243;
  color: #fff;
  box-shadow: inset 4px 0 0 #c2b280;
  font-weight: 700;
}

.gcw-textarea-wrap {
  margin-top: 16px;
}

.gcw-textarea {
  width: 100%;
  min-height: 92px;
  resize: none;
  border: 1px solid rgba(0, 34, 67, 0.2);
  border-radius: 10px;
  padding: 12px;
  color: #002243;
  background: #fffef8;
  font-size: 0.98rem;
  line-height: 1.35;
  font-family: "Source Sans Pro", sans-serif;
  outline: none;
}

.gcw-textarea:focus {
  border-color: rgba(0, 34, 67, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 34, 67, 0.08);
}

.gcw-char-count {
  margin-top: 4px;
  text-align: right;
  color: #5b6170;
  font-size: 0.82rem;
  font-weight: 600;
}

.gcw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.gcw-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gcw-row {
  margin-top: 10px;
}

.gcw-field-input,
.gcw-field-select,
.gcw-field-textarea {
  width: 100%;
  border: 1px solid rgba(0, 34, 67, 0.24);
  border-radius: 10px;
  background: #fffef8;
  color: #002243;
  font-size: 1rem;
  padding: 12px;
  line-height: 1.25;
  font-family: "Source Sans Pro", sans-serif;
  outline: none;
}

.gcw-field-textarea {
  min-height: 96px;
  resize: vertical;
}

.gcw-field-input::placeholder,
.gcw-field-textarea::placeholder {
  color: #7a8190;
}

.gcw-field-input:focus,
.gcw-field-select:focus,
.gcw-field-textarea:focus {
  border-color: rgba(0, 34, 67, 0.46);
  box-shadow: 0 0 0 3px rgba(0, 34, 67, 0.08);
}

.gcw-field-input.invalid,
.gcw-field-select.invalid,
.gcw-field-textarea.invalid {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

.gcw-field-error {
  display: none;
  color: #8a1f17;
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 600;
}

.gcw-field-error.visible {
  display: block;
}

.gcw-label {
  color: #4a4f5e;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.gcw-consent {
  margin: 16px 0 0;
  color: #4a4f5e;
  font-size: 0.88rem;
  line-height: 1.5;
}

.gcw-consent a {
  color: #002243;
  font-weight: 700;
  text-decoration: underline;
}

.gcw-brand-footer {
  border-top: 1px solid rgba(0, 34, 67, 0.16);
  background: #f1efdf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 12px;
}

.gcw-back-btn {
  border: none;
  background: transparent;
  color: #002243;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 4px;
}

.gcw-primary-btn {
  border: 1px solid #b39e63;
  border-radius: 9px;
  padding: 10px 20px;
  min-width: 150px;
  background: #c2b280;
  color: #002243;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.gcw-primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 991px) {
  .gcw-container {
    right: 0;
    left: 0;
    bottom: 0 !important;
    width: 100%;
    transition: none;
  }

  .gcw-container.gcw-preview-closed {
    bottom: 0 !important;
  }
}

@media (max-width: 767px) {

  .gcw-action-label {
    font-size: 0.84rem;
  }

  .gcw-action-icon {
    font-size: 0.94rem;
  }

  .gcw-action-icon svg {
    width: 16px;
    height: 16px;
  }

  .gcw-action[data-action="email"] .gcw-action-icon {
    font-size: 1.08rem;
  }

  .gcw-action[data-action="email"] .gcw-action-icon svg {
    width: 16px;
    height: 16px;
  }

  .gcw-home-title {
    font-size: 1.75rem;
  }

  .gcw-home-action-label {
    font-size: 0.9rem;
  }

  .gcw-home-action-book {
    min-height: 152px;
  }

  .gcw-input {
    font-size: 0.95rem;
  }

  .gcw-panel,
  .gcw-default-screen,
  .gcw-book-screen,
  .gcw-text-screen,
  .gcw-email-screen {
    max-height: 65vh;
    height: 65vh;
  }

  .gcw-panel[data-mode="default"] .gcw-default-screen,
  .gcw-panel[data-mode="chat"] .gcw-default-screen {
    max-height: none;
    height: auto;
  }

  .gcw-panel[data-mode="chat"] .gcw-default-screen {
    max-height: 65vh;
    height: 65vh;
  }

  .gcw-title {
    font-size: 2rem;
  }
}
