/* =========================================================================
   NAILS BY ELLIE — DESIGN TOKENS (the single source of truth)

   Every color, radius, shadow, font, size and easing used anywhere (public
   site, booking, My Account, Studio, wp-admin) comes from this file.
   Rules for editing: DESIGN_SYSTEM.md and CLAUDE.md at the repo root.

   The nine brand colors follow Astra's palette (Customize > Global > Colors),
   so a color changed there changes everywhere. Pages that don't load Astra
   (Studio, the booking app) get the same palette printed by
   nbe_design_palette_css(). The hex after each var() is only a fallback.

   Dark values exist only inside the Studio app (html.nbe-app).
   ========================================================================= */

:root{
	/* ---- Brand palette (Astra) ---- */
	--nbe-brand:         var(--ast-global-color-0, #f7c9d8);
	--nbe-brand-hover:   var(--ast-global-color-1, #e8a9bc);
	--nbe-ink:           var(--ast-global-color-2, #3a3a3a);
	--nbe-text:          var(--ast-global-color-3, #5a5755);
	--nbe-cream:         var(--ast-global-color-4, #f7f2ee);
	--nbe-cream-light:   var(--ast-global-color-5, #fbf9f7);
	--nbe-border:        var(--ast-global-color-6, #c7b8ae);
	--nbe-subtle:        var(--ast-global-color-7, #f3ece7);
	--nbe-rose:          var(--ast-global-color-8, #9a506a);
	--nbe-white:         #ffffff;

	/* ---- Surfaces and text ---- */
	--nbe-muted:          #736c69;            /* 5.2:1 on white */
	--nbe-surface:        var(--nbe-white);   /* cards, sheets */
	--nbe-surface-2:      var(--nbe-cream-light); /* fills inside cards, sheets' background */
	--nbe-surface-raised: var(--nbe-white);   /* selected segment, popovers */
	--nbe-surface-hover:  #fbf6f3;            /* row and button hover */
	--nbe-field:          var(--nbe-white);   /* text fields */
	--nbe-line:           #ebe2dc;            /* hairlines, dividers */
	--nbe-track:          rgba(60, 40, 40, .1); /* switcher and switch tracks */
	--nbe-bar:            rgba(247, 242, 238, .82); /* translucent app bars */
	--nbe-scrim:          rgba(20, 10, 15, .32);    /* behind sheets */
	--nbe-scrim-strong:   rgba(0, 0, 0, .94);       /* behind a full-screen photo */
	--nbe-toast:          rgba(40, 34, 36, .92);    /* short status messages, floating back button */
	--nbe-on-toast:       var(--nbe-white);

	/* ---- Rose (accent) ---- */
	--nbe-rose-soft:      #fbe4ec;            /* chips, soft buttons, icon circles */
	--nbe-rose-strong:    #723a4e;            /* pressed rose */
	--nbe-on-rose:        var(--nbe-white);   /* text on rose */
	--nbe-halo:           rgba(247, 201, 216, .35); /* brand @ 35% */
	--nbe-halo-strong:    rgba(247, 201, 216, .55); /* brand @ 55% */

	/* ---- Status ---- */
	--nbe-success:        #2f6b3c;
	--nbe-success-soft:   #e3f1e6;
	--nbe-warning:        #8a5a00;
	--nbe-warning-soft:   #fbecd2;
	--nbe-danger:         #b3261e;
	--nbe-danger-soft:    #f6e1e1;
	--nbe-info:           #3a5a7d;
	--nbe-info-soft:      #e6eef7;

	/* ---- Studio messages ---- */
	--nbe-bubble-in:      var(--nbe-white);
	--nbe-bubble-in-text: var(--nbe-ink);
	--nbe-bubble-out:     var(--nbe-rose);
	--nbe-bubble-out-text: var(--nbe-on-rose);

	/* ---- Client avatars (Studio): one per client, picked from the phone number ---- */
	--nbe-avatar-0: linear-gradient(180deg, #c7bfbc, #9f9794); /* no number yet */
	--nbe-avatar-1: linear-gradient(180deg, #e8b3c4, #c98299);
	--nbe-avatar-2: linear-gradient(180deg, #cdb4dc, #a585ba);
	--nbe-avatar-3: linear-gradient(180deg, #b5c7e3, #8aa2c8);
	--nbe-avatar-4: linear-gradient(180deg, #b5dccd, #7fb4a2);
	--nbe-avatar-5: linear-gradient(180deg, #efcfa8, #d2a170);
	--nbe-avatar-6: linear-gradient(180deg, #e9bdb1, #c98d7c);
	--nbe-on-avatar: var(--nbe-white);

	/* ---- Photo Boxes widget: the shade behind text on a photo ---- */
	--nbe-photo-shade-left:   linear-gradient(90deg, rgba(40, 34, 32, .72) 0%, rgba(40, 34, 32, .45) 45%, rgba(40, 34, 32, 0) 75%);
	--nbe-photo-shade-bottom: linear-gradient(180deg, rgba(40, 34, 32, 0) 30%, rgba(40, 34, 32, .78) 75%);
	--nbe-photo-shade-full:   rgba(40, 34, 32, .45);

	/* ---- Studio's home-screen icon and favicon (app-icon.php draws them from these) ---- */
	--nbe-icon-top:     #dc92ac;  /* gradient, top; the bottom is --nbe-rose */
	--nbe-icon-polish:  #b0627e;
	--nbe-icon-shine:   #e9b7c9;

	/* ---- Jojo & Leo, the Frenchies who bring notes on Studio Home (Dec 1): illustration colors, the same in
	   light and dark. Jojo: cream with a lilac-grey mask. Leo: slate grey-brown. ---- */
	--nbe-pup-jojo-coat:    #f1dfc6;
	--nbe-pup-jojo-ear:     #ead6bc;
	--nbe-pup-jojo-ear-in:  #d6a7a6;
	--nbe-pup-jojo-fold:    #d6bb98;
	--nbe-pup-jojo-patch:   #a89aa0;
	--nbe-pup-jojo-mask:    #978a90;
	--nbe-pup-jojo-eye:     #8a6239;
	--nbe-pup-jojo-nose:    #6b5f66;
	--nbe-pup-jojo-chest:   #fbf7f1;
	--nbe-pup-jojo-collar:  #d78aa6;
	--nbe-pup-leo-coat:     #564b46;
	--nbe-pup-leo-ear:      #4b423e;
	--nbe-pup-leo-ear-in:   #b78d8f;
	--nbe-pup-leo-fold:     #3d3430;
	--nbe-pup-leo-mask:     #675b57;
	--nbe-pup-leo-eye:      #2b1e18;
	--nbe-pup-leo-nose:     #2c2523;
	--nbe-pup-leo-collar:   #9db8d6;
	--nbe-pup-pupil:        #140e0f;
	--nbe-pup-mouth:        #1f1819;
	--nbe-pup-blush:        #f0a7bb;
	--nbe-pup-tag:          #f2c46b;
	--nbe-pup-note:         #f7c9d8;  /* the note bubble and card */
	--nbe-pup-note-ink:     #2a1a20;
	--nbe-pup-note-soft:    #8a4462;

	/* ---- Studio Home tiles: one color per screen, like app icons ---- */
	--nbe-tile-texts:   linear-gradient(180deg, var(--nbe-icon-top), var(--nbe-rose));
	--nbe-tile-cal:     linear-gradient(180deg, #e7a487, #c56f55);
	--nbe-tile-cust:    linear-gradient(180deg, #86b9a7, #4f8d78);
	--nbe-tile-rev:     linear-gradient(180deg, #ecc574, #c48a2c);
	--nbe-tile-off:     linear-gradient(180deg, #7fc3cb, #3f8793);
	--nbe-tile-earn:    linear-gradient(180deg, #9fcf98, #5d9a57);
	--nbe-on-tile:      var(--nbe-white);

	/* ---- wp-admin sidebar (admin only) ---- */
	--nbe-admin-menu:       #231e20;
	--nbe-admin-menu-2:     #1a1617;
	--nbe-admin-menu-hover: #322b2d;
	--nbe-admin-menu-text:  #d9cfca;
	--nbe-admin-menu-dim:   #a99d97;

	/* ---- Shape ---- */
	--nbe-radius-sm:    8px;    /* segment buttons, small inputs, tags */
	--nbe-radius:       12px;   /* buttons, fields, photos */
	--nbe-radius-card:  16px;   /* cards, grouped lists */
	--nbe-radius-sheet: 20px;   /* sheets, modals, Studio home tiles, message bubbles */
	--nbe-radius-pill:  999px;  /* chips, pills, badges, circles */

	/* ---- Depth ---- */
	--nbe-shadow-card:  0 14px 40px rgba(0, 0, 0, .04);
	--nbe-shadow-thumb: 0 1px 3px rgba(0, 0, 0, .12);
	--nbe-shadow-pop:   0 12px 30px rgba(58, 58, 58, .12);
	--nbe-shadow-sheet: 0 24px 60px rgba(58, 58, 58, .22);
	--nbe-focus-ring:   2px solid var(--nbe-rose);
	--nbe-focus-offset: 3px;
	--nbe-focus-halo:   0 0 0 4px var(--nbe-halo-strong);
	--nbe-focus-inset:  inset 0 0 0 2px var(--nbe-halo-strong); /* a grouped row whose field has focus */
	--nbe-border-selected: 2px; /* border width of a picked card or row, in rose (one real border: no halo, no inset ring) */

	/* ---- Motion and states ---- */
	--nbe-ease:       cubic-bezier(.22, .8, .2, 1);
	--nbe-fast:       .15s;
	/* iOS-style motion (Nov 26): a soft spring-like settle for things that slide, and how long each kind takes */
	--nbe-spring:     cubic-bezier(.32, .72, 0, 1);
	--nbe-dur-push:   .45s;  /* a screen sliding in or out */
	--nbe-dur-sheet:  .45s;  /* a card or sheet rising from the bottom */
	--nbe-dur-thumb:  .3s;   /* a switcher's highlight sliding between options */
	--nbe-push-shade: rgba(0, 0, 0, .18); /* the shade over the screen a new one slides over (iOS darkens, doesn't fade) */
	--nbe-medium:     .25s;
	/* The full duration scale (Dec 1): every transition and animation length is one of these */
	--nbe-quick:      .2s;   /* between fast and medium: popovers, small fades */
	--nbe-slow:       .35s;  /* things that grow or travel a little further: progress, expanding rows */
	--nbe-dur-spin:   .8s;   /* one turn of a loading spinner */
	--nbe-ease-in:    cubic-bezier(.4, 0, 1, 1); /* leaving: speeds up as it goes (paws letting go, things dropping away) */
	--nbe-hover-fade: .85;   /* text, icon and photo buttons on hover (pointer devices) */
	--nbe-dim:        .5;    /* content that's there but set aside: cancelled visits, unavailable times, unpicked photos */
	--nbe-quiet:      .75;   /* secondary details beside their label: counts in a chip, a picked message */
	--nbe-hover-halo: 0 0 0 4px var(--nbe-halo); /* a field under the pointer (focus uses --nbe-focus-halo) */
	--nbe-tap:        44px;  /* the smallest touch target: buttons, chips, rows, round icons */
	/* Icon (glyph) sizes, for line icons inside buttons, rows and badges */
	--nbe-glyph-xs:   14px;
	--nbe-glyph-sm:   16px;
	--nbe-glyph:      18px;
	--nbe-glyph-md:   20px;
	--nbe-glyph-lg:   22px;
	--nbe-glyph-xl:   24px;
	--nbe-glyph-2xl:  30px;  /* large: Studio Home tiles, the back chevron, an empty avatar */
	--nbe-glyph-3xl:  52px;  /* empty states and the largest avatar */
	--nbe-stroke:      1.8;  /* line icons drawn in CSS-styled SVG */
	--nbe-stroke-bold: 2.2;  /* small or emphasised line icons */
	--nbe-press:      scale(.97);  /* buttons, tiles, chips while pressed */
	--nbe-shrink:     scale(.9);   /* a picked photo drawing in inside its ring; a send button with nothing to send */
	--nbe-press-fade: .6;          /* text and icon buttons while pressed */
	--nbe-disabled:   .45;
	/* Calendar motion: a chosen date's circle grows in with a small overshoot (Nov 28). Switching Month, Week
	   and Day is one quiet change, the same every way (Nov 29): a quick fade with a slight settle from the middle. */
	--nbe-pop:        cubic-bezier(.34, 1.56, .64, 1);
	--nbe-dur-pop:    .32s;
	--nbe-dur-view:   .25s;
	--nbe-view-in:    scale(.98);
	/* Photo tiles that cycle (booking form, Nov 28): each photo shows this long, then the next fades in over it */
	--nbe-photo-hold:     5s;
	--nbe-dur-crossfade:  1s;

	/* ---- Hairlines: separators, list and bar edges (one device pixel on a Retina screen) ---- */
	--nbe-hairline:   .5px;

	/* ---- Calendar (Studio), sized like the iPhone Calendar (Nov 28) ---- */
	--nbe-cal-gutter:      52px;  /* the hour labels' column, Day and Week */
	--nbe-cal-gutter-mini: 50px;  /* the same, on New Booking's small day timeline */
	--nbe-cal-hour:        66px;  /* one hour on the Day timeline */
	--nbe-cal-hour-week:   60px;  /* one hour on the Week timeline */
	--nbe-cal-hour-mini:   42px;  /* one hour on New Booking's small timeline */
	--nbe-cal-date:        34px;  /* a date's circle (week strip and Month) */
	--nbe-cal-dot:         6px;   /* booked dots under a date */
	--nbe-cal-now:         2px;   /* the current-time line */
	--nbe-cal-row:         var(--nbe-box-2xl);  /* a week in Month, phone */
	--nbe-cal-row-wide:    112px; /* a week in Month, iPad */
	--nbe-cal-strip:       var(--nbe-w-lg); /* the week strip's width on an iPad (Day) */
	--nbe-cal-wide:        var(--nbe-w-page); /* Week and Month's width on an iPad */

	/* ---- Sizes (Dec 2): every width, height and fixed box on the site is one of these. The lint rejects any px
	   size, offset or blur outside this file, so a new feature picks a name below (or adds one here, named for its
	   job and set from the scale) instead of a number. ---- */
	/* Box scale: squares and fixed heights, in 8px steps */
	--nbe-box-dot:  8px;    /* status, unread and step dots */
	--nbe-box-xs:   24px;
	--nbe-box-sm:   32px;
	--nbe-box-md:   40px;
	--nbe-box-lg:   48px;
	--nbe-box-xl:   56px;
	--nbe-box-2xl:  64px;
	--nbe-box-3xl:  96px;
	--nbe-box-4xl:  120px;
	/* Controls: the shared components use these, and so do the restyles of LatePoint, Elementor and wp-admin controls */
	--nbe-btn-h:       50px;               /* buttons and one-line text fields */
	--nbe-btn-h-sm:    var(--nbe-box-md);  /* a small button */
	--nbe-field-h:     var(--nbe-btn-h);
	--nbe-textarea-h:  104px;              /* a note box */
	--nbe-search-h:    36px;               /* a search field in a bar */
	--nbe-seg-h:       34px;               /* a switcher option */
	--nbe-check:       20px;               /* a checkbox or radio */
	--nbe-switch-w:    var(--nbe-box-lg);
	--nbe-switch-h:    28px;
	--nbe-switch-knob: var(--nbe-box-xs);
	--nbe-icon-btn:    var(--nbe-box-md);  /* a round icon button: back, close, arrows */
	--nbe-icon-btn-sm: var(--nbe-box-sm);  /* in a dense bar or beside a field (send, delete) */
	--nbe-icon-btn-xs: var(--nbe-box-xs);  /* on a photo or a chip (remove) */
	--nbe-icon-btn-lg: var(--nbe-box-lg);  /* a header icon on a large screen */
	/* Rows and bars */
	--nbe-row:         var(--nbe-box-lg);  /* a list or settings row */
	--nbe-row-lg:      var(--nbe-box-xl);  /* a row with two lines; an action-sheet button */
	--nbe-row-xl:      var(--nbe-box-2xl); /* a choice card (service, add-on, answer) */
	--nbe-bar-h:       52px;               /* a top bar (Studio, iPhone-style) */
	--nbe-bar-h-lg:    var(--nbe-box-2xl); /* a top bar with a person's photo */
	--nbe-bar-side:    72px;               /* room each side of a top bar's centred title for one button */
	--nbe-bar-side-lg: 136px;              /* the same with two buttons on a side (Texts: Studio and More) */
	--nbe-swipe-w:     78px;               /* one action behind a swiped row (Pin, Unread, Delete) */
	--nbe-progress-h:  4px;                /* a progress bar or a status stripe */
	/* People and pictures */
	--nbe-avatar-sm:   var(--nbe-box-sm);
	--nbe-avatar:      var(--nbe-box-md);
	--nbe-avatar-md:   var(--nbe-glyph-3xl);
	--nbe-avatar-lg:   var(--nbe-box-2xl);
	--nbe-avatar-xl:   var(--nbe-box-3xl);
	--nbe-thumb:       var(--nbe-box-xl);  /* a small photo: a service, a day in the date picker */
	--nbe-thumb-lg:    var(--nbe-box-3xl); /* a photo in a grid or strip */
	--nbe-logo-h:      var(--nbe-box-md);  /* the logo in a top bar */
	--nbe-logo-h-lg:   var(--nbe-box-xl);  /* the logo heading a page of its own (login) */
	--nbe-loader-top:  var(--nbe-box-4xl); /* where a loading spinner sits */
	/* Blurs */
	--nbe-blur-bar:      20px;  /* frosted bars and sheets */
	--nbe-blur-backdrop: 4px;   /* the dimmed page behind a dialog */
	/* Widths */
	--nbe-w-2xs:   240px;   /* a bubble, a card in a strip */
	--nbe-w-xs:    320px;   /* a narrow panel; a voice note */
	--nbe-w-sm:    400px;   /* a dialog; a short line of text */
	--nbe-w-md:    560px;   /* a sheet, a phone-width column, the pay page */
	--nbe-w-lg:    640px;   /* a wide dialog */
	--nbe-w-xl:    760px;   /* a reading column on a laptop */
	--nbe-w-2xl:   920px;   /* a wp-admin page of ours */
	--nbe-w-page:  1100px;  /* the widest page or app column */
	--nbe-w-site:  1180px;  /* the public site's content width (the Elementor kit's container) */
	--nbe-header-h: var(--nbe-box-2xl); /* the site header (phones and tablets; laptops below) */

	/* ---- Spacing: a 4px scale (1-10) with half steps for compact controls (0-5 ... 7-5) ---- */
	--nbe-space-0-5: 2px;
	--nbe-space-1:   4px;
	--nbe-space-1-5: 6px;
	--nbe-space-2:   8px;
	--nbe-space-2-5: 10px;
	--nbe-space-3:   12px;
	--nbe-space-3-5: 14px;
	--nbe-space-4:   16px;
	--nbe-space-4-5: 18px;
	--nbe-space-5:   20px;
	--nbe-space-5-5: 22px;
	--nbe-space-6:   24px;
	--nbe-space-6-5: 28px;
	--nbe-space-7:   32px;
	--nbe-space-7-5: 40px;
	--nbe-space-8:   48px;
	--nbe-space-9:   64px;
	--nbe-space-10:  96px;

	/* ---- Layers (z-index), lowest to highest. Within a layer, step up with
	   calc(var(--nbe-z-sheet) + 1). Plain 0-9 is fine inside one component. ---- */
	--nbe-z-view:     10;          /* Studio screens and the shade over a covered screen */
	--nbe-z-bar:      20;          /* sticky bars, side panels, the dim behind a panel */
	--nbe-z-float:    40;          /* status pill, action sheets */
	--nbe-z-sheet:    50;          /* bottom sheets, the booking app's top bar */
	--nbe-z-modal:    100;         /* full-screen cards (review, time off) */
	--nbe-z-takeover: 200;         /* New Booking, above every card */
	--nbe-z-header:   999;         /* the site's sticky header */
	--nbe-z-overlay:  1000;        /* full-screen photo viewer */
	--nbe-z-admin-ui: 9990;        /* wp-admin bars, drawers and toasts (below the admin bar) */
	--nbe-z-menu:     100000;      /* the site's menu sheet, Studio's button in wp-admin */
	--nbe-z-top:      999999;      /* booking-paused notice, Opening new booking… */
	--nbe-z-max:      2147483646;  /* above third-party chat and cookie widgets */

	/* ---- Type ---- */
	--nbe-font:       Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--nbe-font-serif: "Playfair Display", Georgia, serif;
	--nbe-font-mono:  ui-monospace, Menlo, Consolas, monospace;
	--nbe-font-app:   -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--nbe-text-2xs: 11px;
	--nbe-text-xs:  12px;
	--nbe-text-sm:  13px;
	--nbe-text-md:  14px;
	--nbe-text-ui:  15px;
	--nbe-text-base: 16px;
	--nbe-text-lg:  17px;
	--nbe-text-xl:  20px;
	--nbe-text-2xl: 22px;
	--nbe-text-3xl: 28px;
	--nbe-text-4xl: 34px;
	--nbe-text-5xl: 40px;
	--nbe-tracking-eyebrow: .12em;
	--nbe-tracking:      .04em; /* small uppercase labels in Studio and wp-admin */
	--nbe-tracking-wide: .08em; /* wider uppercase labels and buttons */
	/* Line heights (Dec 1): every unitless line-height is one of these */
	--nbe-leading-tight: 1.2;  /* headings, buttons, chips, numbers */
	--nbe-leading-snug:  1.35; /* compact text: card lines, list rows, notes */
	--nbe-leading-body:  1.5;  /* paragraphs */
	--nbe-leading-loose: 1.6;  /* long reading text, emails */
	/* Line heights in whole pixels (Nov 28), for rows that stack in a translucent bar: a bar whose height lands on a
	   different fraction of a pixel redraws everything in it a little lower or higher on iPhone */
	--nbe-leading-2xs: 14px; /* with --nbe-text-2xs */
	--nbe-leading-ui:  20px; /* with --nbe-text-ui */
	--nbe-leading-lg:  22px; /* with --nbe-text-lg: Studio's growing text boxes */
}

/* ---- Studio dark mode ---- */
/* The site header is taller on laptops, where the logo and page links sit in one row */
@media (min-width: 922px){ :root{ --nbe-header-h: 76px; } }

@media (prefers-color-scheme: dark){
	html.nbe-app{
		--nbe-ink:            #f2eeec;
		--nbe-text:           #d9d2cf;
		--nbe-muted:          #9a9290;
		--nbe-cream:          #151314;
		--nbe-cream-light:    #1f1c1d;
		--nbe-surface:        #1f1c1d;
		--nbe-surface-2:      #262223;
		--nbe-surface-raised: #5b5557;
		--nbe-surface-hover:  #2a2627;
		--nbe-field:          #262223;
		--nbe-border:         rgba(255, 255, 255, .18);
		--nbe-line:           rgba(255, 255, 255, .1);
		--nbe-subtle:         #262223;
		--nbe-track:          rgba(255, 255, 255, .08);
		--nbe-bar:            rgba(21, 19, 20, .82);
		--nbe-scrim:          rgba(0, 0, 0, .5);
		--nbe-rose:           #d78aa6;
		--nbe-rose-soft:      #3a2a30;
		--nbe-rose-strong:    #c27693;
		--nbe-on-rose:        #2a1a20;
		--nbe-success:        #7bc98e;
		--nbe-success-soft:   #1e3324;
		--nbe-warning:        #f2b766;
		--nbe-warning-soft:   #3a2e1c;
		--nbe-danger:         #ff453a; /* iOS dark-mode red: clearly not the rose (Nov 25) */
		--nbe-danger-soft:    #3a2020;
		--nbe-info:           #9db8d6;
		--nbe-info-soft:      #1f2a36;
		--nbe-bubble-in:      #2a2627;
		--nbe-bubble-out:     #a8577a;
		--nbe-bubble-out-text: #ffffff;
		--nbe-shadow-thumb:   0 1px 3px rgba(0, 0, 0, .4);
		color-scheme: dark;
	}
}
