import styled, { css } from 'styled-components'; import { getMediaQuery, applyDarkMode } from '../../utils'; /* ─── Shared CSS helpers ──────────────────────────────────────────────── */ const inputBorderStyles = ($hasError?: boolean) => css` border: 1px solid ${$hasError ? '#cc0000' : '#cccccc'}; &:focus { border-color: ${$hasError ? '#cc0000' : '#005c8a'}; } `; const INPUT_DARK_MODE = ` background-color: #2a2a2a !important; color: #cccccc !important; border-color: #555555 !important; &:focus { border-color: #74bade !important; } `; export const FormOverlay = styled.div<{ isApp?: boolean }>` position: fixed; top: ${({ isApp }) => (isApp ? '0' : '60px')}; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 999; display: flex; justify-content: center; align-items: center; padding: 16px; overflow: hidden; overscroll-behavior: none; ${getMediaQuery('xs', 'md')} { top: 0; padding: 0; align-items: center; } `; export const FormContainer = styled.div<{ isApp?: boolean }>` background-color: #ffffff; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; overscroll-behavior: contain; padding: 32px; position: relative; margin: auto; ${getMediaQuery('xs', 'md')} { padding: 48px 16px 48px 16px; padding-top: 48px; max-width: 100%; max-height: 100vh; -webkit-overflow-scrolling: touch; } ${({ isApp }) => applyDarkMode( ` background-color: #1d1d1b !important; color: #cccccc !important; `, isApp )}; `; export const CloseButton = styled.button` position: absolute; top: 16px; right: 16px; background: none; border: none; cursor: pointer; font-size: 24px; color: #333333; padding: 4px; line-height: 1; &:hover { color: #000000; } ${getMediaQuery('xs', 'md')} { font-size: 22px; } `; export const FormTitle = styled.h2<{ isApp?: boolean }>` font-family: 'Times Modern'; font-weight: 700; font-size: 28px; line-height: 1.2; color: #1d1d1b; margin: 0 0 8px 0; ${getMediaQuery('xs', 'md')} { font-size: 24px; } ${({ isApp }) => applyDarkMode( ` color: #ffffff !important; `, isApp )}; `; export const FormSubtitle = styled.p<{ isApp?: boolean }>` font-family: 'Roboto'; font-size: 16px; font-weight: 500; line-height: 1.5; color: #333333; margin: 0; ${getMediaQuery('xs', 'md')} { margin: 0 0 16px 0; } ${({ isApp }) => applyDarkMode( ` color: #cccccc !important; `, isApp )}; `; export const FormRequiredNote = styled(FormSubtitle)` margin-top: 12px; margin-bottom: 24px; `; /* Step indicator */ export const StepIndicator = styled.div` display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 32px; ${getMediaQuery('xs', 'md')} { margin-bottom: 32px; gap: 0; width: 100%; justify-content: space-between; } `; export const StepDot = styled.div<{ $active: boolean; $completed: boolean }>` width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-family: 'Roboto'; font-weight: 500; font-size: 14px; transition: all 0.2s ease; ${getMediaQuery('xs', 'md')} { width: 28px; height: 28px; } ${({ $active, $completed }) => $completed ? css` background-color: #005c8a; color: #ffffff; ` : $active ? css` background-color: #005c8a; color: #ffffff; ` : css` background-color: #e4e4e4; color: #666666; `}; `; export const StepLine = styled.div<{ $completed: boolean }>` width: 40px; height: 2px; background-color: ${({ $completed }) => ($completed ? '#005c8a' : '#e4e4e4')}; transition: background-color 0.2s ease; ${getMediaQuery('xs', 'md')} { width: auto; flex: 1; margin: 0 4px; } `; export const StepGroup = styled.div` display: flex; flex-direction: column; align-items: center; text-align: center; `; export const StepLabel = styled.div<{ $active: boolean }>` font-family: 'Roboto'; font-weight: 500; font-size: 14px; color: ${({ $active }) => ($active ? '#005c8a' : '#999999')}; text-align: center; margin-top: 6px; white-space: nowrap; `; /* Form fields */ export const FieldRow = styled.div` display: flex; align-items: stretch; gap: 16px; ${getMediaQuery('xs', 'md')} { flex-direction: column; gap: 0; } `; export const Field = styled.div<{ $flex?: number; $applyMinWidth?: boolean }>` flex: ${({ $flex }) => $flex || 1}; min-width: 0; ${({ $applyMinWidth }) => $applyMinWidth && ` min-width: 210px; `} margin-bottom: 20px; padding-bottom: 18px; position: relative; display: flex; flex-direction: column; input, select { margin-top: auto; } ${getMediaQuery('xs', 'md')} { margin-bottom: 16px; width: 100%; } `; export const Label = styled.label<{ isApp?: boolean }>` display: block; font-family: 'Roboto'; font-weight: 500; font-size: 16px; line-height: 1.5; color: #333333; margin-bottom: 4px; ${getMediaQuery('xs', 'md')} { min-height: auto; } ${({ isApp }) => applyDarkMode( ` color: #cccccc !important; `, isApp )}; `; export const Required = styled.span` color: #333333; margin-left: 2px; `; export const InputWrapper = styled.div` position: relative; width: 100%; flex: 1; display: flex; `; export const ErrorIcon = styled.div` position: absolute; right: 10px; bottom: 0.5px; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; pointer-events: none; svg { width: 22px; height: 22px; color: #d60000; background-color: #fff; } `; export const Input = styled.input<{ $hasError?: boolean; isApp?: boolean }>` width: 100%; padding: ${({ $hasError }) => $hasError ? '10px 40px 10px 12px' : '10px 12px'}; font-family: 'Roboto'; font-size: 16px; line-height: 1.5; color: #333333; background-color: #ffffff; ${({ $hasError }) => inputBorderStyles($hasError)} outline: none; transition: border-color 0.2s ease; box-sizing: border-box; &[type='date'] { display: block; width: 100%; max-width: 100%; min-width: 0; max-height: 46px; box-sizing: border-box; -webkit-appearance: none; appearance: none; } &::placeholder { color: #999999; font-size: 14px; } ${({ isApp }) => applyDarkMode(INPUT_DARK_MODE, isApp)}; `; export const Select = styled.select<{ $hasError?: boolean; isApp?: boolean }>` width: 100%; padding: ${({ $hasError }) => $hasError ? '10px 40px 10px 12px' : '10px 12px'}; font-family: 'Times Digital W04 Regular'; font-size: 16px; line-height: 1.5; color: #333333; background-color: #ffffff; ${({ $hasError }) => inputBorderStyles($hasError)} outline: none; transition: border-color 0.2s ease; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; box-sizing: border-box; ${({ isApp }) => applyDarkMode(INPUT_DARK_MODE, isApp)}; `; export const CustomSelectContainer = styled.div` position: relative; width: 100%; margin-top: auto; `; export const CustomSelectTrigger = styled.button<{ $hasError?: boolean; isApp?: boolean; $isPlaceholder?: boolean; }>` width: 100%; padding: 10px 12px; font-family: 'Roboto'; font-size: 16px; line-height: 1.5; color: ${({ $isPlaceholder }) => ($isPlaceholder ? '#999999' : '#333333')}; background-color: #ffffff; ${({ $hasError }) => inputBorderStyles($hasError)} text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; outline: none; border-radius: 0; position: relative; ${({ isApp }) => applyDarkMode( ` background-color: #2a2a2a !important; color: #cccccc !important; border-color: #555555 !important; `, isApp )}; `; export const CustomSelectChevron = styled.span<{ $isOpen?: boolean }>` display: flex; align-items: center; flex-shrink: 0; transition: transform 0.2s ease; transform: ${({ $isOpen }) => ($isOpen ? 'rotate(180deg)' : 'rotate(0deg)')}; pointer-events: none; `; export const CustomSelectOptionsList = styled.ul` position: absolute; top: 100%; left: 0; right: 0; background-color: #ffffff; border: 1px solid #cccccc; border-top: none; z-index: 200; list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); `; export const CustomSelectOption = styled.li<{ $selected?: boolean }>` padding: 10px 12px; font-family: 'Roboto'; font-size: 16px; line-height: 1.5; color: #333333; cursor: pointer; background-color: ${({ $selected }) => ($selected ? '#e8f3f9' : '#ffffff')}; &:hover { background-color: rgb(245, 245, 245); } `; export const TextArea = styled.textarea<{ $hasError?: boolean; isApp?: boolean; }>` width: 100%; padding: 10px 12px; font-family: 'Times Digital W04 Regular'; font-size: 16px; line-height: 1.5; color: #333333; background-color: #ffffff; ${({ $hasError }) => inputBorderStyles($hasError)} outline: none; transition: border-color 0.2s ease; resize: vertical; min-height: 100px; box-sizing: border-box; ${({ isApp }) => applyDarkMode(INPUT_DARK_MODE, isApp)}; `; export const ErrorText = styled.span` position: absolute; bottom: -4px; left: 0; font-family: 'Roboto'; font-size: 14px; color: #cc0000; `; export const FieldDescription = styled.div<{ isApp?: boolean }>` font-family: 'Roboto'; font-size: 14px; line-height: 1.4; color: #333333; margin-bottom: 6px; ${({ isApp }) => applyDarkMode( ` color: #999999 !important; `, isApp )}; `; /* Budget slider */ export const SliderContainer = styled.div` padding: 8px 0; `; export const SliderTrack = styled.div` position: relative; width: 100%; height: 6px; background-color: #e4e4e4; border-radius: 3px; margin: 8px 0; `; export const SliderRange = styled.div<{ $left: number; $width: number }>` position: absolute; height: 100%; background-color: #005c8a; border-radius: 3px; left: ${({ $left }) => $left}%; width: ${({ $width }) => $width}%; `; export const SliderHandle = styled.input` -webkit-appearance: none; appearance: none; position: absolute; top: 50%; transform: translateY(-50%); left: 0; width: 100%; height: 6px; background: transparent; pointer-events: none; outline: none; margin: 0; padding: 0; &::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background-color: #005c8a; cursor: pointer; pointer-events: all; border: 2px solid #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); } &::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background-color: #005c8a; cursor: pointer; pointer-events: all; border: 2px solid #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); } `; export const SliderValues = styled.div` display: flex; justify-content: space-between; font-family: 'Roboto'; font-size: 14px; color: #333333; margin-top: 16px; `; /* Section header inside steps */ export const SectionHeader = styled.h3<{ isApp?: boolean }>` font-family: 'Times Modern'; font-weight: 700; font-size: 24px; line-height: 1.3; color: #1d1d1b; margin: 0 0 20px 0; ${getMediaQuery('xs', 'md')} { font-size: 20px; margin: 0 0 16px 0; } ${({ isApp }) => applyDarkMode( ` color: #ffffff !important; border-color: #444444 !important; `, isApp )}; `; /* Navigation buttons */ export const ButtonRow = styled.div` display: flex; justify-content: flex-end; gap: 16px; margin-top: 32px; /* Push Back button to the left when present */ & > :first-child:not(:last-child) { margin-right: auto; } ${getMediaQuery('xs', 'md')} { margin-top: 24px; gap: 12px; } `; export const NavButton = styled.button<{ $variant: 'primary' | 'secondary'; isApp?: boolean; }>` padding: 12px 24px; font-family: 'Roboto'; font-weight: 500; font-size: 16px; line-height: 1.5; cursor: pointer; transition: all 0.2s ease; min-width: 140px; text-align: center; ${getMediaQuery('xs', 'md')} { min-width: 0; flex: 1; padding: 12px 16px; font-size: 16px; } ${({ $variant }) => $variant === 'primary' ? css` background-color: #005c8a; color: #ffffff; border: none; &:hover { background-color: #00527a; } &:disabled { opacity: 0.6; cursor: not-allowed; } ` : css` background-color: transparent; color: #005c8a; border: 1px solid #005c8a; &:hover { background-color: #f5f5f5; } `}; ${({ isApp, $variant }) => $variant === 'primary' && applyDarkMode( ` background-color: #74bade !important; color: #1d1d1b !important; &:hover { background-color: #93cbe8 !important; } `, isApp )}; ${({ isApp, $variant }) => $variant === 'secondary' && applyDarkMode( ` border-color: #74bade !important; color: #74bade !important; &:hover { background-color: #2a2a2a !important; } `, isApp )}; `; /* Success state */ export const SuccessContainer = styled.div` text-align: center; padding: 40px 20px; ${getMediaQuery('xs', 'md')} { padding: 32px 16px; } `; export const SuccessIcon = styled.div` width: 64px; height: 64px; border-radius: 50%; background-color: #005c8a; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px auto; `; export const SuccessTitle = styled.h3<{ isApp?: boolean }>` font-family: 'Times Modern'; font-weight: 700; font-size: 24px; color: #1d1d1b; margin: 0 0 12px 0; ${({ isApp }) => applyDarkMode( ` color: #ffffff !important; `, isApp )}; `; export const SuccessMessage = styled.p<{ isApp?: boolean }>` font-family: 'Times Digital W04 Regular'; font-size: 16px; line-height: 1.5; color: #333333; margin: 0; ${({ isApp }) => applyDarkMode( ` color: #cccccc !important; `, isApp )}; `; /* Inline message (error banner) */ export const InlineMessageContainer = styled.div` display: flex; flex-direction: column; gap: 16px; background-color: #ffefef; border-left: 4px solid #b20908; padding: 16px; margin-bottom: 20px; color: #1a1a1a; `; export const InlineMessageHeader = styled.div` display: flex; align-items: center; gap: 10px; `; export const InlineMessageIconWrapper = styled.span` display: flex; flex-shrink: 0; align-items: center; `; export const InlineMessageHeadline = styled.span` font-family: 'Roboto'; font-size: 16px; font-weight: 700; `; export const InlineMessageBody = styled(InlineMessageHeadline).attrs({ as: 'p' })` font-weight: 400; margin: 0; line-height: 1.5; `; export const InlineMessageLink = styled.a` font-family: 'Roboto'; font-size: 14px; font-weight: 700; text-decoration: none; color: #1a1a1a; &:hover { text-decoration: underline; } `; export const PhoneNumberLink = styled(InlineMessageLink)` margin-left: 4px; font-size: 16px; `; /* Contact preferences */ export const CheckboxGroup = styled.div` display: flex; gap: 24px; flex-wrap: wrap; margin-top: 4px; `; export const CheckboxLabel = styled.label<{ isApp?: boolean }>` display: flex; align-items: center; gap: 8px; font-family: 'Roboto'; font-weight: 400; font-size: 16px; line-height: 1.5; color: #333333; cursor: pointer; user-select: none; ${({ isApp }) => applyDarkMode( ` color: #cccccc !important; `, isApp )}; `; export const CheckboxWrapper = styled.div` width: 32px; height: 32px; position: relative; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; border: 1px solid #cccccc; border-radius: 0; background-color: #ffffff; cursor: pointer; &.checked { background-color: #005c8a; border-color: #005c8a; } `; export const CheckboxInput = styled.input` opacity: 0; position: absolute; cursor: pointer; `; export const NewsletterCheckboxLabel = styled(CheckboxLabel)` align-items: flex-start; gap: 12px; `; export const NewsletterCheckboxWrapper = styled(CheckboxWrapper)` margin-top: 2px; `; export const SubSectionLabel = styled.h4<{ isApp?: boolean }>` font-family: 'Roboto'; font-weight: 600; font-size: 16px; color: #1d1d1b; margin: 0 0 8px 0; ${({ isApp }) => applyDarkMode( ` color: #ffffff !important; `, isApp )}; `; export const AppointmentFields = styled.div` display: flex; gap: 16px; margin-top: 4px; ${getMediaQuery('xs', 'md')} { flex-direction: column; gap: 0; } `; export const TimeSelectRow = styled.div` display: flex; align-items: center; gap: 6px; `; export const TimeSeparator = styled.span<{ isApp?: boolean }>` font-family: 'Roboto'; font-size: 16px; font-weight: 500; color: #333333; ${({ isApp }) => applyDarkMode( ` color: #cccccc !important; `, isApp )}; `;