/**
 * Leather 1X — Contact Form + Support Chat
 * Dark theme, glassmorphism, floating labels, premium chat panel
 */

/* ══════════════════════════════════════════════════════════════
   CONTACT BLOCK
   ══════════════════════════════════════════════════════════════ */

.l1x-contact {
  width: min(100% - 32px, var(--container, 1360px));
  margin: 0 auto;
  padding: 60px 0 80px;
}

.l1x-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Pill */
.l1x-contact__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201,169,106,0.16);
  background: rgba(201,169,106,0.04);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 16px;
  width: fit-content;
}

.l1x-contact__pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.l1x-contact__heading {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
}

.l1x-contact__address {
  font-style: normal;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ── Map ───────────────────────────────────────────────────── */
.l1x-contact__map {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(201,169,106,0.12);
}

.l1x-contact__map iframe {
  display: block;
  width: 100%;
  height: 280px;
  filter: grayscale(0.6) brightness(0.7) contrast(1.1);
  transition: filter 0.3s ease;
}

.l1x-contact__map:hover iframe {
  filter: grayscale(0.2) brightness(0.8) contrast(1.05);
}

/* ── Form Wrap ──────────────────────────────────────────────── */
.l1x-contact__form-wrap {
  padding: 32px;
  border-radius: 24px;
  border: 1px solid rgba(201,169,106,0.14);
  background: rgba(255,255,255,0.02);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ── Floating Label Fields ──────────────────────────────────── */
.l1x-contact-form__row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.l1x-contact-form__field {
  position: relative;
  margin-bottom: 20px;
}

.l1x-contact-form__field input,
.l1x-contact-form__field textarea {
  width: 100%;
  padding: 18px 16px 8px;
  border-radius: 14px;
  border: 1px solid rgba(201,169,106,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.l1x-contact-form__field textarea {
  resize: vertical;
  min-height: 120px;
}

.l1x-contact-form__field input:focus,
.l1x-contact-form__field textarea:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(201,169,106,0.08);
}

.l1x-contact-form__field input::placeholder,
.l1x-contact-form__field textarea::placeholder {
  color: transparent;
}

/* Floating label */
.l1x-contact-form__field label {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 0.88rem;
  color: var(--muted);
  pointer-events: none;
  transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
  transform-origin: left top;
}

.l1x-contact-form__field input:focus + label,
.l1x-contact-form__field input:not(:placeholder-shown) + label,
.l1x-contact-form__field textarea:focus + label,
.l1x-contact-form__field textarea:not(:placeholder-shown) + label {
  transform: translateY(-8px);
  font-size: 0.68rem;
  color: var(--gold);
}

.l1x-contact-form__field .req {
  color: var(--gold);
}

/* Submit */
.l1x-contact-form__submit {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid rgba(201,169,106,0.30);
  background: linear-gradient(180deg, rgba(138,63,24,0.96), rgba(90,38,12,0.96));
  color: rgba(255,255,255,0.94);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.l1x-contact-form__submit:hover {
  transform: translateY(-1px);
  border-color: rgba(201,169,106,0.50);
  box-shadow: 0 8px 24px rgba(138,63,24,0.3);
}

.l1x-contact-form__submit:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Status */
.l1x-contact-form__status {
  text-align: center;
  font-size: 0.86rem;
  margin-top: 14px;
  min-height: 1.4em;
  transition: opacity 0.3s ease;
}

.l1x-contact-form__status.is-success {
  color: #48bb78;
}

.l1x-contact-form__status.is-error {
  color: #e25555;
}

/* Responsive */
@media (max-width: 768px) {
  .l1x-contact__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .l1x-contact-form__row--half {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .l1x-contact__form-wrap {
    padding: 24px 20px;
  }
}

/* ══════════════════════════════════════════════════════════════
   SUPPORT CHAT
   ══════════════════════════════════════════════════════════════ */

/* ── Bubble ─────────────────────────────────────────────────── */
.l1x-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(201,169,106,0.30);
  background: linear-gradient(135deg, rgba(138,63,24,0.95), rgba(90,38,12,0.95));
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 0 rgba(201,169,106,0);
  animation: l1xBubblePulse 3s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.l1x-chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(0,0,0,0.5), 0 0 20px rgba(201,169,106,0.15);
}

@keyframes l1xBubblePulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 0 rgba(201,169,106,0.20); }
  50% { box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 8px rgba(201,169,106,0); }
}

.l1x-chat-bubble[aria-expanded="true"] {
  animation: none;
}

/* ── Panel ──────────────────────────────────────────────────── */
.l1x-chat-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9991;
  width: 370px;
  max-height: 520px;
  border-radius: 24px;
  border: 1px solid rgba(201,169,106,0.16);
  background: rgba(10,10,10,0.96);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(201,169,106,0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: l1xPanelIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.l1x-chat-panel[hidden] {
  display: none !important;
}

@keyframes l1xPanelIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header */
.l1x-chat-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(201,169,106,0.10);
  flex-shrink: 0;
}

.l1x-chat-panel__logo {
  height: 22px;
  width: auto;
}

.l1x-chat-panel__title {
  flex: 1;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.l1x-chat-panel__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.l1x-chat-panel__close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

/* Body */
.l1x-chat-panel__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 18px 18px;
}

/* Messages */
.l1x-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,169,106,0.15) transparent;
}

.l1x-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.l1x-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(201,169,106,0.15);
  border-radius: 4px;
}

/* Message bubbles */
.l1x-chat-msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
  animation: l1xMsgIn 0.25s ease forwards;
  opacity: 0;
}

@keyframes l1xMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.l1x-chat-msg--bot {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,169,106,0.10);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.l1x-chat-msg--bot p {
  margin: 0 0 6px;
}

.l1x-chat-msg--bot p:last-child {
  margin-bottom: 0;
}

.l1x-chat-msg--bot ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}

.l1x-chat-msg--bot ul li {
  margin-bottom: 4px;
}

.l1x-chat-msg--bot a {
  color: var(--gold);
  text-decoration: none;
}

.l1x-chat-msg--bot a:hover {
  text-decoration: underline;
}

.l1x-chat-msg--user {
  background: rgba(201,169,106,0.10);
  border: 1px solid rgba(201,169,106,0.18);
  color: var(--text);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Link buttons inside messages */
.l1x-chat-msg__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.l1x-chat-msg__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201,169,106,0.22);
  background: rgba(201,169,106,0.06);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.l1x-chat-msg__link:hover {
  background: rgba(201,169,106,0.12);
  border-color: rgba(201,169,106,0.35);
}

/* Typing indicator */
.l1x-chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  align-self: flex-start;
}

.l1x-chat-typing__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.4;
  animation: l1xTypingDot 1.2s ease-in-out infinite;
}

.l1x-chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.l1x-chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes l1xTypingDot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* Quick actions */
.l1x-chat-quick__title {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.l1x-chat-quick__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.l1x-chat-quick__buttons button {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(201,169,106,0.14);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.l1x-chat-quick__buttons button:hover {
  border-color: rgba(201,169,106,0.35);
  background: rgba(201,169,106,0.06);
  transform: translateY(-1px);
}

/* Order input */
.l1x-chat-order-input {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.l1x-chat-order-input[hidden] {
  display: none !important;
}

.l1x-chat-order-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(201,169,106,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.l1x-chat-order-input input:focus {
  border-color: var(--gold);
}

.l1x-chat-order-input input::placeholder {
  color: rgba(255,255,255,0.30);
}

.l1x-chat-order-input button {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(201,169,106,0.25);
  background: rgba(201,169,106,0.08);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.l1x-chat-order-input button:hover {
  background: rgba(201,169,106,0.15);
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .l1x-chat-panel {
    right: 8px;
    left: 8px;
    bottom: 84px;
    width: auto;
    max-height: 70vh;
    border-radius: 20px;
  }

  .l1x-chat-bubble {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .l1x-chat-bubble,
  .l1x-chat-panel,
  .l1x-chat-msg,
  .l1x-chat-typing__dot {
    animation: none !important;
  }
}
