/* DARUTA_CUSTOMER_MESSAGES_INBOX_V1O_A_MESSAGE_UI_V4
   Public customer-message modal mobile layout hotfix:
   - no user-visible technical marker;
   - internal modal scrolls on short mobile viewports;
   - sticky action bar keeps submit/close reachable. */
.daruta-customer-message {
  width: min(440px, calc(100vw - 40px));
  max-height: min(80dvh, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}
.daruta-customer-message__head { display: flex; flex-direction: column; gap: 6px; }
.daruta-customer-message__head .daruta-h2 { margin-bottom: 0; }
.daruta-customer-message__head .daruta-small { line-height: 1.46; }
.daruta-customer-message__fields { display: flex; flex-direction: column; gap: 12px; }
.daruta-customer-message__success {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--daruta-radius-md);
  border: 1px solid rgba(66, 89, 68, .24);
  background: rgba(66, 89, 68, .08);
  color: var(--daruta-forest);
}
.daruta-customer-message__error {
  margin: 0;
  color: var(--daruta-rust);
  font-size: 13px;
  line-height: 1.45;
}
.daruta-customer-message__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.daruta-customer-message__actions .daruta-button { flex: 1 1 140px; }

@supports (height: 100dvh) {
  .daruta-customer-message { max-height: min(80dvh, 680px); }
}

@media (max-width: 520px) {
  .daruta-customer-message {
    width: min(100%, calc(100vw - 32px));
    max-height: calc(100dvh - 92px);
    gap: 12px;
    padding: 18px 16px 0;
  }
  .daruta-customer-message__head .daruta-h2 {
    font-size: 27px;
    line-height: 1.08;
  }
  .daruta-customer-message__head .daruta-small {
    font-size: 14px;
  }
  .daruta-customer-message__fields { gap: 10px; }
  .daruta-customer-message .daruta-input,
  .daruta-customer-message .daruta-select {
    min-height: 48px;
  }
  .daruta-customer-message .daruta-textarea {
    min-height: 88px;
    height: 88px;
  }
  .daruta-customer-message__actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -16px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(66, 89, 68, .14);
    background: linear-gradient(180deg, rgba(250, 245, 232, .88), var(--daruta-paper) 28%);
    backdrop-filter: blur(8px);
  }
  .daruta-customer-message__actions .daruta-button {
    flex: 1 1 150px;
  }
  .daruta-customer-message__actions .daruta-button:not(.daruta-button--secondary) { order: 1; }
  .daruta-customer-message__actions .daruta-button--secondary { order: 2; }
}

@media (max-height: 680px) {
  .daruta-customer-message {
    max-height: calc(100dvh - 72px);
  }
  .daruta-customer-message__head .daruta-small {
    display: none;
  }
}

/* DARUTA_CUSTOMER_MESSAGES_INBOX_V1O_A_MESSAGE_UI_V4 — hide native scrollbar indicator while keeping modal scroll functional. */
.daruta-customer-message {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.daruta-customer-message::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}


/* DARUTA_CUSTOMER_MESSAGES_INBOX_V1O_A_MESSAGE_UI_V4 — Daruta-styled dropdown instead of native Android selector. */
.daruta-customer-message__dropdown {
  position: relative;
  width: 100%;
}
.daruta-customer-message__dropdown-trigger {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(37, 35, 30, .18);
  background: rgba(255, 255, 255, .34);
  color: var(--daruta-fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  line-height: 1.1;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34);
}
.daruta-customer-message__dropdown-trigger.is-open {
  border-color: rgba(66, 89, 68, .42);
  background: rgba(255, 255, 255, .52);
}
.daruta-customer-message__dropdown-chevron {
  color: var(--daruta-forest);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-1px);
}
.daruta-customer-message__dropdown-trigger.is-open .daruta-customer-message__dropdown-chevron {
  transform: translateY(1px) rotate(180deg);
}
.daruta-customer-message__dropdown-menu {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(37, 35, 30, .14);
  background: var(--daruta-paper);
  box-shadow: 0 18px 40px rgba(37, 35, 30, .16);
}
.daruta-customer-message__dropdown-option {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid rgba(37, 35, 30, .08);
  background: transparent;
  color: var(--daruta-fg);
  padding: 0 16px;
  text-align: left;
  font: inherit;
  font-size: 15px;
}
.daruta-customer-message__dropdown-option:last-child {
  border-bottom: 0;
}
.daruta-customer-message__dropdown-option.is-active {
  color: var(--daruta-forest);
  background: rgba(66, 89, 68, .08);
}
@media (max-width: 520px) {
  .daruta-customer-message__dropdown-trigger {
    min-height: 48px;
  }
  .daruta-customer-message__dropdown-menu {
    top: calc(100% + 7px);
  }
  .daruta-customer-message__dropdown-option {
    min-height: 44px;
  }
}
