/* ============================================
   Redemption Layer — get-online.uk
   Neutral system style. Does not inherit site design.
   ============================================ */

/* --- Shared --- */
.rd-business-name {
  font-weight: 600;
}

/* --- Top Banner --- */
#redemption-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  color: #e0e0e0;
}

#redemption-banner[hidden] { display: none; }

.rd-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.rd-banner-text a {
  color: #a0a0a0;
  text-decoration: underline;
}

.rd-banner-cta {
  background: #fff;
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
}

.rd-banner-cta:hover { background: #e8e8e8; }

.rd-banner-dismiss {
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
  margin-left: auto;
}

.rd-banner-dismiss:hover { color: #fff; }

/* Banner offset for sticky nav — adds top padding to body */
body.rd-banner-visible {
  padding-top: var(--rd-banner-offset, 42px);
}

body.rd-banner-visible header {
  top: var(--rd-banner-offset, 42px);
}

/* --- Modal Backdrop --- */
#redemption-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: system-ui, -apple-system, sans-serif;
}

#redemption-modal[hidden] { display: none; }

.rd-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

/* --- Modal Box --- */
.rd-modal-box {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  color: #1a1a1a;
}

.rd-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.15s;
}

.rd-modal-close:hover { background: #ddd; }

/* --- Modal Logo --- */
.rd-modal-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.rd-logo-mark {
  background: #1a1a1a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.rd-logo-text {
  font-size: 0.8rem;
  color: #888;
  font-weight: 400;
}

/* --- Modal Content --- */
.rd-modal-heading {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: #111;
}

.rd-modal-sub {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

/* --- Form --- */
.rd-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rd-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rd-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rd-field input {
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fafafa;
  transition: border-color 0.15s;
  outline: none;
}

.rd-field input:focus {
  border-color: #888;
  background: #fff;
}

.rd-field input.rd-invalid {
  border-color: #c0392b;
}

.rd-error {
  font-size: 0.78rem;
  color: #c0392b;
  display: none;
}

.rd-field input.rd-invalid + .rd-error {
  display: block;
}

.rd-submit {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.25rem;
  transition: background 0.15s;
}

.rd-submit:hover { background: #333; }

.rd-submit:disabled {
  background: #555;
  cursor: wait;
}

.rd-consent {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  margin: 0;
}

.rd-consent a {
  color: #888;
  text-decoration: underline;
}

.rd-status[hidden] { display: none; }

.rd-status {
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

.rd-status-error {
  color: #c0392b;
}

/* --- Success state --- */
.rd-success[hidden] { display: none; }

.rd-success {
  text-align: center;
  padding: 1rem 0;
}

.rd-success-icon {
  width: 48px;
  height: 48px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
}

.rd-success-heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #111;
}

.rd-success-sub {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* --- Floating Pill --- */
.rd-pill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 8900;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: system-ui, -apple-system, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.15s, background 0.15s;
}

.rd-pill:hover {
  background: #333;
  transform: translateY(-2px);
}

.rd-pill-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: rd-pulse 2s infinite;
}

@keyframes rd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .rd-modal-box {
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
  }
  #redemption-modal {
    align-items: flex-end;
    padding: 0;
  }
  .rd-pill {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    padding: 0.55rem 0.9rem;
  }
}
