/**
 * Rank One discount popup.
 *
 * Colors come from CSS custom properties (--rop-bg / --rop-btn) injected
 * inline by PHP so they stay admin-configurable. Values here are fallbacks.
 * All selectors are prefixed .rop- to avoid collisions with the theme,
 * Elementor, or the booking engine.
 */

.rop-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(48, 69, 92, 0.46);
  overflow-y: auto;
  opacity: 0;
  transition: opacity .25s ease;
}

.rop-overlay[hidden] { display: none; }
.rop-overlay.rop-visible { opacity: 1; }

.rop-modal {
  position: relative;
  width: 100%;
  max-width: 545px;
  margin: auto;
  background: var(--rop-bg, #028090);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  transform: translateY(12px);
  transition: transform .25s ease;
}

.rop-overlay.rop-visible .rop-modal { transform: translateY(0); }

.rop-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
}
.rop-close:hover { opacity: 1; }
.rop-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

.rop-panel { padding: 40px 36px 32px; text-align: center; }

.rop-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
}

.rop-sub {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  line-height: 1.5;
}

.rop-form { text-align: left; }

.rop-label {
  display: block;
  margin: 0 0 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.rop-input {
  display: block;
  width: 100%;
  margin: 0 0 15px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
  background: #fff;
  color: #222;
  font-size: 16px; /* 16px avoids iOS zoom-on-focus */
  line-height: 1.3;
  box-sizing: border-box;
}
.rop-input:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}
.rop-input.rop-invalid {
  border-color: #ffd0d2;
  box-shadow: 0 0 0 3px rgba(255, 89, 94, .35);
}

.rop-btn {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 14px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--rop-btn, #FE595E);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s ease;
}
.rop-btn:hover:not(:disabled) { filter: brightness(1.07); }
.rop-btn:disabled { opacity: .65; cursor: default; }
.rop-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.rop-error {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .22);
  color: #fff;
  font-size: 13.5px;
}
.rop-error[hidden] { display: none; }

.rop-fine {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .75);
  font-size: 11.5px;
  text-align: center;
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.rop-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Success state */
.rop-success[hidden] { display: none; }
.rop-check {
  width: 58px;
  height: 58px;
  margin: 4px auto 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 30px;
  line-height: 58px;
}
.rop-success-text {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 600px) {
  /* Sheet that hugs its content and sits at the bottom of the viewport --
     a full-height panel leaves a large empty band under the button. */
  .rop-overlay { padding: 0; align-items: flex-end; }
  .rop-modal {
    max-width: none;
    margin: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .rop-overlay.rop-visible .rop-modal { transform: translateY(0); }
  .rop-panel { padding: 30px 22px calc(26px + env(safe-area-inset-bottom, 0px)); }
  .rop-title { font-size: 22px; }
  .rop-close { top: 8px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .rop-overlay, .rop-modal { transition: none; }
}
