/* =========================================================
   Titan Publisher – Library Quote Popup
   Prefix: .tp-quote-*  (safe to drop onto any existing page)
   ========================================================= */

.tp-quote-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2.5vw, 1.75rem);
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.tp-quote-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tp-quote-overlay[hidden] {
  display: none;
}

.tp-quote-overlay.is-open[hidden] {
  display: flex;
}

.tp-quote-popup {
  position: relative;
  width: min(100%, 1080px);
  max-height: min(92vh, 720px);
  overflow: auto;
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  background-color: #1a2430;
  background-image:
    linear-gradient(180deg, rgba(10, 16, 24, 0.55) 0%, rgba(10, 16, 24, 0.62) 100%),
    url("../images/banner1.jpg");
  background-size: cover;
  background-position: center;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.32s ease;
}

.tp-quote-overlay.is-open .tp-quote-popup {
  transform: translateY(0) scale(1);
}

.tp-quote-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #e43030;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.tp-quote-close:hover,
.tp-quote-close:focus-visible {
  background: #c01f1f;
  transform: scale(1.06);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.tp-quote-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3.25rem);
  min-height: 520px;
}

/* ---------- Left column ---------- */

.tp-quote-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tp-quote-stack {
  position: relative;
  width: min(100%, 280px);
  height: 300px;
  margin: 0 auto 1.1rem;
}

.tp-quote-cover {
  position: absolute;
  left: 50%;
  width: 168px;
  height: 230px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
  background: #111;
}

.tp-quote-cover--back {
  bottom: 18px;
  transform: translateX(-50%) rotate(-11deg) translateX(-42px);
  z-index: 1;
}

.tp-quote-cover--mid {
  bottom: 10px;
  transform: translateX(-50%) rotate(8deg) translateX(46px);
  z-index: 2;
}

.tp-quote-cover--front {
  bottom: 28px;
  width: 176px;
  height: 246px;
  transform: translateX(-50%) rotate(-2deg);
  z-index: 3;
  box-shadow:
    8px 0 0 -2px #d7d2c8,
    10px 12px 24px rgba(0, 0, 0, 0.4);
}

.tp-quote-ready {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 0.72rem 1.6rem;
  margin: 0 0 0.85rem;
  border-radius: 999px;
  background: #1a6ea8;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(12, 25, 39, 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.tp-quote-ready:hover,
.tp-quote-ready:focus-visible {
  background: #155a8a;
  color: #fff;
  transform: translateY(-2px);
}

.tp-quote-tagline {
  margin: 0;
  max-width: 16ch;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* ---------- Right column ---------- */

.tp-quote-form-wrap {
  max-width: 460px;
  margin-left: auto;
  width: 100%;
}

.tp-quote-title {
  margin: 0 0 1.15rem;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.2rem, 2.1vw, 1.55rem);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.tp-quote-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.tp-quote-input {
  width: 100%;
  height: 48px;
  padding: 0.7rem 1.05rem;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #141414;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.tp-quote-input::placeholder {
  color: #6b7280;
}

.tp-quote-input:focus {
  outline: 2px solid #b78c50;
  outline-offset: 2px;
}

.tp-quote-textarea {
  height: 110px;
  min-height: 110px;
  resize: vertical;
  padding-top: 0.85rem;
}

.tp-quote-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.tp-quote-submit {
  min-width: 210px;
  height: 48px;
  padding: 0 1.6rem;
  border: 0;
  border-radius: 999px;
  background: #1a6ea8;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(12, 25, 39, 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.tp-quote-submit:hover,
.tp-quote-submit:focus-visible {
  background: #155a8a;
  transform: translateY(-2px);
}

.tp-quote-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.tp-quote-error {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: rgba(228, 48, 48, 0.92);
  color: #fff;
  font-size: 0.85rem;
}

.tp-quote-honeypot {
  display: none !important;
  visibility: hidden;
  position: absolute;
  left: -9999px;
}

.tp-quote-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.tp-quote-locked {
  overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .tp-quote-popup {
    max-height: 94vh;
  }

  .tp-quote-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 3.25rem 1.25rem 1.5rem;
    gap: 1rem;
  }

  .tp-quote-form-wrap {
    max-width: none;
    margin: 0;
  }

  .tp-quote-stack {
    height: 230px;
    width: min(100%, 220px);
    margin-bottom: 0.75rem;
  }

  .tp-quote-cover {
    width: 120px;
    height: 168px;
  }

  .tp-quote-cover--front {
    width: 128px;
    height: 180px;
  }

  .tp-quote-tagline {
    max-width: none;
  }

  .tp-quote-actions {
    justify-content: center;
  }

  .tp-quote-submit,
  .tp-quote-ready {
    width: min(100%, 280px);
  }
}

@media (max-width: 480px) {
  .tp-quote-overlay {
    padding: 0.5rem;
  }

  .tp-quote-title {
    text-align: left;
  }

  .tp-quote-visual {
    display: none;
  }

  .tp-quote-grid {
    padding: 3rem 1rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tp-quote-overlay,
  .tp-quote-popup,
  .tp-quote-close,
  .tp-quote-ready,
  .tp-quote-submit {
    transition: none;
  }
}
