/* ==========================================================================
   JEPIXO VIDEO PRODUCTION - MODAL & LIGHTBOX STYLES
   100% Strictly scoped to #jpx-global-modal and .jpx-strategy-modal
   ========================================================================== */

/* WordPress Admin Bar Compatibility */
body.admin-bar #jpx-global-modal,
body.admin-bar .jpx-strategy-modal {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  body.admin-bar #jpx-global-modal,
  body.admin-bar .jpx-strategy-modal {
    top: 46px !important;
  }
}

/* 1. Global Video / Photo Lightbox Modal (#jpx-global-modal) */
#jpx-global-modal.jpx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

#jpx-global-modal.is-active,
#jpx-global-modal.active {
  display: flex !important;
  animation: jpxFadeIn 0.25s ease;
}

#jpx-global-modal .jpx-modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#jpx-global-modal .jpx-modal-dialog.is-short {
  max-width: 420px;
}

#jpx-global-modal .jpx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #18181b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#jpx-global-modal .jpx-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

#jpx-global-modal .jpx-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background-color 0.2s;
}

#jpx-global-modal .jpx-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

#jpx-global-modal .jpx-modal-body {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

#jpx-global-modal .jpx-modal-dialog.is-short .jpx-modal-body {
  aspect-ratio: 9 / 16;
  max-height: 80vh;
}

#jpx-global-modal .jpx-modal-body iframe,
#jpx-global-modal .jpx-modal-body video,
#jpx-global-modal .jpx-modal-body img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 2. Strategy Call Lead Generation Modal (.jpx-strategy-modal) */
.jpx-strategy-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.jpx-strategy-modal.is-visible {
  display: flex !important;
  animation: jpxFadeIn 0.25s ease;
}

.jpx-strategy-modal .jpx-strategy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.jpx-strategy-modal .jpx-strategy-modal-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
}

.jpx-strategy-modal .jpx-strategy-modal-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 38px 36px 34px 36px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.04);
  position: relative;
}

.jpx-strategy-modal .jpx-strategy-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jpx-strategy-modal .jpx-strategy-modal-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.jpx-strategy-modal .jpx-strategy-modal-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.jpx-strategy-modal .jpx-strategy-modal-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
  text-align: center;
}

.jpx-strategy-modal .jpx-strategy-modal-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.jpx-strategy-modal .jpx-strategy-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jpx-strategy-modal .jpx-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jpx-strategy-modal .jpx-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 540px) {
  .jpx-strategy-modal .jpx-form-row {
    grid-template-columns: 1fr;
  }
}

.jpx-strategy-modal .jpx-form-label {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.jpx-strategy-modal .jpx-req-star {
  color: #ef4444;
}

.jpx-strategy-modal .jpx-form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.jpx-strategy-modal .jpx-form-control:focus {
  border-color: #046bd2;
  box-shadow: 0 0 0 3px rgba(4, 107, 210, 0.15);
}

.jpx-strategy-modal .jpx-form-textarea {
  resize: vertical;
  min-height: 70px;
}

.jpx-strategy-modal .jpx-field-error {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: #ef4444;
  display: none;
}

.jpx-strategy-modal .jpx-field-error.is-active {
  display: block;
}

.jpx-strategy-modal .jpx-strategy-submit-btn {
  background: #046bd2;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(4, 107, 210, 0.35);
  width: 100%;
  text-align: center;
}

.jpx-strategy-modal .jpx-strategy-submit-btn:hover {
  background: #045cb4;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(4, 107, 210, 0.45);
}

.jpx-strategy-modal .jpx-strategy-modal-success {
  text-align: center;
  padding: 16px 8px 8px 8px;
}

.jpx-strategy-modal .jpx-success-icon-bubble {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.jpx-strategy-modal .jpx-success-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #166534;
  margin: 0 0 8px 0;
}

.jpx-strategy-modal .jpx-success-text {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

@keyframes jpxFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
