/**
 * Saint Dutch Chat Widget Styles
 * Floating chat button with modal contact form
 */

/* ===== Chat Container ===== */
.sd-chat-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
}

.sd-chat-container * {
  pointer-events: auto;
}

/* ===== Chat Button (Floating) ===== */
.sd-chat-button {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--almost-black);
  color: var(--gardenia);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sd-chat-button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background: var(--accent);
}

.sd-chat-button:active {
  transform: scale(0.95);
}

.sd-chat-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Question Mark */
.sd-chat-question {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--gardenia);
  line-height: 1;
}

/* ===== Chat Modal ===== */
.sd-chat-modal {
  position: fixed;
  bottom: 100px;
  left: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  background: var(--gardenia);
  border: 1px solid rgba(184, 174, 166, 0.5);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 80vh;
  overflow: hidden;
  color: var(--almost-black);
}

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

/* ===== Modal Header ===== */
.sd-chat-header {
  padding: 28px 24px;
  border-bottom: 1px solid rgba(184, 174, 166, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.sd-chat-header h3 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--almost-black);
  letter-spacing: -0.5px;
}

.sd-chat-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sd-chat-close:hover {
  color: var(--almost-black);
  transform: scale(1.1);
}

/* ===== Modal Body ===== */
.sd-chat-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ===== Form Sections ===== */
.sd-form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sd-form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--almost-black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Checkbox/Radio Group ===== */
.sd-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sd-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sd-checkbox-label:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--cobblestone);
}

.sd-checkbox-input {
  appearance: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.sd-checkbox-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--cobblestone);
  border-radius: 50%;
  margin-right: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sd-checkbox-input:checked + .sd-checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 189, 89, 0.15);
}

.sd-checkbox-input:checked + .sd-checkbox-custom::after {
  content: '✓';
  color: var(--almost-black);
  font-size: 14px;
  font-weight: 700;
}

.sd-checkbox-text {
  font-size: 14px;
  color: var(--almost-black);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Form Groups ===== */
.sd-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sd-form-input,
.sd-form-textarea {
  padding: 14px 16px;
  border: 1px solid rgba(184, 174, 166, 0.5);
  border-radius: 10px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--almost-black);
  transition: all 0.2s ease;
  background: var(--white);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.sd-form-input:focus,
.sd-form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02), 0 0 0 3px rgba(255, 189, 89, 0.1);
  background: var(--white);
}

.sd-form-textarea {
  resize: vertical;
  min-height: 100px;
  font-size: 14px;
  line-height: 1.6;
}

.sd-form-input::placeholder,
.sd-form-textarea::placeholder {
  color: rgba(184, 174, 166, 0.7);
}

.sd-form-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Form Actions ===== */
.sd-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.sd-btn {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.sd-btn-primary {
  background: var(--accent);
  color: var(--almost-black);
  box-shadow: 0 2px 8px rgba(255, 189, 89, 0.2);
}

.sd-btn-primary:hover {
  background: #ffc956;
  box-shadow: 0 6px 16px rgba(255, 189, 89, 0.35);
  transform: translateY(-1px);
}

.sd-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 189, 89, 0.2);
}

.sd-btn-secondary {
  background: transparent;
  border: 1.5px solid rgba(184, 174, 166, 0.6);
  color: var(--almost-black);
}

.sd-btn-secondary:hover {
  border-color: var(--almost-black);
  color: var(--almost-black);
  background: rgba(0, 0, 0, 0.03);
}

/* ===== Success Message ===== */
.sd-success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  text-align: center;
}

.sd-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--almost-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}

.sd-success-message h4 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--almost-black);
}

.sd-success-message p {
  font-size: 14px;
  color: var(--almost-black);
  margin: 0;
  line-height: 1.6;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Error Message ===== */
.sd-error-message {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  color: #c82333;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 500;
}

/* ===== Responsive Design ===== */
@media (max-width: 600px) {
  .sd-chat-modal {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    animation: slideInUpMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes slideInUpMobile {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .sd-chat-button {
    bottom: 16px;
    left: 16px;
  }

  .sd-form-actions {
    flex-direction: column-reverse;
  }

  .sd-btn {
    width: 100%;
  }
}

/* ===== Dark Mode / Print ===== */
@media (prefers-color-scheme: dark) {
  /* Keep light theme for chat widget regardless of system preference */
  .sd-chat-modal {
    background: var(--gardenia) !important;
    border-color: var(--cobblestone) !important;
    color: var(--almost-black) !important;
  }

  .sd-form-input,
  .sd-form-textarea {
    background: var(--white) !important;
    color: var(--almost-black) !important;
    border-color: var(--cobblestone) !important;
  }

  .sd-checkbox-text,
  .sd-chat-header h3,
  .sd-form-label {
    color: var(--almost-black) !important;
  }

  .sd-form-input::placeholder,
  .sd-form-textarea::placeholder {
    color: var(--cobblestone) !important;
  }
}

@media print {
  .sd-chat-container {
    display: none !important;
  }
}