/* ================================
   Client home
   ================================ */

.site-index[data-user-role="client"] {
  width: 100%;
}

.site-index[data-user-role="client"] #client {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.site-index[data-user-role="client"] #client h1 {
  max-width: 680px;
  margin: 0 auto 28px auto;
  color: #2d2520;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.site-index[data-user-role="client"] .top-points {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 50px 0;
  gap: 10px;
}

.site-index[data-user-role="client"] .top-points > div {
  width: 50px;
  height: 50px;
  border-radius: 50px;
  overflow: hidden;
}

.site-index[data-user-role="client"] .top-points > div img {
  height: 100%;
  width: auto;
}

.site-index[data-user-role="client"] .ai-form {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 18px auto;
}

.site-index[data-user-role="client"] .ai-form input {
  width: 100%;
  min-height: 58px;
  padding: 16px 150px 16px 22px;
  border-radius: 999px;
  border: 1px solid rgba(96, 61, 28, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #2d2520;
  font-size: 16px;
  box-shadow:
    0 16px 40px rgba(72, 48, 31, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.site-index[data-user-role="client"] .ai-form input::placeholder {
  color: #a79a91;
}

.site-index[data-user-role="client"] .ai-form input:focus {
  border-color: rgba(96, 61, 28, 0.36);
  background: #fff;
  box-shadow:
    0 18px 44px rgba(72, 48, 31, 0.1),
    0 0 0 4px rgba(96, 61, 28, 0.08) !important;
}

.site-index[data-user-role="client"] #client button.location-and-find-place {
  position: absolute;
  top: 50%;
  right: 7px;
  height: 42px;
  min-width: 124px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(96, 61, 28, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #222;
  box-shadow: 0 8px 20px rgba(72, 48, 31, 0.06);
  transform: translateY(-50%);
  transition:
    color 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    transform 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.site-index[data-user-role="client"] #client button.location-and-find-place::before {
  content: "";
  position: absolute;
  inset: -45%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.28) 48%,
    transparent 58%,
    transparent 100%
  );
  transform: translateX(-80%) rotate(10deg);
  opacity: 0;
  animation: none;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.45s ease;
}

.site-index[data-user-role="client"] #client button.location-and-find-place::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #7a4a24 0%, #4f3018 100%);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.site-index[data-user-role="client"] #client button.location-and-find-place i,
.site-index[data-user-role="client"] #client button.location-and-find-place span {
  position: relative;
  z-index: 3;
  transition: color 0.45s ease;
}

.site-index[data-user-role="client"] #client button.location-and-find-place i {
  font-size: 14px;
  line-height: 1;
  color: #222;
  animation: clientCupFloat 2.8s ease-in-out infinite;
}

.site-index[data-user-role="client"] #client button.location-and-find-place:hover {
  color: #603d1c;
  border-color: rgba(96, 61, 28, 0.2);
  transform: translateY(-50%) translateY(-1px);
  box-shadow: 0 10px 24px rgba(72, 48, 31, 0.1);
}

.site-index[data-user-role="client"] #client button.location-and-find-place:active {
  transform: translateY(-50%) translateY(1px);
}

/* Активное состояние, когда в input есть текст */
.site-index[data-user-role="client"] #client .ai-form.has-text button.location-and-find-place {
  border-color: rgba(96, 61, 28, 0.18);
  color: #fff;
  box-shadow:
    0 12px 26px rgba(96, 61, 28, 0.22),
    0 0 0 5px rgba(96, 61, 28, 0.05);
}

.site-index[data-user-role="client"] #client .ai-form.has-text button.location-and-find-place::after {
  opacity: 1;
}

.site-index[data-user-role="client"] #client .ai-form.has-text button.location-and-find-place::before {
  opacity: 1;
  animation: clientButtonShine 3.8s ease-in-out infinite;
}

.site-index[data-user-role="client"] #client .ai-form.has-text button.location-and-find-place i {
  color: #fff;
}

.site-index[data-user-role="client"] #client .ai-form.has-text button.location-and-find-place:hover {
  box-shadow:
    0 15px 30px rgba(96, 61, 28, 0.26),
    0 0 0 6px rgba(96, 61, 28, 0.06);
}

@keyframes clientCupFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  45% {
    transform: translateY(-2px) rotate(-4deg);
  }

  70% {
    transform: translateY(1px) rotate(2deg);
  }
}

@keyframes clientButtonShine {
  0% {
    transform: translateX(-85%) rotate(10deg);
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  42% {
    transform: translateX(85%) rotate(10deg);
    opacity: 0;
  }

  100% {
    transform: translateX(85%) rotate(10deg);
    opacity: 0;
  }
}


/* AI bubbles */
.site-index[data-user-role="client"] .ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 640px;
  margin: 12px auto 0 auto;
}

.site-index[data-user-role="client"] .ai-bubble {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 61, 28, 0.08);
  background: rgba(255, 255, 255, 0.62);
  color: #6f5a4d;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.18s ease;
}

.site-index[data-user-role="client"] .ai-bubble:hover {
  color: #603d1c;
  background: rgba(96, 61, 28, 0.07);
  border-color: rgba(96, 61, 28, 0.14);
}

/* FAQ */
.site-index[data-user-role="client"] .faq {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin: 34px 0 0 0;
}

.site-index[data-user-role="client"] .faq a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(96, 61, 28, 0.08);
  background: rgba(255, 255, 255, 0.54);
  color: #6f5a4d;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.site-index[data-user-role="client"] .faq a:hover {
  color: #603d1c;
  background: rgba(96, 61, 28, 0.07);
}

/* Existing orders */
.site-index[data-user-role="client"] .existing-orders {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 26px auto;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 61, 28, 0.08);
  box-shadow: 0 14px 34px rgba(72, 48, 31, 0.08);
  text-align: left;
  position: relative;
}

.site-index[data-user-role="client"] .existing-orders h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2d2520;
  margin: 0 34px 12px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.site-index[data-user-role="client"] .existing-orders h2::before {
  content: "\f017";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: rgba(96, 61, 28, 0.08);
  color: #603d1c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.site-index[data-user-role="client"] .existing-orders .count {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 50%;
  background: #603d1c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(96, 61, 28, 0.22);
  display: none;
}

.site-index[data-user-role="client"] .existing-orders .existing-order,
.site-index[data-user-role="client"] .existing-orders .order {
  display: inline-block;
  margin: 10px 10px 0 0;
}

.site-index[data-user-role="client"] .existing-orders .existing-order:first-of-type,
.site-index[data-user-role="client"] .existing-orders .order:first-of-type {
  margin-top: 0;
}



.site-index[data-user-role="client"] .ai-form input {
  padding-right: 198px;
}

.site-index[data-user-role="client"] #client button.ai-voice-order-inline {
  position: absolute;
  top: 50%;
  right: 145px;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(96, 61, 28, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #603d1c;
  box-shadow: 0 8px 20px rgba(72, 48, 31, 0.06);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  transition: all 0.22s ease;
  z-index: 4;
}

.site-index[data-user-role="client"] #client button.ai-voice-order-inline:hover {
  background: rgba(96, 61, 28, 0.07);
  border-color: rgba(96, 61, 28, 0.2);
}

.site-index[data-user-role="client"] #client button.ai-voice-order-inline.is-listening {
  background: #603d1c;
  color: #fff;
  border-color: rgba(96, 61, 28, 0.3);
  box-shadow:
    0 12px 26px rgba(96, 61, 28, 0.22),
    0 0 0 6px rgba(96, 61, 28, 0.08);
}

.site-index[data-user-role="client"] #client button.ai-voice-order-inline.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.site-index[data-user-role="client"] .ai-voice-hint {
  max-width: 640px;
  margin: -6px auto 14px auto;
  color: #6f5a4d;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;
}

.site-index[data-user-role="client"] .ai-voice-hint.show {
  opacity: 1;
  transform: translateY(0);
}

.site-index[data-user-role="client"] #client .ai-voice-order-mobile {
  display: none;
}








.client-payment-required {
  max-width: 560px;
  margin: 0 auto 18px;
  padding: 14px 16px;

  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;

  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(96, 61, 28, 0.08);
  box-shadow:
    0 14px 34px rgba(72, 48, 31, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.client-payment-required-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(132, 86, 49, 0.1);
  color: #845631;
  font-size: 17px;
}

.client-payment-required-content {
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: left;
  margin: 0 0 10px 0;
}

.client-payment-required-content strong {
  color: #2d2520;
  font-size: 14px;
  line-height: 1.25;
}

.client-payment-required-content span {
  color: #8a7b72;
  font-size: 12px;
  line-height: 1.35;
}

.client-payment-required-btn {
  min-width: 190px;
  padding: 10px 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7a4a24 0%, #4f3018 100%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(96, 61, 28, 0.22);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.client-payment-required-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(96, 61, 28, 0.26);
}

.client-payment-required-order {
  margin-bottom: 14px;
}

/* Mobile */

@media (prefers-reduced-motion: reduce) {
  .site-index[data-user-role="client"] #client button.location-and-find-place i,
  .site-index[data-user-role="client"] .ai-form.has-text button.location-and-find-place::before {
    animation: none;
  }
}

/* Mobile voice button */
@media (max-width: 768px) {
  .site-index[data-user-role="client"] #client {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-index[data-user-role="client"] #client h1 {
    order: 1;
  }

  .site-index[data-user-role="client"] #client .top-points {
    order: 2;
  }

  .site-index[data-user-role="client"] #client .ai-form {
    order: 3;
  }

  .site-index[data-user-role="client"] #client .ai-suggestions {
    order: 4;
  }

  .site-index[data-user-role="client"] #client .faq {
    order: 5;
  }

  .site-index[data-user-role="client"] #client button.ai-voice-order-mobile {
    order: 6;
  }

  .site-index[data-user-role="client"] #client .ai-voice-hint {
    order: 7;
  }

  .site-index[data-user-role="client"] #client button.ai-voice-order-inline {
    display: none;
  }

  .site-index[data-user-role="client"] .ai-form input {
    min-height: 54px;
    padding: 14px 82px 14px 18px;
    font-size: 15px;
  }

  .site-index[data-user-role="client"] #client button.location-and-find-place {
    right: 6px;
    width: 48px;
    min-width: 48px;
    height: 40px;
    padding: 0;
    gap: 0;
  }

  .site-index[data-user-role="client"] #client button.location-and-find-place span {
    display: none;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    order: 6;

    width: 154px;
    height: 154px;
    min-width: 154px;
    min-height: 154px;

    margin: 46px auto 48px auto;
    padding: 0;

    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    overflow: visible;

    box-shadow:
      0 22px 44px rgba(119, 83, 52, 0.10),
      0 10px 24px rgba(119, 83, 52, 0.06);

    transition:
      transform 0.22s ease,
      box-shadow 0.25s ease,
      opacity 0.2s ease;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
      radial-gradient(
        circle at 50% 48%,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(249, 240, 229, 0.78) 48%,
        rgba(239, 220, 199, 0.42) 74%,
        rgba(239, 220, 199, 0.04) 100%
      );
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.9),
      0 18px 38px rgba(119, 83, 52, 0.08);
    z-index: 0;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.74);
    box-shadow:
      0 0 0 1px rgba(154, 106, 66, 0.09),
      inset 0 2px 8px rgba(255, 255, 255, 0.42);
    z-index: 1;
    pointer-events: none;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile .voice-btn-bg {
    position: absolute;
    inset: 39px;
    border-radius: 50%;
    background:
      linear-gradient(145deg, #d9ad80 0%, #bd8658 52%, #a97144 100%);
    box-shadow:
      inset 0 2px 8px rgba(255, 255, 255, 0.26),
      inset 0 -5px 10px rgba(110, 70, 38, 0.16),
      0 12px 24px rgba(141, 94, 56, 0.20);
    z-index: 2;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile .voice-btn-bg::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 18px;
    width: 46px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    filter: blur(1px);
    transform: rotate(-18deg);
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile .voice-btn-content {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile .voice-btn-text {
    display: none;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile i {
    color: #fff;
    font-size: 34px;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(94, 58, 32, 0.18);
    animation: voiceIconFloat 2.8s ease-in-out infinite;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile:hover {
    transform: translateY(-2px);
    box-shadow:
      0 24px 48px rgba(119, 83, 52, 0.13),
      0 12px 26px rgba(119, 83, 52, 0.08);
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile:active {
    transform: scale(0.97);
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile.is-listening {
    box-shadow:
      0 24px 48px rgba(119, 83, 52, 0.16),
      0 0 0 12px rgba(197, 154, 114, 0.12);
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile.is-listening .voice-btn-bg {
    background:
      linear-gradient(145deg, #e0b88f 0%, #c89162 52%, #ad784a 100%);
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile.is-listening .voice-btn-content {
    animation: voiceContentPulse 1.2s ease-in-out infinite;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile.is-listening::before {
    animation: voiceRippleSoft 1.8s ease-out infinite;
  }

  .client-payment-required {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 420px) {
  .site-index[data-user-role="client"] .ai-form input {
    padding-right: 82px;
  }

  .site-index[data-user-role="client"] #client button.location-and-find-place {
    width: 48px;
    min-width: 48px;
    padding: 0;
  }

  .site-index[data-user-role="client"] #client button.location-and-find-place span {
    display: none;
  }

  .site-index[data-user-role="client"] #client {
    /* padding-bottom: 112px; */
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile {
    width: 142px;
    height: 142px;
    min-width: 142px;
    min-height: 142px;
    margin: 44px auto 46px auto;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile .voice-btn-bg {
    inset: 36px;
  }

  .site-index[data-user-role="client"] #client .ai-voice-order-mobile i {
    font-size: 31px;
  }
}

@keyframes voiceIconFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }

  35% {
    transform: translateY(-3px) rotate(-5deg);
  }

  65% {
    transform: translateY(1px) rotate(4deg);
  }
}

@keyframes voiceRippleSoft {
  0% {
    transform: scale(0.94);
    opacity: 0.75;
  }

  70% {
    transform: scale(1.18);
    opacity: 0;
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

@keyframes voiceContentPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}
