/* Reusable UI Components - Lunari Design System */

/* Standard Header */
.screen-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 246, 240, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(232, 221, 209, 0.6);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.screen-header.transparent {
  background: rgba(250, 246, 240, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(232, 221, 209, 0.4);
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.header-action {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: none;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.header-action:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.header-action svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Primary & Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  width: 100%;
  min-height: 52px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: var(--primary-glow);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(201, 24, 74, 0.36);
}

.btn-secondary {
  background-color: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-soft-border);
}

.btn-secondary:hover {
  background-color: var(--primary-soft-border);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  min-height: auto;
  padding: 8px 14px;
}

.btn-ghost:hover {
  color: var(--primary);
}

/* Social Buttons (matching Image 1) */
.social-buttons-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
}

.btn-social {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-social:hover {
  transform: translateY(-2px);
  border-color: var(--primary-soft-border);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.btn-social svg {
  width: 22px;
  height: 22px;
}

/* Form Inputs & Fields */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  width: 100%;
  text-align: left;
}

.input-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-body);
  line-height: 1.6;
  padding-top: 4px;
  padding-bottom: 2px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-field {
  width: 100%;
  height: 52px;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 18px;
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(248, 73, 113, 0.12);
}

.input-wrapper .input-icon-left {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-wrapper.has-icon-left .input-field {
  padding-left: 48px;
}

.input-wrapper .toggle-password-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-wrapper .toggle-password-btn:hover {
  color: var(--text-main);
}

/* Segmented Control / Pill Switcher (e.g. Sign In / Sign Up, kg / lb, cm / ft) */
.segmented-control {
  display: flex;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  position: relative;
  user-select: none;
}

.segmented-option {
  flex: 1;
  text-align: center;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  background: transparent;
}

.segmented-option.active {
  background-color: var(--bg-surface);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Badges & Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.pill-pink {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.pill-purple {
  background-color: var(--status-fertile-soft);
  color: var(--status-fertile);
}

.pill-blue {
  background-color: var(--status-follicular-soft);
  color: var(--status-follicular);
}

.pill-amber {
  background-color: var(--status-luteal-soft);
  color: var(--status-luteal);
}

.pill-green {
  background-color: var(--status-success-soft);
  color: var(--status-success);
}

/* Card Container */
.card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--primary-soft-border);
}

/* Modals & Bottom Sheets */
.sheet-backdrop,
.bottom-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 17, 26, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 250;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sheet-backdrop.open,
.bottom-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet,
.bottom-sheet-container {
  width: 100%;
  max-width: var(--app-max-width);
  background-color: var(--bg-surface);
  border-radius: 28px 28px 0 0;
  padding: 16px 20px calc(24px + var(--safe-area-bottom)) 20px;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  &::-webkit-scrollbar {
    display: none;
  }
}

.bottom-sheet::-webkit-scrollbar,
.bottom-sheet-container::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.sheet-backdrop.open .bottom-sheet,
.sheet-backdrop.open .bottom-sheet-container,
.bottom-sheet-backdrop.open .bottom-sheet,
.bottom-sheet-backdrop.open .bottom-sheet-container {
  transform: translateY(0);
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.btn-close-sheet {
  background: var(--bg-subtle);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-sheet:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

.sheet-handle {
  width: 44px;
  height: 5px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-full);
  margin: 0 auto 16px auto;
}

/* Interactive Horizontal Ruler Slider (Image 2) */
.ruler-slider-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  user-select: none;
  touch-action: pan-y;
  margin: 20px 0;
}

.ruler-value-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 24px;
}

.ruler-number {
  font-size: 52px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.ruler-unit {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.ruler-viewport {
  width: 100%;
  height: 90px;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
  cursor: grab;
}

.ruler-viewport:active {
  cursor: grabbing;
}

.ruler-track {
  display: flex;
  align-items: flex-end;
  height: 100%;
  position: absolute;
  top: 0;
  left: 50%;
  will-change: transform;
}

.ruler-tick {
  width: 2px;
  background-color: #D1D5DB;
  border-radius: 1px;
  margin-right: 14px;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.ruler-tick.small {
  height: 24px;
}

.ruler-tick.medium {
  height: 38px;
  background-color: #9CA3AF;
}

.ruler-tick.large {
  height: 54px;
  width: 2.5px;
  background-color: #6B7280;
  position: relative;
}

.ruler-tick-label {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ruler-center-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 64px;
  background: var(--primary-gradient);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(201, 24, 74, 0.45);
  pointer-events: none;
  z-index: 5;
}

.ruler-indicator-triangle {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--primary);
}

/* Interactive Smooth Scroll Wheel (Image 2 & 3) */
.scroll-wheel-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 220px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.wheel-selection-highlight {
  position: absolute;
  top: 50%;
  left: 4px;
  right: 4px;
  height: 48px;
  transform: translateY(-50%);
  background-color: var(--primary-soft);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--primary-soft-border);
  pointer-events: none;
  z-index: 1;
}

.scroll-wheel-column {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  position: relative;
  z-index: 2;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  text-align: center;
  touch-action: pan-y;
  &::-webkit-scrollbar {
    display: none;
  }
}

.scroll-wheel-column::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.wheel-item {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
  color: #9CA3AF;
  scroll-snap-align: center;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.wheel-item.selected {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  transform: scale(1.08);
}

.wheel-spacer {
  height: 86px;
  flex-shrink: 0;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  top: 54px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  background: #181820;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

