/*
 * iOS-style finish for the patient app: translucent "glass" bars and sheets, soft depth, and a tactile
 * press on every tappable surface. Loaded after styles.css and only overrides look, never layout logic.
 */
/* Patient app palette: midnight jamun (the fruit Jambuveda is named after) + gold + ivory. Green stays only as a small
   accent for success and Ayurveda cues. Overrides the shared tokens for the patient app only (partner/admin unchanged). */
:root {
  --green: #16112C;
  --green-2: #241d47;
  --green-deep: #0f0c1f;
  --green-tint: #ECEAF4;
  --green-wash: #F6F5FB;
  --lift: 0 1px 2px rgba(28, 26, 53, 0.06), 0 10px 26px -14px rgba(28, 26, 53, 0.25);
  --lift-lg: 0 1px 2px rgba(28, 26, 53, 0.06), 0 24px 60px -24px rgba(28, 26, 53, 0.4);
}
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }

/* Glass tab bar, sitting flush on the bottom edge (it also fills the home-indicator area) */
.jv-tabbar {
  margin: 0 !important;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom) * .45) !important;
  border-radius: 22px 22px 0 0 !important;
  border: 0 !important;
  border-top: .5px solid rgba(var(--r16112c, 22,17,44), .08) !important;
  background: rgba(255, 255, 255, .78) !important;
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 -8px 24px -14px rgba(var(--r16112c, 22,17,44), .28) !important;
}
.jv-tab { transition: background .2s ease, color .2s ease, transform .14s ease; }
.jv-tab.on { background: rgba(var(--r16112c, 22,17,44), .08) !important; color: var(--green) !important; }
.jv-tab.on svg { filter: drop-shadow(0 2px 6px rgba(201, 162, 74, .45)); }

/* Glass sheets */
.sheet {
  background: rgba(251, 249, 244, .9) !important;
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  border-top: .5px solid rgba(255, 255, 255, .8) !important;
  animation: jvGlassUp .42s cubic-bezier(.2, .9, .25, 1.06) both !important;
}
.scrim { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes jvGlassUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.toast {
  background: rgba(24,22,38, .78) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: .5px solid rgba(255, 255, 255, .14);
}

/* Cards: hairline edge, softer depth */
.card { border: .5px solid rgba(201, 162, 39, .22) !important; box-shadow: 0 1px 2px rgba(var(--r16112c, 22,17,44), .04), 0 16px 34px -22px rgba(var(--r16112c, 22,17,44), .32) !important; }
.jv-wallet-pill { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 12px -6px rgba(138, 90, 18, .5); background: linear-gradient(135deg, #f8ecc0, #ead08a) !important; }

/* Tactile press everywhere */
button, .btn, .card[onclick], button.card, .list-row, .chip, .pill-btn, .icon-btn, .jv-tab { transition: transform .14s ease, box-shadow .14s ease, background .2s ease; }
button:active:not(:disabled), .btn:active:not(:disabled), .card[onclick]:active, .list-row:active, .chip:active, .pill-btn:active, .icon-btn:active { transform: scale(.97); }

/* Inputs: iOS-like focus ring */
.input:focus, input:focus, textarea:focus, select:focus { outline: none; box-shadow: 0 0 0 4px rgba(201, 162, 74, .22) !important; border-color: rgba(201, 162, 74, .9) !important; }

@media (prefers-reduced-motion: reduce) { .sheet { animation: none !important; } button:active, .btn:active { transform: none; } }

/* iPhone home-screen gap fix (see shared/viewport.js): full-screen overlays reach the real bottom edge too */
html.ios-short:not(.kb-open) :is(.jvr, .jvp-ov, .jvk, .jvf, .rep, .jvm, .jvn, .jvt, .jv-splash, .jvq, .jvc, .jsg-bg) { top: 0 !important; bottom: auto !important; height: var(--ios-full, 100%) !important; min-height: var(--ios-full, 0) !important; }
html.ios-short:not(.kb-open) .jv-tabbar { padding-bottom: 16px !important; }

/* ---- Themes. Celestial (default): midnight jamun + gold. Nature: the original Jambuveda greens.
   The person picks one in the sidebar; it is saved on the phone (localStorage jv_theme) and set on <html data-theme>. */
html[data-theme="nature"] {
  --green: #0F2E24;
  --green-2: #174537;
  --green-deep: #0A211A;
  --green-tint: #E7F0EA;
  --green-wash: #F2F7F4;
  --lift: 0 1px 2px rgba(15, 46, 36, 0.05), 0 10px 26px -14px rgba(15, 46, 36, 0.2);
  --lift-lg: 0 1px 2px rgba(15, 46, 36, 0.05), 0 24px 60px -24px rgba(15, 46, 36, 0.35);
  --t070512: #04130e;
  --r070512: 4,19,14;
  --t07060e: #050f0b;
  --r07060e: 5,15,11;
  --t080612: #05130e;
  --r080612: 5,19,14;
  --t090715: #061610;
  --r090715: 6,22,16;
  --t0a0818: #061a14;
  --r0a0818: 6,26,20;
  --t0b0817: #071812;
  --r0b0817: 7,24,18;
  --t0b0819: #071a14;
  --r0b0819: 7,26,20;
  --t0c081e: #06201a;
  --r0c081e: 6,32,26;
  --t0d0a1d: #081f17;
  --r0d0a1d: 8,31,23;
  --t0e0b1c: #091e17;
  --r0e0b1c: 9,30,23;
  --t0f0c20: #0a2219;
  --r0f0c20: 10,34,25;
  --t100d21: #0b231b;
  --r100d21: 11,35,27;
  --t100d22: #0b241b;
  --r100d22: 11,36,27;
  --t120e24: #0c261d;
  --r120e24: 12,38,29;
  --t120e2a: #0b2d22;
  --r120e2a: 11,45,34;
  --t151128: #0f2a21;
  --r151128: 15,42,33;
  --t16112c: #0f2e24;
  --r16112c: 15,46,36;
  --t171037: #0d3a2b;
  --r171037: 13,58,43;
  --t181237: #0f3a2c;
  --r181237: 15,58,44;
  --t181330: #103326;
  --r181330: 16,51,38;
  --t191335: #10382a;
  --r191335: 16,56,42;
  --t1a1535: #12382b;
  --r1a1535: 18,56,43;
  --t1b1537: #123a2b;
  --r1b1537: 18,58,43;
  --t1c1737: #143a2d;
  --r1c1737: 20,58,45;
  --t1d173a: #143d2e;
  --r1d173a: 20,61,46;
  --t1e173e: #14412f;
  --r1e173e: 20,65,47;
  --t1f1746: #134a37;
  --r1f1746: 19,74,55;
  --t1f193d: #164032;
  --r1f193d: 22,64,50;
  --t20193f: #164232;
  --r20193f: 22,66,50;
  --t221a4e: #15533e;
  --r221a4e: 21,83,62;
  --t221d38: #1b3a2c;
  --r221d38: 27,58,44;
  --t231955: #145a40;
  --r231955: 20,90,64;
  --t251f46: #1b4a38;
  --r251f46: 27,74,56;
  --t261f49: #1b4d3b;
  --r261f49: 27,77,59;
  --t28214e: #1d5240;
  --r28214e: 29,82,64;
  --t29214f: #1d533f;
  --r29214f: 29,83,63;
  --t29224e: #1e5240;
  --r29224e: 30,82,64;
  --t2a2255: #1d5a44;
  --r2a2255: 29,90,68;
  --t2b2259: #1d5e44;
  --r2b2259: 29,94,68;
  --t2e2365: #1d6b4f;
  --r2e2365: 29,107,79;
  --t2f2465: #1e6b50;
  --r2f2465: 30,107,80;
  --t2f2564: #1f6a50;
  --r2f2564: 31,106,80;
  --tc4bced: #b9f0d0;
  --rc4bced: 185,240,208;
  --tc9c1ee: #bef0d3;
  --rc9c1ee: 190,240,211;
  --td3d0e4: #cfe5d8;
  --rd3d0e4: 207,229,216;
  --td7d4e5: #d3e6db;
  --rd7d4e5: 211,230,219;
  --tdad7e7: #d6e8de;
  --rdad7e7: 214,232,222;
  --tdfddea: #dcebe1;
  --rdfddea: 220,235,225;
  --te5e2f2: #e1f3e9;
  --re5e2f2: 225,243,233;
  --te5e2f5: #e1f6ea;
  --re5e2f5: 225,246,234;
  --te6e4f1: #e3f2e9;
  --re6e4f1: 227,242,233;
  --te6e4f2: #e3f3ea;
  --re6e4f2: 227,243,234;
  --te9e7f0: #e7f0ea;
  --re9e7f0: 231,240,234;
  --tf3f2f7: #f2f7f4;
  --rf3f2f7: 242,247,244;
}
