/**
 * Login/Profile Popout Styles
 * 
 * Modern, responsive styling with smooth animations and accessibility features.
 * Includes "pop out" effect that grows from the button with slight wobble.
 * 
 * @package ReallyDecentWomoguide
 * @since 1.0.0
 */

/* ================================
   Variables
   ================================ */
:root {
  --rd-lp-primary: #52c5ff;
  --rd-lp-primary-dark: #3aa8e0;
  --rd-lp-primary-darker: #2890c7;
  --rd-lp-text-dark: #1a1a1a;
  --rd-lp-text-light: #ffffff;
  --rd-lp-text-gray: #666666;
  --rd-lp-border: #e0e0e0;
  --rd-lp-success: #4caf50;
  --rd-lp-error: #f44336;
  --rd-lp-overlay-bg: rgba(0, 0, 0, 0.5);
  --rd-lp-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  --rd-lp-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --rd-lp-radius: 16px;
  --rd-lp-radius-sm: 8px;
  --rd-lp-transition: 0.3s ease;
  --rd-lp-viewport-height: 100vh;
}

/* ================================
   Button Styles
   ================================ */
.rd-lp-button {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 48px;
  background: #cccccc; /* Initial color - will be overridden by JS */
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--rd-lp-shadow-sm);
  transition: background-color 0.4s ease, transform var(--rd-lp-transition),
    box-shadow var(--rd-lp-transition);
  z-index: 9999;
}

/* Inline button (via shortcode) - same as default now */
.rd-lp-button-inline {
  display: inline-flex;
}

.rd-lp-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  filter: brightness(1.1);
}

.rd-lp-button:focus {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.rd-lp-button.active {
  transform: scale(0.95);
  filter: brightness(0.9);
}

.rd-lp-icon {
  width: 24px;
  height: 24px;
  color: var(--rd-lp-text-light);
  transition: transform var(--rd-lp-transition);
}

.rd-lp-button:hover .rd-lp-icon {
  transform: scale(1.1);
}

.rd-lp-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--rd-lp-error);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: white;
  border: 2px solid white;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .rd-lp-button {
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
  }

  .rd-lp-button-with-title {
    width: auto;
    padding: 8px 16px;
  }
}

/* ================================
   Button with Title (for menus)
   ================================ */
.rd-lp-button-with-title {
  width: auto;
  height: auto;
  padding: 10px 18px;
  border-radius: 24px;
  gap: 8px;
}

.rd-lp-button-with-title .rd-lp-icon {
  width: 20px;
  height: 20px;
}

.rd-lp-button-title {
  color: white;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Menu item style - more rectangular */
.rd-lp-button.rd-lp-menu-item {
  width: 100%;
  border-radius: var(--rd-lp-radius-sm);
  padding: 12px 16px;
  justify-content: flex-start;
}

/* ================================
   Overlay & Popout Container
   ================================ */
.rd-lp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--rd-lp-overlay-bg);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--rd-lp-transition);
  padding: 20px;
  /* Desktop: position below potential top bar (~56px) + some breathing room */
  padding-top: max(80px, 12vh);
}

/* Account for WP admin bar on desktop */
body.admin-bar .rd-lp-overlay {
  padding-top: max(112px, calc(32px + 12vh));
}

.rd-lp-overlay.rd-lp-open {
  opacity: 1;
}

/* Body scroll lock */
body.rd-lp-no-scroll {
  overflow: hidden;
}

/* ================================
   Popout Box with Animation
   ================================ */
.rd-lp-popout {
  position: relative;
  background: var(--rd-lp-primary);
  border-radius: var(--rd-lp-radius);
  box-shadow: var(--rd-lp-shadow);
  max-width: 780px;
  width: 100%;
  min-height: 420px;
  max-height: min(600px, 75vh);
  overflow: hidden;
  padding: 44px 20px 20px 20px;
  transform-origin: center top;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

/* Pop-in animation */
.rd-lp-popout.rd-lp-pop-in {
  opacity: 1;
  transform: scale(1);
  /* Removed animation to prevent double-trigger */
}

@keyframes rd-lp-wobble {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.95);
  }
  85% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

/* Scrollbar styling */
.rd-lp-popout::-webkit-scrollbar {
  width: 8px;
}

.rd-lp-popout::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.rd-lp-popout::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.rd-lp-popout::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .rd-lp-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 12px;
    /* Mobile: account for top bar (~56px) + safe area + small offset */
    padding-top: calc(env(safe-area-inset-top, 0px) + 68px);
    /* Account for bottom bar (~64px) + safe area */
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  }

  /* Account for WP admin bar on mobile */
  body.admin-bar .rd-lp-overlay {
    padding-top: calc(env(safe-area-inset-top, 0px) + 114px);
  }

  .rd-lp-popout {
    max-width: 100%;
    width: 100%;
    min-height: 380px;
    max-height: calc(
      var(--rd-lp-viewport-height, 100vh) - env(safe-area-inset-top, 0px) -
        env(safe-area-inset-bottom, 0px) - 156px
    );
    padding: 48px 16px 16px 16px;
    border-radius: var(--rd-lp-radius-sm);
    overflow-y: auto;
  }

  .rd-lp-dropdown {
    right: -10px;
    min-width: 180px;
  }

  /* Stack forms column properly */
  .rd-lp-logged-out {
    grid-template-columns: 1fr;
  }

  .rd-lp-benefits-column {
    display: none; /* Hide benefits on mobile to save space */
  }
}

/* ================================
   Close Button
   ================================ */
.rd-lp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--rd-lp-transition);
  z-index: 10;
}

.rd-lp-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.rd-lp-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ================================
   Loading State
   ================================ */
.rd-lp-loading {
  text-align: center;
  padding: 40px 20px;
  color: white;
}

.rd-lp-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: rd-lp-spin 0.8s linear infinite;
}

@keyframes rd-lp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   Two-Column Layout
   ================================ */
.rd-lp-logged-out {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
}

.rd-lp-forms-column {
  display: block;
  min-width: 0; /* Prevent grid blowout */
  overflow: hidden;
}

.rd-lp-benefits-column {
  /* Benefits and promo go here */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .rd-lp-logged-out {
    grid-template-columns: 1fr;
  }

  .rd-lp-benefits-column {
    flex-direction: row;
  }
}

/* ================================
   Tabs - side by side with visual indicators
   ================================ */
.rd-lp-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--rd-lp-radius-sm);
  padding: 4px;
}

.rd-lp-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--rd-lp-transition);
  position: relative;
}

.rd-lp-tab:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.rd-lp-tab.active {
  background: white;
  color: var(--rd-lp-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rd-lp-tab:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ================================
   Typography
   ================================ */
.rd-lp-popout h2 {
  color: white;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
  padding-right: 50px;
}

.rd-lp-popout h3 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.rd-lp-popout p {
  color: white;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 8px 0;
}

.rd-lp-popout ul {
  margin: 12px 0;
  padding-left: 0;
  list-style: none;
}

.rd-lp-popout ul li {
  color: white;
  font-size: 12px;
  line-height: 1.6;
  padding-left: 0;
}

/* ================================
   Form Fields
   ================================ */
.rd-lp-tab-content {
  display: none;
}

.rd-lp-tab-content.active {
  display: block;
}

.rd-lp-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.rd-lp-field label {
  flex: 0 0 110px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

/* Mobile: stack labels on top */
@media (max-width: 480px) {
  .rd-lp-field {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .rd-lp-field label {
    flex: none;
    text-align: left;
  }
}

.rd-lp-field input[type="text"],
.rd-lp-field input[type="email"],
.rd-lp-field input[type="password"] {
  flex: 1;
  min-width: 0; /* Allow flex item to shrink below content size */
  padding: 6px 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--rd-lp-radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--rd-lp-text-dark);
  font-size: 16px; /* Minimum 16px prevents iOS auto-zoom on focus */
  transition: all var(--rd-lp-transition);
}

/* Mobile: social buttons stack */
@media (max-width: 480px) {
  .rd-lp-social-buttons {
    flex-direction: column;
  }
}

.rd-lp-field input:focus {
  outline: none;
  border-color: white;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.rd-lp-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  margin-left: 122px; /* Align with input fields */
}

/* Mobile: remove left margin */
@media (max-width: 480px) {
  .rd-lp-field-row {
    margin-left: 0;
  }
}

/* Constrain button width */
.rd-lp-forms-column .rd-lp-button-primary,
.rd-lp-forms-column .rd-lp-button-secondary {
  width: 100%;
}

.rd-lp-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.rd-lp-checkbox input[type="checkbox"] {
  cursor: pointer;
}

/* ================================
   Buttons
   ================================ */
.rd-lp-button-primary,
.rd-lp-button-secondary {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border: none;
  border-radius: var(--rd-lp-radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--rd-lp-transition);
}

.rd-lp-button-primary {
  background: white;
  color: var(--rd-lp-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rd-lp-button-primary:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rd-lp-button-primary:active {
  transform: translateY(0);
}

.rd-lp-button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rd-lp-button-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.rd-lp-button-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Shop button - prominent CTA */
.rd-lp-button-shop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  border: none;
  border-radius: var(--rd-lp-radius-sm);
  color: white;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--rd-lp-transition);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
  margin-top: 16px;
}

.rd-lp-button-shop:hover {
  background: linear-gradient(135deg, #ff8555 0%, #ffaa3e 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.rd-lp-button-shop:active {
  transform: translateY(0);
}

.rd-lp-button-shop svg {
  flex-shrink: 0;
}

/* ================================
   Links
   ================================ */
.rd-lp-link {
  color: white;
  font-size: 14px;
  text-decoration: none;
  transition: opacity var(--rd-lp-transition);
}

.rd-lp-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ================================
   Error Messages
   ================================ */
.rd-lp-error {
  background: rgba(244, 67, 54, 0.9);
  color: white;
  padding: 12px 16px;
  border-radius: var(--rd-lp-radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

/* ================================
   CTA & Promo Sections
   ================================ */
.rd-lp-cta {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: var(--rd-lp-radius-sm);
  margin-bottom: 12px;
}

.rd-lp-cta strong {
  color: white;
}

.rd-lp-cta .rd-lp-button-primary {
  margin-top: 16px;
}

.rd-lp-promo-space {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: var(--rd-lp-radius-sm);
  margin-top: 0;
}

.rd-lp-promo-space:empty {
  display: none;
}

/* ================================
   Profile Header (Logged In)
   ================================ */
.rd-lp-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.rd-lp-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid white;
  object-fit: cover;
}

.rd-lp-profile-info {
  flex: 1;
}

.rd-lp-user-name {
  color: white;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.rd-lp-user-email {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 0;
}

/* ================================
   Profile Links
   ================================ */
.rd-lp-profile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.rd-lp-profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--rd-lp-radius-sm);
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all var(--rd-lp-transition);
}

.rd-lp-profile-link:hover {
  background: rgba(255, 255, 255, 0.3);
}

.rd-lp-profile-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Custom links container */
.rd-lp-custom-links {
  display: contents;
}

/* ================================
   Memberships Section
   ================================ */
.rd-lp-memberships {
  margin-bottom: 20px;
}

.rd-lp-memberships h3 {
  margin-top: 0;
}

.rd-lp-memberships-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rd-lp-membership-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--rd-lp-radius-sm);
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: all var(--rd-lp-transition);
}

.rd-lp-membership-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}

.rd-lp-membership-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ================================
   Logout Section
   ================================ */
.rd-lp-logout-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.rd-lp-logout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--rd-lp-radius-sm);
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all var(--rd-lp-transition);
}

.rd-lp-logout-button:hover {
  background: rgba(244, 67, 54, 0.3);
}

.rd-lp-logout-button svg {
  width: 18px;
  height: 18px;
}

/* ================================
   Accessibility
   ================================ */
.rd-lp-button:focus-visible,
.rd-lp-close:focus-visible,
.rd-lp-tab:focus-visible,
.rd-lp-button-primary:focus-visible,
.rd-lp-button-secondary:focus-visible,
.rd-lp-profile-link:focus-visible,
.rd-lp-logout-button:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
}

.rd-lp-field input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Screen reader only text */
.rd-lp-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;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 480px) {
  .rd-lp-popout h2 {
    font-size: 20px;
  }

  .rd-lp-field-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  .rd-lp-tabs {
    flex-direction: row;
  }
}

/* ================================
   Dropdown Menu (Logged In)
   ================================ */
.rd-lp-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: var(--rd-lp-radius-sm);
  box-shadow: var(--rd-lp-shadow);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--rd-lp-transition);
  z-index: 10000;
}

.rd-lp-button.rd-lp-dropdown-open .rd-lp-dropdown,
.rd-lp-button.rd-lp-logged-in:hover .rd-lp-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.rd-lp-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--rd-lp-text-dark);
  text-decoration: none;
  font-size: 14px;
  transition: background var(--rd-lp-transition);
  border-bottom: 1px solid var(--rd-lp-border);
}

.rd-lp-dropdown-item:last-child {
  border-bottom: none;
}

.rd-lp-dropdown-item:hover {
  background: #f5f5f5;
}

.rd-lp-dropdown-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--rd-lp-text-gray);
}

.rd-lp-dropdown-item.rd-lp-logout {
  color: var(--rd-lp-error);
}

.rd-lp-dropdown-item.rd-lp-logout svg {
  color: var(--rd-lp-error);
}

/* Logout button in dropdown - reset button styles */
button.rd-lp-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

button.rd-lp-dropdown-item:hover {
  background: #f5f5f5;
}

/* ================================
   Logout Success/Error States
   ================================ */
.rd-lp-logout-success,
.rd-lp-logout-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
}

.rd-lp-logout-success svg {
  color: var(--rd-lp-success);
  animation: rd-lp-checkmark 0.4s ease-out;
}

.rd-lp-logout-success p,
.rd-lp-logout-error p {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

@keyframes rd-lp-checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ================================
   Trigger Link (opens popout)
   ================================ */
.rd-lp-trigger-link {
  color: var(--rd-lp-primary);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
  transition: color var(--rd-lp-transition);
}

.rd-lp-trigger-link:hover {
  color: var(--rd-lp-primary-dark);
}

/* ================================
   Inline Form (embedded in page)
   ================================ */
.rd-lp-inline-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 24px;
  background: var(--rd-lp-primary);
  border-radius: var(--rd-lp-radius);
  box-shadow: var(--rd-lp-shadow-sm);
}

.rd-lp-inline-form .rd-lp-tabs {
  margin-bottom: 20px;
}

.rd-lp-inline-form .rd-lp-field {
  margin-bottom: 16px;
}

.rd-lp-inline-form .rd-lp-field label {
  display: block;
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.rd-lp-inline-form .rd-lp-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--rd-lp-radius-sm);
  background: rgba(255, 255, 255, 0.95);
  color: var(--rd-lp-text-dark);
  font-size: 16px; /* Minimum 16px prevents iOS auto-zoom on focus */
  transition: all var(--rd-lp-transition);
}

.rd-lp-inline-form .rd-lp-field input:focus {
  outline: none;
  border-color: white;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.rd-lp-inline-form .rd-lp-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.rd-lp-inline-form .rd-lp-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.rd-lp-inline-form .rd-lp-link {
  color: white;
  font-size: 13px;
}

.rd-lp-inline-form .rd-lp-error {
  margin-bottom: 16px;
}

.rd-lp-inline-form .rd-lp-button-primary {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
}

/* Logged in message in inline form */
.rd-lp-inline-logged-in {
  text-align: center;
  padding: 20px;
}

.rd-lp-inline-logged-in p {
  color: white;
  font-size: 16px;
  margin-bottom: 16px;
}

.rd-lp-inline-logged-in .rd-lp-button-primary {
  display: inline-block;
  width: auto;
  padding: 12px 24px;
}

/* ================================
   Social Login Buttons
   ================================ */
.rd-lp-social-login {
  margin-top: 20px;
}

.rd-lp-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
}

.rd-lp-divider::before,
.rd-lp-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.rd-lp-divider span {
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rd-lp-social-buttons {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.rd-lp-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--rd-lp-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--rd-lp-transition);
}

.rd-lp-social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rd-lp-social-btn:active {
  transform: translateY(0);
}

.rd-lp-social-btn svg {
  flex-shrink: 0;
}

/* Google button */
.rd-lp-social-google {
  background: white;
  color: #444;
  border: 1px solid #ddd;
}

.rd-lp-social-google:hover {
  background: #f8f8f8;
  border-color: #ccc;
}

/* Facebook button */
.rd-lp-social-facebook {
  background: #1877f2;
  color: white;
}

.rd-lp-social-facebook:hover {
  background: #166fe5;
}

/* Apple button */
.rd-lp-social-apple {
  background: #000;
  color: white;
}

.rd-lp-social-apple:hover {
  background: #333;
}

/* Inline form social buttons - slightly different styling */
.rd-lp-inline-form .rd-lp-social-login {
  margin-top: 16px;
}

.rd-lp-inline-form .rd-lp-divider::before,
.rd-lp-inline-form .rd-lp-divider::after {
  border-color: rgba(255, 255, 255, 0.4);
}

/* Print Styles
   ================================ */
@media print {
  .rd-lp-button,
  .rd-lp-overlay,
  .rd-lp-dropdown {
    display: none !important;
  }
}
