/*
 |-----------------------------------------------------------------------------
 | Vendor registration — page styles
 |-----------------------------------------------------------------------------
 | Lifted out of an inline <style> in vendor-login/register.blade.php and
 | retargeted at the --vp-* tokens, so the page follows the panel into dark mode
 | and shares its palette, radii and type instead of carrying its own.
 |
 | Tailwind (CDN) still supplies the page's LAYOUT utilities — the markup uses 82
 | of them and reimplementing that by hand would be a rewrite, not a restyle. The
 | handful of Tailwind utilities that hard-code a COLOUR are overridden at the
 | bottom of this file, because those are the ones that break dark mode.
 |
 | Source of truth: resources/css/vendor/register.css
 | Served copy:     public/vendor_assets/css/register.css   (copied by hand)
 */

        /* Your original new design styles */
        .header-top,
        .navbar,
        .footer-section {
            display: none;
        }

        

        .header h1 {
            font-size: 28px;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .header span {
            color: #ff0080;
            background: #fff;
            padding: 0 10px;
            border-radius: var(--vp-radius-md);
            font-size: 14px;
        }

        /* General Styles */
        body {
            font-family: var(--vp-font-sans);
            background-color: var(--vp-bg);
        }

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 800;
            color: var(--vp-text);
            margin-bottom: 1rem;
            margin-top: 0.5rem;
        }

        .form-label .required {
            color: red;
        }

        .form-input,
        .form-select,
        .form-textarea {
            display: block;
            width: 100%;
            padding: 0.625rem 1rem;
            background-color: #fff;
            border: 1px solid var(--vp-border);
            border-radius: var(--vp-radius-md);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            font-size: 0.875rem;
            line-height: 1.25rem;
            transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            outline: none;
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        input.form-input {
            height: 45px;
            margin-top: -10px;
            margin-bottom: 0;
        }

        /* Adjusted for grid layout */
        textarea.form-textarea {
            resize: none;
            overflow: hidden;
            border: 1px solid var(--vp-border);
            border-radius: var(--vp-radius-md);
            padding: 5px;
            width: 100%;
            box-sizing: border-box;
        }

        textarea.form-textarea::-webkit-resizer {
            display: none;
        }

        select.form-select {
            border: 1px solid var(--vp-border);
            border-radius: var(--vp-radius-md);
            padding: 10px;
            width: 100%;
            box-sizing: border-box;
            height: 45px;
        }

        /* Your enhanced file upload styles */
        .file-upload-wrapper {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 150px;
            border: 1px dashed var(--vp-border-strong);
            border-radius: var(--vp-radius-lg);
            cursor: pointer;
            transition: all 0.3s ease;
            overflow: hidden;
        }

        .file-upload-wrapper:hover {
            border-color: #4f46e5;
            background-color: #f8fafc;
        }

        /* .file-upload-wrapper.has-preview .file-upload-content {
            display: none;
        } */
        .file-upload-wrapper.image-is-shown .file-upload-content {
            display: none;
        }

        .file-upload-wrapper input[type="file"] {
            position: absolute;
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
        }

        .file-upload-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding-top: 1.25rem;
            padding-bottom: 1.5rem;
        }

        .file-upload-icon {
            width: 2rem;
            height: 2rem;
            margin-bottom: 0.5rem;
            color: #6b7280;
        }

        .file-upload-text {
            font-size: 0.875rem;
            color: #6b7280;
            z-index: 99999;
        }

        .image-preview {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 10;
        }

        .cancel-upload-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 20;
            font-size: 16px;
            line-height: 24px;
        }

        /* Your enhanced date picker styles */
        /* Date Picker Styles */
        .date-input-container {
            position: relative;
        }

        .date-input-container .fa-calendar {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #6b7280;
            pointer-events: none;
        }

        .flatpickr-monthDropdown-months {
            align-self: center;
        }

        .flatpickr-current-month .flatpickr-monthDropdown-months {
            font-weight: 900;
            align-items: end;
            text-align: end;
            font-size: 14px;


            display: inline-block;
            width: auto;
            padding: 0 0px;
            white-space: nowrap;
        }

        .flatpickr-current-month input.cur-year {
            font-weight: 900;
            font-size: 12px;
        }

        .flatpickr-calendar {
            background: rgb(255, 255, 255);
            border-radius: 1.5rem;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            width: 480px;
            height: 461;
            padding: 1rem;
            border: none;
            justify-content: center;
            align-items: center;
            font-family: 'Roboto', sans-serif;
            gap: 90px;
            font-size: small;
        }

        .flatpickr-innerContainer {
            justify-content: center;
            align-items: center;
            justify-self: center;
            align-self: center;
            gap: 50px;
            grid-column: 90px;
            font-family: 'Roboto', sans-serif;
            padding-left: auto;
            padding-right: auto;

        }

        .flatpickr-rContainer {
            gap: 150px;
            grid-column: 190px;
            width: 70%;
        }

        .flatpickr-months .flatpickr-month {
            color: #000000;
            font-weight: 500;
            align-items: center;
        }

        .flatpickr-current-month {
            padding-left: 5px;
            padding-right: 5px;
            font-size: 17px;
            font-weight: 600;
            color: #000;
            font-family: 'Roboto';
            top: calc(20% - 16px);
        }

        .flatpickr-current-month .cur-month {
            font-weight: bold;
        }

        .flatpickr-months .flatpickr-prev-month,
        .flatpickr-months .flatpickr-next-month {
            display: flex;
            align-items: center;
            justify-content: center;
            background: #D9D9D9;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            top: calc(5% - 16px);
            margin-top: calc(7% - 14px);
        }

        .flatpickr-months .flatpickr-prev-month {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: calc(5% - 14px);
            margin-left: 80px;
        }

        .flatpickr-months .flatpickr-next-month {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: calc(5% - 14px);
            margin-right: 80px;
        }

        .numInput .cur-year {
            position: relative;
            margin-left: 20px;
        }

        .flatpickr-months .flatpickr-prev-month svg,
        .flatpickr-months .flatpickr-next-month svg {
            fill: white;
            width: 14px;
            height: 14px;
        }

        span.flatpickr-weekday {
            color: #9E9E9E;
            font-weight: 500;
            font-size: 0.8rem;
        }

        .flatpickr-day {
            color: rgb(0, 0, 0);
            border: none;
            border-radius: 50%;
            font-weight: 500;
            transition: all 0.2s ease;
            text-align: auto !important;
            position: relative;
            left: -59px;
            /* padding: 12px; */
        }

        /* 
        .is-chromium .flatpickr-day {
    position: relative;
    left: -59px;
} */

        .flatpickr-day.prevMonthDay,
        .flatpickr-day.nextMonthDay {
            opacity: 0.9;
        }

        .flatpickr-day:hover {
            background: #4A4A4A;
        }

        .flatpickr-day.today {
            border: 1px solid #E0E0E0;
        }

        .flatpickr-day.selected,
        .flatpickr-day.startRange,
        .flatpickr-day.endRange {
            border-radius: 10%;
            background: #E0E0E0;
            border-color: #E0E0E0;
            color: #2E2E2E;
        }

        /* Your enhanced category selector styles */
        #category-display-trigger {
            border: 1px solid var(--vp-border);
            border-radius: var(--vp-radius-md);
            padding: 0 10px;
            width: 100%;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            margin-top: -10px;
            background-color: #fff;
            color: rgb(35, 35, 35);
            font-size: 14px;
            font-family: 'Roboto', sans-serif;
            overflow: hidden;
        }
        #category-selected-text {
    /* These properties will truncate the text with "..." */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    flex-grow: 1; /* Allows the text to take up available space */
    margin-right: 10px; /* Prevents text from touching the icon */
    color: #353535; /* Explicitly set the color */
}
        .flatpickr-weekdays {
            justify-content: center;
            align-items: center;
        }

        #category-display-trigger.has-selection {
            color: #111827;
        }

        #category-grid-wrapper {
            position: relative;
        }

        #category-grid {
            display: none;
            position: absolute;
            top: 100%;
            margin-top: -10px;
            left: 0;
            width: 100%;
            background: #fff;
            z-index: 1050;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
            padding: 1rem;
            border: 1px solid var(--vp-border);
            border-radius: var(--vp-radius-lg);
            max-height: 250px;
            overflow-y: auto;
        }

        .category-button {
            padding: 0.75rem 1rem;
            border-radius: var(--vp-radius-md);
            text-align: center;
            cursor: pointer;
            transition: background-color 0.2s, color 0.2s;
            background-color: var(--vp-surface-2);
            color: var(--vp-text);
            font-weight: 500;
        }

        .category-button.selected {
            background-color: var(--vp-primary);
            color: var(--vp-primary-contrast);
        }

        /* Styles from the OLD file for JS-based error handling */
        .text-danger {
            color: var(--vp-danger) !important;
            font-size: 0.875rem;
            margin-top: 4px;
            display: block;
        }

        .has-error .form-input,
        .has-error .form-select,
        .has-error .form-textarea,
        .has-error .file-upload-wrapper,
        .has-error #category-display-trigger {
            border: 1px solid #dc3545 !important;
        }

        /* JQuery Spinner Styles from OLD file */
        .jquery-spinner-wrap {
            position: fixed;
            width: 100%;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.8);
            z-index: 9999;
            display: none;
        }

        .jquery-spinner-wrap .jquery-spinner-circle {
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center
        }

        .jquery-spinner-wrap .jquery-spinner-circle .jquery-spinner-bar {
            width: 40px;
            height: 40px;
            border: 4px solid #ddd;
            border-top-color: #a40034;
            border-radius: 50%;
            animation: sp-anime .8s linear infinite
        }

        @keyframes sp-anime {
            to {
                transform: rotate(1turn)
            }
        }

        .flatpickr-day.nextMonthDay {
            display: hidden;
        }


        /* New Calendar Styles */
        .calendar-container {
            display: none;
            /* Initially hidden */
            position: absolute;
            z-index: 1000;
            background-color: #fff;
            border-radius: 35px;
            padding: 0 1em;
            margin-top: 10px;
            border: 1px solid var(--vp-border);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .calendar header {
            margin: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
        }

        .calendar .header-display {
            display: flex;
            align-items: center;
        }

        .calendar .header-display p {
            color:rgb(0, 0, 0);
            margin: 5px;
            font-size: 1.2rem;
            word-spacing: 0.5rem;
        }

        .calendar pre {
            padding: 10px;
            margin: 0;
            cursor: pointer;
            font-size: 1.2rem;
            color:rgb(0, 0, 0);
        }

        .calendar .days,
        .calendar .week {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            margin: auto;
            padding: 0 20px;
            justify-content: space-between;
        }

        .calendar .week div,
        .calendar .days div {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 3rem;
            width: 3em;
            border-radius: 100%;
        }

        .calendar .days div:hover {
            background: #ebedf0;
            color: rgb(113, 113, 113);
            cursor: pointer;
        }

        .calendar .week div {
            opacity: 0.5;
        }

        .calendar .current-date {
            background-color: rgb(113, 113, 113);
            color: #fff;
        }

        .calendar .selected-date {
            background-color:rgb(113, 113, 113);
            color: #fff;
        }
    

/* ==========================================================================
   THE SHELL — brought in line with the sign-in page
   ========================================================================== */

body {
  color: var(--vp-text);
  -webkit-font-smoothing: antialiased;
}

/* The banner used to be a 300px stock photograph of a handshake with the logo
   burned into it. It carried no information, could not follow the theme, and
   was the single loudest thing on a page whose job is a 22-field form. Replaced
   with the same gradient the sign-in panel uses. */
.header {
  position: relative;
  overflow: hidden;
  padding: 44px 24px 40px;
  text-align: center;
  background: var(--vp-gradient-primary, linear-gradient(135deg, #6C4CF1, #9377F4));
  color: #fff;
}
.header::after {                       /* soft light, same as the auth panel */
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-start: 50%;
  inline-size: 620px; block-size: 620px;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgba(255,255,255,.20), transparent);
  pointer-events: none;
}
.vp-reg__brand {
  position: relative; z-index: 1;
  font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; margin: 0;
}
.vp-reg__brand em { font-style: normal; color: var(--vp-accent-amber, #F59E0B); }
.vp-reg__tag {
  position: relative; z-index: 1;
  margin: 10px auto 0; max-inline-size: 46ch;
  font-size: .98rem; line-height: 1.55; color: rgba(255,255,255,.88);
}

/* The card the form sits on. */
.vp-reg__card {
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-xl, 20px);
  box-shadow: var(--vp-shadow-lg);
}

/* ---- form controls ------------------------------------------------------- */
.form-label {
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-600);
  margin-block-end: var(--vp-space-3);
  margin-block-start: 0;
}
.form-label .required { color: var(--vp-danger); margin-inline-start: 2px; }

input.form-input,
textarea.form-textarea,
select.form-select,
#category-display-trigger {
  inline-size: 100%;
  margin-block: 0;
  padding: 10px 14px;
  font: inherit;
  font-size: var(--vp-text-base);
  color: var(--vp-text);
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md);
  transition: border-color var(--vp-dur-fast) var(--vp-ease),
              box-shadow var(--vp-dur-fast) var(--vp-ease);
}
input.form-input, select.form-select, #category-display-trigger { block-size: 44px; }
textarea.form-textarea { min-block-size: 104px; padding: 12px 14px; }

input.form-input:focus,
textarea.form-textarea:focus,
select.form-select:focus,
#category-display-trigger:focus-visible {
  outline: none;
  border-color: var(--vp-primary);
  box-shadow: var(--vp-focus-ring);
}
input.form-input::placeholder,
textarea.form-textarea::placeholder { color: var(--vp-text-subtle); }

/* An Arabic field types RTL; an English one stays LTR even so. */
[dir="rtl"] input.form-input:not([dir="rtl"]),
[dir="rtl"] textarea.form-textarea:not([dir="rtl"]) { direction: ltr; text-align: start; }

.file-upload-wrapper {
  background: var(--vp-surface-2);
  transition: border-color var(--vp-dur-fast) var(--vp-ease),
              background var(--vp-dur-fast) var(--vp-ease);
}
.file-upload-wrapper:hover {
  border-color: var(--vp-primary);
  background: var(--vp-primary-soft);
}
.file-upload-icon, .file-upload-text { color: var(--vp-text-muted); }

.category-button {
  border: 1px solid var(--vp-border);
  transition: background-color var(--vp-dur-fast) var(--vp-ease),
              color var(--vp-dur-fast) var(--vp-ease),
              border-color var(--vp-dur-fast) var(--vp-ease);
}
.category-button:hover { border-color: var(--vp-primary); color: var(--vp-primary); }
.category-button.selected { border-color: var(--vp-primary); }

.submit-btn {
  background: var(--vp-primary);
  color: var(--vp-primary-contrast);
  border: 0;
  border-radius: var(--vp-radius-md);
  font-weight: var(--vp-weight-600);
  box-shadow: var(--vp-shadow-primary);
  transition: background var(--vp-dur-fast) var(--vp-ease),
              transform var(--vp-dur-fast) var(--vp-ease);
}
.submit-btn:hover { background: var(--vp-primary-hover); transform: translateY(var(--vp-lift, -1px)); }
.submit-btn:active { transform: translateY(var(--vp-press, 0)); }

/* ==========================================================================
   TAILWIND COLOUR UTILITIES
   --------------------------------------------------------------------------
   Layout utilities are left alone — these are only the ones that paint, and
   each is pinned to a light value that survives into dark mode as white-on-white.
   ========================================================================== */
.bg-white        { background-color: var(--vp-surface) !important; }
.bg-gray-50      { background-color: var(--vp-surface-2) !important; }
.border-gray-300 { border-color: var(--vp-border) !important; }
.text-gray-900   { color: var(--vp-text) !important; }
.text-gray-700,
.text-gray-600   { color: var(--vp-text-muted) !important; }
.text-gray-400   { color: var(--vp-text-subtle) !important; }
.text-indigo-600 { color: var(--vp-primary) !important; }
.bg-\[\#2E2E2E\] { background-color: var(--vp-primary) !important; }
.hover\:bg-black:hover { background-color: var(--vp-primary-hover) !important; }

@media (prefers-reduced-motion: reduce) {
  .submit-btn:hover, .submit-btn:active { transform: none; }
}


/* ---- the contact-number pair --------------------------------------------
   The markup pins these inline: `min-width: 415px` on the number, and
   `max/min-width: 90px` plus `margin-top: -10px` on the dial code. The 415px
   floor overflows any column narrower than that (every phone), and the negative
   margin lifts the select out of line with the input beside it now that both are
   44px tall. Inline styles outrank a stylesheet, so these need !important —
   which is the honest cost of not editing the markup. */
.form-group .flex:has(> select#dial_code) {
  gap: var(--vp-space-3, 10px);
  align-items: center;
}
select#dial_code {
  margin-block-start: 0 !important;
  min-inline-size: 96px !important;
  max-inline-size: 96px !important;
  flex: 0 0 auto;
}
input#mobile {
  min-inline-size: 0 !important;
  inline-size: auto !important;
  flex: 1 1 auto;
}
/* The separators between them are `&nbsp;` runs in the markup; collapse them so
   the gap above is the only spacing that counts. */
.form-group .flex:has(> select#dial_code) { font-size: 0; }
.form-group .flex:has(> select#dial_code) > * { font-size: var(--vp-text-base); }


/* ==========================================================================
   THE SPLIT SHELL + MOTION
   --------------------------------------------------------------------------
   The page was a banner, a heading and 22 fields in a column — correct, and
   completely inert. Two things change that without touching a single input:

   1. A sticky brand side, so the reason to fill the form in stays on screen for
      the whole of it, and the form gets a measure rather than the full 1200px.
   2. Motion that reports state rather than decorates: fields arrive as you
      reach them, the ring fills as you complete required fields, dropzones
      answer a drag, the submit button shows it is working.

   Everything here collapses to a static, finished state under
   prefers-reduced-motion — the animations are the trimming, never the content.
   ========================================================================== */

:root { --reg-ease: cubic-bezier(.22, .61, .36, 1); }

.vp-reg {
  display: grid;
  grid-template-columns: clamp(360px, 33vw, 480px) minmax(0, 1fr);
  min-block-size: 100vh;
  min-block-size: 100dvh;
}

/* ---- brand side ---------------------------------------------------------- */
.vp-reg__aside {
  position: sticky;
  inset-block-start: 0;
  align-self: start;
  block-size: 100vh;
  block-size: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(28px, 4vw, 56px);
  background: var(--vp-gradient-primary, linear-gradient(150deg, #5B3BE0, #9377F4));
  color: #fff;
  isolation: isolate;
}
.vp-reg__aside::after {                 /* soft key light, static */
  content: "";
  position: absolute;
  inset-block-start: -30%;
  inset-inline-start: -10%;
  inline-size: 720px; block-size: 720px;
  background: radial-gradient(closest-side, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.vp-reg__asideInner { position: relative; z-index: 2; max-inline-size: 30ch; }

.vp-reg__brand {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em;
  margin: 0 0 clamp(20px, 4vh, 40px);
  animation: reg-fade 700ms var(--reg-ease) both;
}
.vp-reg__brand em { font-style: normal; color: var(--vp-accent-amber, #F59E0B); }

/* The headline arrives a line at a time, each masked so it rises out of nothing
   rather than sliding in from off-screen. */
.vp-reg__headline {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.16; font-weight: 800; letter-spacing: -.03em;
  margin: 0 0 16px;
}
.vp-reg__line { display: block; overflow: hidden; }
.vp-reg__line > span {
  display: block;
  animation: reg-rise 760ms var(--reg-ease) both;
}
.vp-reg__line:nth-child(1) > span { animation-delay: 120ms; }
.vp-reg__line:nth-child(2) > span { animation-delay: 220ms; }

.vp-reg__tag {
  margin: 0 0 26px;
  font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,.86);
  animation: reg-fade 800ms var(--reg-ease) 320ms both;
}

.vp-reg__points { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 12px; }
.vp-reg__points li {
  position: relative;
  padding-inline-start: 30px;
  font-size: .95rem; line-height: 1.45; color: rgba(255,255,255,.92);
  animation: reg-rise 620ms var(--reg-ease) both;
}
.vp-reg__points li:nth-child(1) { animation-delay: 420ms; }
.vp-reg__points li:nth-child(2) { animation-delay: 500ms; }
.vp-reg__points li:nth-child(3) { animation-delay: 580ms; }
.vp-reg__points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; inset-block-start: .34em;
  inline-size: 18px; block-size: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.vp-reg__points li::after {
  content: "";
  position: absolute;
  inset-inline-start: 6px; inset-block-start: .72em;
  inline-size: 6px; block-size: 3px;
  border-inline-start: 1.5px solid #fff;
  border-block-end: 1.5px solid #fff;
  rotate: -45deg;
}

/* ---- the progress ring --------------------------------------------------- */
.vp-reg__progress {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  animation: reg-fade 700ms var(--reg-ease) 660ms both;
}
.vp-reg__ring { inline-size: 40px; block-size: 40px; rotate: -90deg; flex: 0 0 auto; }
.vp-reg__ring circle { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.vp-reg__ringTrack { stroke: rgba(255,255,255,.25); }
.vp-reg__ringFill {
  stroke: #fff;
  /* 2πr, r = 19 */
  stroke-dasharray: 119.38;
  stroke-dashoffset: calc(119.38 - (119.38 * var(--p, 0)));
  transition: stroke-dashoffset 620ms var(--reg-ease);
}
.vp-reg__progressText { display: grid; line-height: 1.25; }
.vp-reg__progressText b  { font-size: .95rem; font-weight: 700; }
.vp-reg__progressText em { font-style: normal; font-size: .74rem; color: rgba(255,255,255,.72); }

/* ---- drifting activity chips -------------------------------------------- */
.vp-reg__chips { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .42; }
.vp-reg__chip {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: var(--x, 20%);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .74rem; font-weight: 600;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.20);
  backdrop-filter: blur(3px);
  animation: reg-drift var(--dur, 26s) linear var(--delay, 0s) infinite;
}

@keyframes reg-drift {
  0%   { transform: translate3d(0, 0, 0) scale(.94); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translate3d(0, calc(-100dvh - 100%), 0) scale(1); opacity: 0; }
}
@keyframes reg-rise { from { opacity: 0; transform: translateY(105%); } to { opacity: 1; transform: none; } }
@keyframes reg-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- form side ----------------------------------------------------------- */
.vp-reg__main {
  padding: clamp(24px, 3vw, 52px) clamp(16px, 3vw, 48px);
  background: var(--vp-bg);
}
.vp-reg__card {
  max-inline-size: 900px;
  margin-inline: auto;
  animation: reg-fade 720ms var(--reg-ease) 160ms both;
}

/* Fields arrive as you reach them. `.is-in` is set by an IntersectionObserver;
   without JS every group simply stays visible, which is the safe default. */
/* NOTE — the hidden state is opt-in (`.vp-reveal`, added by script) and never
   the default. Hiding required form fields behind a transition is a bad trade:
   if the animation clock ever stalls, or the class is not cleared, the page
   silently has no form on it. Visible is what you get when anything goes wrong;
   the script adds `.vp-reveal`, and a failsafe strips it after 3s regardless. */
.vp-reg__card .form-group.vp-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--reg-ease), transform 520ms var(--reg-ease);
}
.vp-reg__card .form-group.vp-reveal.is-in { opacity: 1; transform: none; }

/* A field you are filling lifts very slightly out of the page. */
.form-group:focus-within .form-label { color: var(--vp-primary); }
input.form-input:focus,
textarea.form-textarea:focus,
select.form-select:focus { transform: translateY(-1px); }
input.form-input, textarea.form-textarea, select.form-select {
  transition: border-color var(--vp-dur-fast) var(--vp-ease),
              box-shadow var(--vp-dur-fast) var(--vp-ease),
              transform var(--vp-dur-fast) var(--vp-ease);
}

/* A completed required field gets a quiet tick — progress you can see locally,
   not only in the ring. */
.form-group.is-complete .form-label::after {
  content: "";
  display: inline-block;
  inline-size: 9px; block-size: 5px;
  margin-inline-start: 8px;
  border-inline-start: 1.5px solid var(--vp-success);
  border-block-end: 1.5px solid var(--vp-success);
  rotate: -45deg;
  animation: reg-tick 320ms var(--reg-ease) both;
}
@keyframes reg-tick { from { opacity: 0; scale: .4 1; } to { opacity: 1; scale: 1; } }

/* ---- dropzones ----------------------------------------------------------- */
.file-upload-wrapper { transition: border-color var(--vp-dur-fast) var(--vp-ease),
                                   background var(--vp-dur-fast) var(--vp-ease),
                                   transform var(--vp-dur-fast) var(--vp-ease); }
.file-upload-wrapper:hover { transform: translateY(-2px); }
.file-upload-wrapper.is-dragover {
  border-color: var(--vp-primary);
  background: var(--vp-primary-soft);
  transform: scale(1.015);
}
.file-upload-wrapper .file-upload-icon { transition: transform var(--vp-dur-base) var(--vp-ease-spring); }
.file-upload-wrapper:hover .file-upload-icon { transform: translateY(-3px) scale(1.06); }

/* ---- category chips ------------------------------------------------------ */
.category-button { transition: background-color var(--vp-dur-fast) var(--vp-ease),
                               color var(--vp-dur-fast) var(--vp-ease),
                               border-color var(--vp-dur-fast) var(--vp-ease),
                               transform var(--vp-dur-fast) var(--vp-ease-spring); }
.category-button:active { transform: scale(.96); }
.category-button.selected { animation: reg-pop 320ms var(--vp-ease-spring, cubic-bezier(.34,1.56,.64,1)) both; }
@keyframes reg-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: none; } }

/* ---- submit -------------------------------------------------------------- */
.submit-btn { position: relative; }
.submit-btn.is-busy { color: transparent !important; pointer-events: none; }
.submit-btn.is-busy::after {
  content: "";
  position: absolute; inset-block-start: 50%; inset-inline-start: 50%;
  inline-size: 18px; block-size: 18px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,.35);
  border-block-start-color: #fff;
  border-radius: 999px;
  animation: reg-spin 620ms linear infinite;
}
@keyframes reg-spin { to { transform: rotate(360deg); } }

/* ---- narrow ------------------------------------------------------------- */
@media (max-width: 1023.98px) {
  /* minmax(0, 1fr), not 1fr. A bare `1fr` is `minmax(auto, 1fr)`, so the track
     cannot shrink below the form's min-content width — the map, the Tailwind
     two-column grid and the phone input floored it at 932px and the whole page
     scrolled sideways on a 390px screen. */
  .vp-reg { grid-template-columns: minmax(0, 1fr); }
  .vp-reg__aside {
    position: static;
    block-size: auto;
    padding: clamp(28px, 7vw, 44px) clamp(20px, 6vw, 40px) clamp(32px, 7vw, 48px);
  }
  .vp-reg__asideInner { max-inline-size: none; }
  .vp-reg__headline { font-size: clamp(1.55rem, 6vw, 2rem); }
  .vp-reg__points { margin-block-end: 24px; }
  .vp-reg__chips { display: none; }   /* nothing to drift through at this height */
}

@media (prefers-reduced-motion: reduce) {
  .vp-reg__chips { display: none; }
  .vp-reg__brand, .vp-reg__tag, .vp-reg__points li, .vp-reg__progress,
  .vp-reg__line > span, .vp-reg__card { animation: none !important; opacity: 1; transform: none; }
  .vp-reg__card .form-group { opacity: 1; transform: none; transition: none; }
  .vp-reg__ringFill { transition: none; }
  .file-upload-wrapper:hover, .category-button:active,
  input.form-input:focus, textarea.form-textarea:focus, select.form-select:focus { transform: none; }
  .category-button.selected, .form-group.is-complete .form-label::after { animation: none; }
}


/* ---- sideways scroll ----------------------------------------------------
   The page used to scroll 291px sideways on a 390px screen. The cause was a
   single inline `margin-left: 850px` on #address-error (below) — a leftover
   from the old fixed-width layout — not anything structural.

   An `overflow-x: clip` on the root would have hidden it, and did; it is
   deliberately NOT kept. Clipping the root is a way of not knowing you have an
   overflow, it makes the next one invisible too, and on the root it reports a
   phantom scrollWidth that made this bug harder to chase, not easier. The one
   clip kept is on the map, which is Google's own tile overflow and genuinely
   belongs to the widget. */
#map { overflow: hidden; }

/* #address-error ships with an inline `margin-left: 850px` — a leftover from the
   old fixed-width layout, which pushed the document 291px wider than a 390px
   screen and let the whole page scroll sideways. It is an error slot; it belongs
   under its label like every other one. Inline styles need !important. */
#address-error { margin-inline-start: 0 !important; }


/* ==========================================================================
   LIGHT-ONLY VALUES LEFT OVER FROM THE ORIGINAL PAGE
   --------------------------------------------------------------------------
   The first retokenising pass substituted `white` but not `#fff`, so several
   surfaces stayed hard-coded light while the text on them became theme-driven.
   In dark mode that pairs near-white text with a white panel.

   The date picker was the visible casualty: the panel painted white, and the
   day numbers — which inherit --vp-text — went white on white, so the calendar
   opened with only the two highlighted dates readable. Same defect, milder, on
   the category grid and the textarea.
   ========================================================================== */

/* ---- date picker --------------------------------------------------------- */
.calendar-container {
  background-color: var(--vp-surface) !important;
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-xl, 20px) !important;
  box-shadow: var(--vp-shadow-xl) !important;
  color: var(--vp-text);
}
.calendar .header-display p,
.calendar pre {
  color: var(--vp-text) !important;
}
.calendar pre { border-radius: var(--vp-radius-sm); transition: background var(--vp-dur-fast) var(--vp-ease); }
.calendar pre:hover { background: var(--vp-surface-hover); }

/* Day cells inherit --vp-text; the weekday row is the muted one. */
.calendar .days div { color: var(--vp-text); border-radius: var(--vp-radius-md); }
.calendar .week div { color: var(--vp-text-muted); opacity: 1; font-weight: var(--vp-weight-600); }
.calendar .days div:hover {
  background: var(--vp-primary-soft) !important;
  color: var(--vp-primary) !important;
}
.calendar .current-date {
  background-color: var(--vp-surface-sunken) !important;
  color: var(--vp-text) !important;
  box-shadow: inset 0 0 0 1px var(--vp-border-strong);
}
.calendar .selected-date {
  background-color: var(--vp-primary) !important;
  color: var(--vp-primary-contrast) !important;
}

/* flatpickr's month header carried #000 for the same reason. */
.flatpickr-months .flatpickr-month,
.flatpickr-current-month { color: var(--vp-text) !important; }

/* ---- category picker ----------------------------------------------------- */
#category-display-trigger { background-color: var(--vp-surface) !important; }
#category-selected-text   { color: var(--vp-text-subtle) !important; }
#category-display-trigger.has-selection #category-selected-text { color: var(--vp-text) !important; }
#category-grid {
  background: var(--vp-surface-2) !important;
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md);
}

/* ---- the rest ------------------------------------------------------------ */
.form-textarea { background-color: var(--vp-surface) !important; }
.file-upload-wrapper:hover { background-color: var(--vp-primary-soft) !important; }
.header span { background: rgba(255, 255, 255, .16); color: #fff; }

/* The picker is absolutely positioned with no inline offset, so it opens from
   the field's start edge and runs ~380px to the right. The expiry field sits in
   the last column, so the last weekday column fell off the card. Anchor it to
   the field's inline-END instead, so it opens inward — and mirror correctly in
   Arabic, which `inset-inline-end` does for free. */
.calendar-container {
  inset-inline-end: 0;
  max-inline-size: min(380px, calc(100vw - 32px));
}


/* ---- draft restored notice + reset --------------------------------------- */
.vp-reg__restored {
  display: flex;
  align-items: center;
  gap: var(--vp-space-3, 10px);
  margin: 0 0 var(--vp-space-6, 20px);
  padding: 10px 14px;
  border: 1px solid var(--vp-info-soft, var(--vp-border));
  border-radius: var(--vp-radius-md);
  background: var(--vp-info-soft, var(--vp-surface-2));
  color: var(--vp-text-muted);
  font-size: var(--vp-text-sm);
  animation: reg-fade 500ms var(--reg-ease) both;
}
.vp-reg__restored b { color: var(--vp-text); font-weight: var(--vp-weight-600); }
.vp-reg__restored::before {
  content: "";
  flex: 0 0 auto;
  inline-size: 8px; block-size: 8px;
  border-radius: 999px;
  background: var(--vp-info, var(--vp-primary));
}

/* Quiet, and to the START of Submit — a destructive action should never be the
   thing your thumb lands on when reaching for the primary one. */
.vp-reg__reset {
  order: -1;
  padding: 12px 20px;
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md);
  background: transparent;
  color: var(--vp-text-muted);
  font: inherit;
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-600);
  cursor: pointer;
  transition: color var(--vp-dur-fast) var(--vp-ease),
              border-color var(--vp-dur-fast) var(--vp-ease),
              background var(--vp-dur-fast) var(--vp-ease);
}
.vp-reg__reset:hover {
  color: var(--vp-danger);
  border-color: var(--vp-danger);
  background: var(--vp-danger-soft);
}
.vp-reg__reset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--vp-focus-ring);
}


/* ---- the ring as a control ----------------------------------------------- */
.vp-reg__progress {
  border: 0;
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: background var(--vp-dur-fast) var(--vp-ease),
              transform var(--vp-dur-fast) var(--vp-ease),
              box-shadow var(--vp-dur-fast) var(--vp-ease);
}
.vp-reg__progress:hover {
  background: rgba(255, 255, 255, .2);
  transform: translateY(-1px);
}
.vp-reg__progress:active { transform: translateY(0); }
.vp-reg__progress:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 3px rgba(255,255,255,.45);
}
.vp-reg__ringWrap { display: block; flex: 0 0 auto; line-height: 0; }

/* It stops being a jump target once there is nothing left to jump to — the
   label already says "All set", so the affordance should agree. */
.vp-reg__progress.is-done .vp-reg__ringFill { stroke: var(--vp-success, #22C55E); }

/* Where the ring sent you. A brief hold, not a permanent highlight — it is a
   "here" marker, and it must not read as a validation error. */
.form-group.is-target {
  animation: reg-target 1400ms var(--reg-ease) both;
  border-radius: var(--vp-radius-md);
}
@keyframes reg-target {
  0%   { box-shadow: 0 0 0 0 var(--vp-primary-soft), 0 0 0 0 rgba(0,0,0,0); }
  12%  { box-shadow: 0 0 0 8px var(--vp-primary-soft); }
  70%  { box-shadow: 0 0 0 8px var(--vp-primary-soft); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

@media (prefers-reduced-motion: reduce) {
  .vp-reg__progress:hover, .vp-reg__progress:active { transform: none; }
  .form-group.is-target { animation: none; box-shadow: 0 0 0 3px var(--vp-primary-soft); }
}
