/**
 * FlyTravelay Popup - Pixel Perfect Adobe XD Implementation
 * Design Source: https://xd.adobe.com/view/5cdc15e8-c62d-4eeb-a27b-b66fd496ff0d-098f/specs/
 * Version: 2.0 - Exact Specifications
 */

/* ==================== Overlay Background (Adobe XD Specs) ==================== */
p, h2, h3, h4, h5, h6, span, div {
  font-family: 'Inter';
}

body {
  font-family: 'Inter';
}

div {
  font-family: 'inter';
}
.flytravelay-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 999999;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

.flytravelay-popup.show {
  display: flex;
  max-width: 100%;
}
a.popup-call-btn-large {
  text-decoration: none !important;
}
/* ==================== Popup Container Base ==================== */
.flytravelay-popup-content {
  background: #ffffff;
  color: #1f2937;
  padding: 40px;
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 45vh;
  overflow-y: auto;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3),
              0 8px 24px rgba(0, 0, 0, 0.2);
  transform: scale(0.85);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flytravelay-popup.show .flytravelay-popup-content {
  transform: scale(1);
  opacity: 1;
}

/* ==================== Modern Layout (Adobe XD Two-Column - Pixel Perfect) ==================== */
.flytravelay-popup-content.modern-layout {
  max-width:780px;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: row;
  text-align: left;
  background: #F5EFE7;
  border-radius: 24px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Left Content Area - Adobe XD Exact */
.flytravelay-popup-content.modern-layout .popup-left-content {
  flex: 1 1 55%;
  padding: 35px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

/* Right Image Area - Adobe XD Exact */
 .popup-right-image {
  flex: 0 0 45%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 0 24px 24px 0;
  min-height: 500px;
  position: relative;
}

/* Subtle gradient overlay on image for depth */
.flytravelay-popup-content.modern-layout .popup-right-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(245, 239, 231, 0.15) 0%, rgba(245, 239, 231, 0) 50%);
  pointer-events: none;
}

/* ==================== Top Tagline (Dashed Box) - Adobe XD Exact ==================== */
.popup-tagline {
  display: inline-block;
  padding: 10px 18px;
  border: 2px dashed #000000;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  color: #000000;
  margin: 0 0 20px 0;
  background: transparent;
  line-height: 1.4;
  letter-spacing: 0.3px;
  width: fit-content;
}

/* ==================== Title with Bold Discount - Adobe XD Exact ==================== */
.popup-title-with-discount {
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 10px 0;
  color: #1f2937;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.popup-title-with-discount .discount-percentage {
  font-weight: 900;
  color: #000000;
  font-size: 32px;
  letter-spacing: -0.5px;
}

.popup-title-with-discount strong {
  font-weight: 900;
  color: #0E7D3F;
  letter-spacing: -0.5px;
}

/* ==================== Availability Badge - Adobe XD Exact ==================== */
.popup-availability {
  display: inline-block;
  padding: 10px 20px;
  background: #FFA726;
  color: #000000;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter';
  border-radius: 20px;
  margin: 0 0 24px 0;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 167, 38, 0.25);
  width: fit-content;
}

/* ==================== Large Phone Button - Adobe XD Exact ==================== */
.popup-call-btn-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 15px 36px;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  background: #0E7D3F;
  text-decoration: none;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(14, 125, 63, 0.35),
              0 2px 8px rgba(14, 125, 63, 0.2);
  width: 80%;
  margin: 0 0 20px 0;
  letter-spacing: 0.5px;
  line-height: 1;
}
a.popup-call-btn-large {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 50px;
  animation: pulse 1.6s infinite;
  transform-origin: center;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(14, 125, 63, 0.6);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(14, 125, 63, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(14, 125, 63, 0);
  }
}


.popup-call-btn-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(14, 125, 63, 0.45),
              0 4px 12px rgba(14, 125, 63, 0.3);
  color: #ffffff;
  background: #0a6835;
  text-decoration: none;
}

.popup-call-btn-large:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14, 125, 63, 0.35);
}

.popup-call-btn-large svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  animation: ring 2.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ==================== Bottom Message - Adobe XD Exact ==================== */
.popup-bottom-message {
  font-size: 18px;
    line-height: 1.5;
    color: #000;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.1px;
}

/* ==================== Close Button (X) - Adobe XD Exact ==================== */
.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 32px;
  font-weight: 700;
  cursor: pointer;
  color: #333333;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  z-index: 10;
  border: 2px solid transparent;
}

/* .popup-close:hover {
  background: rgba(0, 0, 0, 0.25);
  transform: rotate(90deg) scale(1.1);
  color: #000000;
  border-color: rgba(0, 0, 0, 0.15);
}

.popup-close:active {
  transform: rotate(90deg) scale(1.05);
} */

/* ==================== Classic Layout ==================== */
.flytravelay-popup-content.classic-layout {
  text-align: center;
  padding: 40px;
  background: #ffffff;
}

/* ==================== Countdown Timer ==================== */
.popup-countdown {
  color: #ef4444;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 18px 0;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
}

.countdown-display {
  display: inline-block;
  font-size: 18px;
  letter-spacing: 1.2px;
  font-weight: 800;
}

/* ==================== Image (Classic Layout) ==================== */
.popup-image {
  margin: 0 0 24px 0;
  border-radius: 16px;
  overflow: hidden;
}

.popup-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* ==================== Title (Classic Layout) ==================== */
.popup-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: #1f2937;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

/* ==================== Content Text ==================== */
.popup-text {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 24px 0;
  color: #4b5563;
  font-weight: 400;
}

/* ==================== Price Display ==================== */
.popup-price {
  font-size: 48px;
  font-weight: 900;
  margin: 24px 0;
  line-height: 1;
  letter-spacing: -1px;
}

/* ==================== Call Button (Classic Layout) ==================== */
.popup-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 36px;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
  width: 100%;
  margin-top: 18px;
  letter-spacing: 0.3px;
  line-height: 1;
}

.popup-call-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
  color: #ffffff;
  text-decoration: none;
}

.popup-call-btn:active {
  transform: translateY(-1px);
}

.popup-call-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  animation: ring 2.5s ease-in-out infinite;
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes ring {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30% {
    transform: rotate(-12deg);
  }
  20%, 40% {
    transform: rotate(12deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

@keyframes slideIn {
  0% {
    transform: scale(0.85) translateY(30px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ==================== Scrollbar Styling ==================== */
.flytravelay-popup-content::-webkit-scrollbar {
  width: 10px;
}

.flytravelay-popup-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.flytravelay-popup-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.flytravelay-popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
  background-clip: padding-box;
}

/* ==================== Responsive Design (Adobe XD Breakpoints) ==================== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
  .flytravelay-popup-content.modern-layout {
    max-width: 750px;
  }
}

/* Desktop to Laptop (1024px - 1199px) */
@media (max-width: 1199px) {
  .flytravelay-popup-content.modern-layout {
    max-width: 860px;
  }

  .flytravelay-popup-content.modern-layout .popup-left-content {
    padding: 20px;
  }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) {
  .flytravelay-popup-content.modern-layout {
    max-width: 720px;
  }

  .flytravelay-popup-content.modern-layout .popup-left-content {
    padding: 40px 35px;
  }

  .popup-title-with-discount {
    font-size: 26px;
  }

  .popup-title-with-discount .discount-percentage {
    font-size: 30px;
  }

  .popup-call-btn-large {
    font-size: 24px;
    padding: 18px 32px;
  }
}


@media (max-width: 767px) {
  .flytravelay-popup-content.modern-layout {
      width: 96%!important;
      /* padding: 16px; */
      transform: translate(-50%, -50%);
      left: 0 !important;
      margin: 10px;
  }
}

/* Extra small devices (iPhone SE, old Android) */
@media (max-width: 400px) {
  a.popup-call-btn-large {
        padding: 12px;
    }
    .popup-availability{
      padding: 8px 12px;
    }
}


.flytravelay-popup-content.modern-layout {
  position: absolute;
  top: 30%;
  left: 30%;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
}


/* Tablet Portrait and Mobile Landscape (768px) */
@media (max-width: 767px) {
  .flytravelay-popup-content.modern-layout {
    flex-direction: row;
    max-width: 540px;
    width: 100%;
  }

  .flytravelay-popup-content.modern-layout .popup-left-content {
    flex: 1;
    padding: 35px 30px;
    order: 1;
  }

  .flytravelay-popup-content.modern-layout .popup-right-image {
    flex: 0 0 45%;
    border-radius: 0 0 24px 24px;
    min-height: 300px;
    order: 2;
  }

  .popup-title-with-discount {
    font-size: 14px;
  }

  .popup-title-with-discount .discount-percentage {
    font-size: 18px;
  }

  .popup-call-btn-large {
    font-size: 12px;
    padding: 16px 28px;
  }

  .popup-tagline {
    font-size: 14px;
    padding: 9px 16px;
    font-family: 'Inter';
  }

  .popup-availability {
    font-size: 13px;
    padding: 9px 18px;
  }

  .popup-bottom-message {
    font-size: 14px;
  }
}

/* Mobile Portrait (480px) */
@media (max-width: 479px) {
  .flytravelay-popup {
    padding: 15px;
    /* position: absolute; */
  }
  a.popup-call-btn-large {
    padding: 12px;
}
.popup-availability{
  padding: 8px 12px;
}

  .flytravelay-popup-content {
    width: 100%;
    padding: 15px;
    max-height: 95vh;
    border-radius: 20px;
  }

  .flytravelay-popup-content.modern-layout {
    width: 100%;
    border-radius: 20px;
  }

  .flytravelay-popup-content.modern-layout .popup-left-content {
    padding: 15px;
  }

  .flytravelay-popup-content.modern-layout .popup-right-image {
    flex: 0 0 45%;
    min-height: 260px;
    border-radius: 0 0 20px 20px;
  }

  .popup-title {
    font-size: 24px;
  }

  .popup-title-with-discount {
    font-size: 16px;
    font-family: 'Inter';
  }

  .popup-title-with-discount .discount-percentage {
    font-size: 24px;
  }

  .popup-text {
    font-size: 15px;
  }

  .popup-price {
    font-size: 36px;
  }

  .popup-call-btn,
  .popup-call-btn-large {
    font-size: 12px;
    padding: 15px 24px;
    width:100%;
  }

  .popup-call-btn-large svg {
    width: 20px;
    height: 20px;
  }

  .popup-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

  .popup-tagline {
    font-size: 10px;
    padding: 8px 4px;
  }

  .popup-availability {
    font-size: 12px;
    padding: 8px 16px;
    margin-bottom:10px;
  }

  .popup-bottom-message {
    font-size: 13px;
    line-height: 1.5;
  }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
  
  .flytravelay-popup {
    padding: 10px;
    position: absolute!important;
  }

  .flytravelay-popup-content.modern-layout .popup-left-content {
    padding: 15px;
  }

  .flytravelay-popup-content.modern-layout .popup-right-image {
    flex: 0 0 50%;
    min-height: 220px;
  }

  .popup-title-with-discount {
    font-size: 18px;
  }

  .popup-title-with-discount .discount-percentage {
    font-size: 22px;
  }

  .popup-call-btn-large {
    font-size: 16px;
    padding: 14px 20px;
  }

  .popup-call-btn-large svg {
    width: 20px;
    height: 20px;
  }

  .popup-bottom-message {
    font-size: 12px;
  }

  .popup-close {
    width: 34px;
    height: 34px;
    font-size: 24px;
  }
}

/* ==================== WordPress Editor Preview ==================== */
.popup-block-preview {
  border: 3px dashed #cbd5e1;
  padding: 30px 24px;
  text-align: center;
  background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
  border-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.popup-block-preview::before {
  content: '👁️ EDITOR PREVIEW - Popup Settings';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #0E7D3F;
  color: white;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(14, 125, 63, 0.3);
}

.popup-block-preview .preview-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: #1f2937;
}

.popup-block-preview .preview-info {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 12px 0;
  font-weight: 500;
}

.popup-block-preview .preview-badge {
  display: inline-block;
  padding: 8px 16px;
  background: #0E7D3F;
  color: white;
  border-radius: 8px;
  font-size: 13px;
  margin: 6px 4px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 125, 63, 0.25);
}

/* ==================== Accessibility (WCAG 2.1 AA) ==================== */
.popup-close:focus,
.popup-call-btn:focus,
.popup-call-btn-large:focus {
  outline: 3px solid #0E7D3F;
  outline-offset: 3px;
}

.popup-call-btn:focus-visible,
.popup-call-btn-large:focus-visible {
  outline: 3px solid #0E7D3F;
  outline-offset: 3px;
}

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==================== Reduced Motion Support ==================== */
@media (prefers-reduced-motion: reduce) {
  .flytravelay-popup,
  .flytravelay-popup-content,
  .popup-close,
  .popup-call-btn,
  .popup-call-btn-large,
  .popup-call-btn svg,
  .popup-call-btn-large svg {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== High Contrast Mode ==================== */
@media (prefers-contrast: high) {
  .flytravelay-popup-content {
    border: 3px solid currentColor;
  }

  .popup-call-btn,
  .popup-call-btn-large {
    border: 2px solid currentColor;
  }

  .popup-tagline {
    border-width: 3px;
  }
}

/* ==================== Print Styles ==================== */
@media print {
  .flytravelay-popup {
    display: none !important;
  }
}

/* ==================== Performance Optimizations ==================== */

/* Prevent text selection on interactive elements */
.popup-close,
.popup-call-btn,
.popup-call-btn-large,
.popup-tagline,
.popup-availability {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.popup-tagline {
  border-radius: 20px;
}

/* Hardware acceleration for smooth animations */
.flytravelay-popup,
.flytravelay-popup-content,
.popup-call-btn,
.popup-call-btn-large,
.popup-close {
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Smooth focus transitions */
*:focus {
  transition: outline-offset 0.2s ease;
}

/* Contain layout shifts */
.flytravelay-popup-content {
  contain: layout style paint;
}

/* Will-change for animated elements */
.popup-call-btn-large,
.popup-close {
  will-change: transform, box-shadow;
}

/* ==================== Dark Mode Support (Optional) ==================== */
@media (prefers-color-scheme: dark) {
  /* Uncomment if you want dark mode support */
  /*
  .flytravelay-popup {
    background: rgba(0, 0, 0, 0.85);
  }
  
  .flytravelay-popup-content.modern-layout {
    background: #2d2d2d;
    color: #f3f4f6;
  }
  
  .popup-title-with-discount {
    color: #f3f4f6;
  }
  
  .popup-bottom-message {
    color: #d1d5db;
  }
  */
}

/* ==================== Loading State (Optional Enhancement) ==================== */
.flytravelay-popup-content.loading {
  pointer-events: none;
  opacity: 0.7;
}

.flytravelay-popup-content.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid rgba(14, 125, 63, 0.2);
  border-top-color: #0E7D3F;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
