/*
 * JXY Blog Category Quotation Widget
 * Responsive, dependency-free front-end styles.
 */

.jxy-quote-widget,
.jxy-quote-widget * {
  box-sizing: border-box;
}

.jxy-quote-widget {
  --jxy-primary: #ff5a14;
  --jxy-heading: #0b2c5c;
  --jxy-text: #1f2937;
  --jxy-muted: #5e6b7a;
  --jxy-border: #d8dee8;
  --jxy-card: rgba(255, 255, 255, 0.96);
  --jxy-shadow: 0 18px 48px rgba(13, 37, 68, 0.18);
  --jxy-bg-image: none;

  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0px auto;
  padding: clamp(34px, 5vw, 70px) 18px;
  color: var(--jxy-text);
  background:
    linear-gradient(180deg, rgba(242, 248, 255, 0.86), rgba(232, 242, 250, 0.9)),
    var(--jxy-bg-image) center / cover no-repeat;
  border-radius: 10px;
  font-family: Arial, Helvetica, sans-serif;
  isolation: isolate;
}

.jxy-quote-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.05));
}

.jxy-quote-inner {
  width: min(100%, 760px);
  margin: 0 auto;
}

.jxy-quote-header {
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
}

.jxy-quote-title {
  margin: 0 0 10px;
  color: var(--jxy-heading);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.jxy-quote-intro {
  max-width: 690px;
  margin: 0 auto;
  color: #455468;
  font-size: 16px;
  line-height: 1.65;
}

.jxy-quote-form {
  padding: clamp(22px, 4vw, 34px);
  background: var(--jxy-card);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  box-shadow: var(--jxy-shadow);
  backdrop-filter: blur(4px);
}

.jxy-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.jxy-field {
  min-width: 0;
}

.jxy-field--full {
  grid-column: 1 / -1;
}

.jxy-field label,
.jxy-field legend {
  display: block;
  margin: 0 0 7px;
  color: #1d2b3c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.jxy-required {
  color: #d73131;
}

.jxy-field input,
.jxy-field select,
.jxy-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: #152033;
  background: #fff;
  border: 1px solid var(--jxy-border);
  border-radius: 4px;
  outline: none;
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.jxy-field textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.55;
}

.jxy-field input::placeholder,
.jxy-field textarea::placeholder {
  color: #98a2b1;
}

.jxy-field input:focus,
.jxy-field select:focus,
.jxy-field textarea:focus {
  border-color: var(--jxy-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--jxy-primary) 18%, transparent);
}

.jxy-multiselect {
  margin: 0;
  border: 0;
  padding: 0;
}

.jxy-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid var(--jxy-border);
  border-radius: 4px;
}

.jxy-check-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.jxy-check-option input {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--jxy-primary);
}

.jxy-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 12px;
  align-items: end;
}

.jxy-captcha-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  overflow: hidden;
  color: #6c7787;
  background: #f4f6f9;
  border: 1px solid var(--jxy-border);
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

.jxy-captcha-image img {
  display: block;
  width: 100%;
  height: 44px;
  object-fit: contain;
}

.jxy-captcha-refresh {
  min-height: 46px;
  padding: 0 7px;
  color: #315f9f;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
}

.jxy-captcha-refresh:hover,
.jxy-captcha-refresh:focus-visible {
  text-decoration: underline;
}

.jxy-form-actions {
  margin-top: 24px;
  text-align: center;
}

.jxy-submit {
  width: min(100%, 430px);
  min-height: 50px;
  padding: 12px 24px;
  color: #fff;
  background: var(--jxy-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--jxy-primary) 28%, transparent);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  transition: transform .18s ease, filter .18s ease;
}

.jxy-submit:hover {
  filter: brightness(.95);
  transform: translateY(-1px);
}

.jxy-submit:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--jxy-primary) 30%, white);
  outline-offset: 3px;
}

.jxy-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 12px 0 0;
  color: var(--jxy-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.jxy-privacy::before {
  content: "🔒";
  font-size: 12px;
}

.jxy-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.jxy-widget-error {
  padding: 18px;
  color: #8b1d1d;
  background: #fff3f3;
  border: 1px solid #f0baba;
  border-radius: 8px;
}

@media (max-width: 720px) {
  .jxy-quote-widget {
    margin: 32px auto;
    padding: 34px 12px;
    border-radius: 0;
  }

  .jxy-form-grid,
  .jxy-check-grid {
    grid-template-columns: 1fr;
  }

  .jxy-captcha-row {
    grid-template-columns: 1fr 125px;
  }

  .jxy-captcha-refresh {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 28px;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jxy-field input,
  .jxy-field select,
  .jxy-field textarea,
  .jxy-submit {
    transition: none;
  }
}
