/* ===========================================================
   HOME SCREEN (layout + sections) — token + theme aligned
   =========================================================== */

.jw-section-title {
    padding-left: var(--jw-space-2);
}

.jw-section-subtitle {
	padding-left: var(--jw-space-2);
}


/* Make Home match other screens: body controls spacing 
.jw-home { 
	margin: 20px !important; 
} */
/* -----------------------------------
   HOME Header (2 columns)
   ----------------------------------- */

.jw-home-header{
  display:block;
}

/* grid: left info + right clock */
.jw-home-header-grid{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: var(--jw-space-4);
}

/* LEFT column stacks rows naturally */
.jw-home-header-left{
  flex: 1 1 auto;
  min-width: 0;
  display:flex;
  flex-direction:column;
  gap: 16px; /* row spacing */
}

/* Dates: 2 rows */
.jw-home-dates{
  display:flex;
  flex-direction:column;
  gap: 4px;
}

/* Hijri slightly stronger */
.jw-home-date-hijri{
  font-size: var(--jw-fs-3);
  font-weight: 650;
  line-height: var(--jw-lh-tight);
  color: var(--jw-text);
}

.jw-home-date-greg{
  font-size: var(--jw-fs-2);
  line-height: var(--jw-lh-tight);
  color: var(--jw-text-muted);
}

/* Chips: force 2 rows (Plans then Today) */
.jw-home-track-chips{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-top: 4px;
  width: 60px;
}

/* Ensure chips don’t overflow ugly on mobile */
.jw-home-track-chips .jw-chip{
  display:block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
	background: var(--jw-pill-bg);
}

/* RIGHT column: clock only */
/* RIGHT column: clock + help button */
.jw-home-header-right {
  display: flex;
  flex-direction: column;   /* stack children vertically */
  align-items: flex-end;    /* align all children to the right */

}



/* optional: keep clock from shrinking weird */
.jw-home-clock{
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}


.jw-home-clock-missing {
    display: flex;
    flex-direction: column;   /* stack elements vertically */
    align-items: center;      /* center horizontally */
    justify-content: center;  /* center vertically (if container has height) */
    gap: 2px;                 /* space between the message and button */
    text-align: center;        /* ensures text is centered */
    padding: 2px 0;           /* optional padding for spacing */
}


#jw-home-calendar-btn {
  margin-top: 6px;
  align-self: flex-start;
}



/* Skeleton helpers for header */
.jw-home-header-skel{
  display:flex;
  flex-direction:column;
  gap: var(--jw-space-3);
}

.jw-home-header-skel-grid{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: var(--jw-space-3);
}

.jw-home-header-skel-clock{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap: 6px;
  min-width: 140px;
}



/* -----------------------------------
   HOME Clock (theme-aware)
----------------------------------- */

.jw-home-clock{
  background: var(--jw-clock-bg);
  border-radius: var(--jw-radius-2);
  padding: 0px;
  min-width: 128px;
}

/* optional small toggle row */
.jw-home-clock-controls{
  display:flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 6px;
}

.jw-home-clock-btn{
  width: 28px;
  height: 28px;
  background: var(--jw-surface);
  color: var(--jw-text);
  cursor: pointer;
}
.jw-home-clock-btn:active{ transform: translateY(1px); }

/* Clock header: single switch button (top-right) */
.jw-home-clock-head{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-bottom: 6px;
}

.jw-home-clock-switch{
  width: 18px;
  height: 18px;
  background: var(--jw-surface);
  border-color: var(--jw-surface);
  color: var(--jw-text);
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.jw-home-clock-switch:active{ 
  transform: translateY(1px); 
  border-color: var(--jw-surface);	
}


/* ===== DIGITAL ===== */

.jw-clock-digital{
  display:flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  color: var(--jw-clock-ink);
  font-family: var(--jw-font);
}

.jw-clock-digital .jw-clock-hm{
  font-weight: 300;
  letter-spacing: 0.4px;
  line-height: 1;
}
.jw-clock-digital .jw-clock-ampm{
  font-size: var(--jw-fs-2);
  color: var(--jw-clock-ink-muted);
  text-transform: uppercase;
  line-height: 1;
}

.jw-clock-digital .jw-clock-row{
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap: 6px;
  font-variant-numeric: tabular-nums; /* ✅ digits same width */
}

.jw-clock-hm,
.jw-clock-sec{
  font-variant-numeric: tabular-nums; /* double safety */
  letter-spacing: 0.2px;
}

.jw-clock-sec{
  min-width: 2ch; /* ✅ reserves space for "00".."59" */
  text-align: right;
}


/* minimal digital */
.jw-clock-digital.jw-clock-digital-min .jw-clock-hm{ font-size: 41px; }
.jw-clock-digital.jw-clock-digital-min .jw-clock-sec{ display:none; }

/* detailed digital */
.jw-clock-digital.jw-clock-digital-full .jw-clock-hm{ font-size: 41px; }
.jw-clock-digital.jw-clock-digital-full .jw-clock-sec{
  font-size: 29px;
  font-weight: 300;
  color: var(--jw-clock-ink-muted);
}

.jw-home-clock-foot{
  margin-top: 6px;
  display:flex;
  align-items:center;
  justify-content: center;
  gap: 8px;
}

.jw-home-clock-foot .jw-home-clock-tz {
    text-align: center;           /* optional: center text if multi-line */
}

.jw-home-clock-tz{
  font-size: var(--jw-fs-1);
  color: var(--jw-text-muted);
  line-height: var(--jw-lh-tight);
  max-width: 140px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



/* ===== ANALOG ===== */

.jw-clock-analog{
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 999px;
  border: 1px solid var(--jw-clock-border);
  background: color-mix(in srgb, var(--jw-surface) 92%, var(--jw-primary) 8%);
}

/* ticks (12 marks) */
.jw-clock-analog .jw-tick{
  position:absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 6px;
  background: var(--jw-clock-tick);
  transform-origin: 0 0;
}

.jw-clock-analog .jw-tick.is-hour{
  height: 10px;
  background: var(--jw-clock-tick-strong);
}

.jw-clock-analog .jw-num{
  position:absolute;
  width: 20px;
  height: 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 11px;
  color: var(--jw-clock-ink);
  opacity: 0.9;
  transform: translate(-50%, -50%);
}

/* hands */
.jw-clock-analog .jw-hand{
  position:absolute;
  left: 50%;
  top: 50%;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(0deg);
  border-radius: 999px;
}

.jw-clock-analog .jw-hand-hour{
  width: 4px;
  height: 26px;
  background: var(--jw-clock-hand-hour);
}
.jw-clock-analog .jw-hand-min{
  width: 3px;
  height: 34px;
  background: var(--jw-clock-hand-min);
}
.jw-clock-analog .jw-hand-sec{
  width: 2px;
  height: 38px;
  background: var(--jw-clock-hand-sec);
  opacity: 0.9;
}

/* center dot */
.jw-clock-analog .jw-center{
  position:absolute;
  left:50%;
  top:50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: var(--jw-clock-accent);
}

/* minimal analog = no numbers */
.jw-clock-analog.jw-clock-analog-min .jw-num{ display:none; }

/* detailed analog = show numbers */
.jw-clock-analog.jw-clock-analog-full .jw-num{ display:flex; }


/* -----------------------------------
   HOME Header: mobile-first 2-col layout
   ----------------------------------- */

.jw-home-header-grid{
  display: grid;
  grid-template-columns: 1fr auto;  /* left content + clock */
  align-items: center;
  gap: var(--jw-space-3);
}

/* remove the old mobile stacking rules */
@media (max-width: 420px){
  .jw-home-header-grid{
    grid-template-columns: 1fr auto; /* keep 2 columns */
  }
  .jw-home-clock{
    min-width: 120px;
    padding: 0px;
  }
}



.jw-home-header-left{
  min-width: 0; /* important for grid truncation / wrapping */
}
.jw-home-clock{
  flex: none;
}


/* Responsive: stack */
@media (max-width: 420px){

  .jw-home-header-skel-grid{
    flex-direction: column;
  }
  .jw-home-header-skel-clock{
    align-items:flex-start;
  }
}


/* -----------------------------------
   Home sections (shared)
   ----------------------------------- */

/* Use standard section header pattern */
.jw-home-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: var(--jw-space-2);
  margin-bottom: var(--jw-space-2);
}

.jw-home-section-head-actions{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Keep your empty UI but tokenize it */
.jw-home-empty{
  padding: var(--jw-space-2) var(--jw-space-4);
  font-size: var(--jw-fs-3);
  line-height: var(--jw-lh);
  color: var(--jw-text-muted);
}

/* -----------------------------------
   Guides list filters (Home)
   ----------------------------------- */

.jw-home-guides-filters{
  padding: 0 var(--jw-space-4) var(--jw-space-3);
}

.jw-home-guides-filters-row{
  display:flex;
  gap: var(--jw-space-2);
  flex-wrap:wrap;
  margin-bottom: var(--jw-space-2);
}

/* Search row */
.jw-home-guides-search-row{
  margin-bottom: var(--jw-space-2);
}

.jw-home-guides-search-wrap{
  display:flex;
  gap: var(--jw-space-2);
  align-items:center;
}

.jw-home-guides-search-input{
  flex: 1;
  min-width: 0;
  height: var(--jw-hit);
  padding: 0 var(--jw-space-3);
  border-radius: 999px;
  border: 1px solid var(--jw-border-soft);
  background: var(--jw-control-bg);
  color: var(--jw-control-text);
  outline: none;
}

.jw-home-guides-search-input:focus{
  outline: 2px solid var(--jw-focus-ring);
  outline-offset: 2px;
}

/* -----------------------------------
   Guides list rows
   ----------------------------------- */

.jw-home-guides-list{
  display:flex;
  flex-direction:column;
  gap: var(--jw-space-2);
  padding: 0 var(--jw-space-4) var(--jw-space-3);
}

.jw-home-guide-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--jw-space-3);
  padding: var(--jw-space-3);
  border: 1px solid var(--jw-border-soft);
  border-radius: var(--jw-radius-2);
  background: var(--jw-card-bg);
  box-shadow: var(--jw-card-shadow);
}

.jw-home-guide-row-title{
  font-weight: 650;
  font-size: var(--jw-fs-4);
  line-height: var(--jw-lh-tight);
  color: var(--jw-text);
  margin-bottom: 6px;
}

.jw-home-guide-row-chips{
  display:flex;
  gap: var(--jw-space-2);
  flex-wrap:wrap;
}

/* -----------------------------------
   Guide card (carousel item)
   ----------------------------------- */

.jw-guide-card{
  border-radius: var(--jw-radius-2);
  overflow: hidden;
  background: var(--jw-card-bg);
  border: 1px solid var(--jw-border-soft);
  box-shadow: var(--jw-card-shadow);
}

.jw-guide-card-media{
  width: 100%;
  aspect-ratio: 9 / 16;
  background: var(--jw-surface-2);
  overflow: hidden;
}

.jw-guide-card-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jw-guide-card-media-ph{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--jw-text-muted);
  font-size: var(--jw-fs-2);
}

.jw-guide-card-body{
  padding: var(--jw-space-3);
}

.jw-guide-title{
  font-weight: 650;
  font-size: var(--jw-fs-4);
  line-height: var(--jw-lh-tight);
  color: var(--jw-text);
}

.jw-guide-desc{
  font-size: var(--jw-fs-3);
  line-height: var(--jw-lh);
  color: var(--jw-text-muted);
  margin-top: 6px;
}

.jw-guide-meta{
  font-size: var(--jw-fs-2);
  line-height: var(--jw-lh-tight);
  color: var(--jw-text-muted);
  margin-top: 8px;
  margin-bottom: var(--jw-space-2);
}


/* -----------------------------------
   Modal scroll lock (keep)
   ----------------------------------- */

html.jw-modal-open,
body.jw-modal-open{
  height: 100%;
  overflow: hidden;
}

body.jw-modal-open{
  position: fixed;
  width: 100%;
}

/* ===========================================================
   GUIDE WIZARD SHEET (theme aligned)
   =========================================================== */

.jw-guide-sheet-backdrop{
  position: fixed;
  inset: 0;
  background: var(--jw-backdrop);
  z-index: 10000;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding: var(--jw-space-3);
  overscroll-behavior: contain;
}

.jw-guide-step-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.jw-guide-step-top-left{ min-width:0; }
.jw-guide-step-top-right{ flex:0 0 auto; }

.jw-guide-step-top-row  {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding: 10px 0px;
}

.jw-guide-sheet{
  width: 100%;
  max-width: 520px;
  background: var(--jw-card-bg);
  border-radius: calc(var(--jw-radius-2) + 6px);
  overflow: hidden;
  border: 1px solid var(--jw-border-soft);
  box-shadow: var(--jw-shadow-2);
  max-height: 92vh;
  display:flex;
  flex-direction:column;
}

.jw-guide-sheet-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: var(--jw-space-3) var(--jw-space-4);
  border-bottom: 1px solid var(--jw-divider);
  background: var(--jw-primary-bg);
}

.jw-guide-sheet-title{
  font-weight: 650;
  font-size: var(--jw-fs-4);
  line-height: var(--jw-lh-tight);
  color: var(--jw-primary-text);
}

.jw-guide-sheet-subtitle{
  font-size: var(--jw-fs-2);
  line-height: var(--jw-lh-tight);
  color: var(--jw-primary-text);
  margin-top: 2px;
}

.jw-guide-sheet-close{
  border: 0;
  background: transparent;
  color: var(--jw-primary-text);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 999px;
}
.jw-guide-sheet-close:focus-visible{
  outline: 2px solid var(--jw-focus-ring);
  outline-offset: 2px;
}

.jw-guide-wizard{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
    /* hide scrollbar on mobile if you want */
  scrollbar-width: none; /* Firefox */
}

.jw-guide-wizard-track{
  height: 100%;
  min-height: 0;
  width: 100%;
  display:flex;
  transition: transform 240ms ease;
  will-change: transform;
  transform: translateX(calc(var(--jw-step, 0) * -100%));

}

.jw-guide-wizard::-webkit-scrollbar{ display:none; } /* WebKit */

.jw-guide-step{
  width: 100%;
  flex: 0 0 100%;
  min-height: 100%;
  overflow: visible;
}

.jw-guide-step-inner{
  padding: var(--jw-space-4);
}

.jw-guide-intro-title{
  font-size: var(--jw-fs-6);
  font-weight: 650;
  line-height: var(--jw-lh-tight);
  margin-bottom: var(--jw-space-2);
  color: var(--jw-text);
}

.jw-guide-intro-desc{
  font-size: var(--jw-fs-3);
  line-height: var(--jw-lh-relaxed);
  color: var(--jw-text-muted);
  margin-bottom: var(--jw-space-3);
  white-space: pre-line;
}

.jw-guide-intro-meta{
  display:flex;
  gap: var(--jw-space-2);
  flex-wrap: wrap;
  margin-bottom: var(--jw-space-3);
}

.jw-guide-intro-actions{
  display:flex;
  gap: var(--jw-space-2);
  margin-top: var(--jw-space-2);
}

.jw-guide-progress{
  font-weight: 650;
  font-size: var(--jw-fs-3);
  line-height: var(--jw-lh-tight);
  color: var(--jw-text);
}

.jw-guide-mini-meta{
  font-size: var(--jw-fs-2);
  line-height: var(--jw-lh-tight);
  color: var(--jw-text-muted);
  margin-top: 4px;
}

.jw-guide-step-actions,
.jw-guide-finish-actions{
  display:flex;
  gap: var(--jw-space-2);
  flex-wrap: wrap;
  margin-top: var(--jw-space-3);
}


.jw-guide-finish {
  padding: var(--jw-space-3);		
}

.jw-guide-finish-row{
  padding: var(--jw-space-3);
  border: 1px solid var(--jw-border-soft);
  border-radius: var(--jw-radius-2);
  background: var(--jw-surface);
  margin-bottom: var(--jw-space-2);
}

.jw-guide-finish-row-title{
  font-weight: 650;
  color: var(--jw-text);
}

.jw-guide-finish-title {
  font-weight: 650;
  font-size: var(--jw-fs-4);
  line-height: var(--jw-lh-tight);
  color: var(--jw-text);
	
}

.jw-guide-finish-row-meta{
  margin-top: 4px;
  font-size: var(--jw-fs-2);
  color: var(--jw-text-muted);
}

.jw-guide-sheet-loading .jw-guide-sheet{
  pointer-events:none;
  opacity: 0.92;
}


/* -----------------------------------
 * Home – Guides filters (custom layout)
 * ----------------------------------- */

.jw-home-guides-header  {
  margin: 0px;
  padding: 0px;
	
}

.jw-home-guides-filters {
  margin-top: 10px;
  padding: 0px;
}

.jw-home-guides-row {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

/* 2 BIG + 1 SMALL (mobile-first) */
.jw-home-guides-grid-3{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 110px; /* small column */
  gap: 10px;
  align-items: center;
}


/* Make "sort" feel compact */
.jw-home-guides-sort select{
  width: 100%;
  min-width: 0;   /* important: lets it shrink inside grid */
}


/* Search spans 2 big columns */
.jw-home-guides-search {
  grid-column: 1 / 3;
}

/* Actions (refresh + clear) in small column */
.jw-home-guides-actions {
  grid-column: 3 / 4;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}



.jw-home-share-box{
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.02);
}

.jw-home-share-actions{
  display:flex;
  gap:10px;
  margin:10px;
  flex-wrap: wrap;
}





/* ===========================================================
   Recommended Guides (Home carousel card style)
   Square, primary-tinted, minimal colors, mobile-first
   =========================================================== */

.jw-guide-rec-tile {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  display: block;
}

/* Make the carousel item feel like a "visual tile" */
.jw-guide-rec-card {
  /* square tile */
  width: 220px;                 /* matches your example */
  aspect-ratio: 1 / 1;
  border-radius: var(--jw-radius-3);

  padding: var(--jw-space-5);
  box-sizing: border-box;

  /* single-tone base using primary */
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--jw-primary) 92%, #fff 8%) 0%,
      var(--jw-primary) 55%,
      color-mix(in srgb, var(--jw-primary) 88%, #000 12%) 100%
    );
  color: var(--jw-primary-contrast);

  box-shadow: var(--jw-card-shadow);
  position: relative;

  display: flex;
  flex-direction: column;
  gap: var(--jw-space-3);
}

/* Subtle pattern (still primary-locked, no extra colors) */
.jw-guide-rec-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;

  background-image:
    radial-gradient(circle at 18% 22%, var(--jw-ornate-c3) 0 2px, transparent 3px),
    radial-gradient(circle at 60% 35%, var(--jw-ornate-c2) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 70%, var(--jw-ornate-c3) 0 2px, transparent 3px);
}

/* Keep content above pattern */
.jw-guide-rec-card > * {
  position: relative;
}

.jw-guide-rec-title {
  font-family: var(--jw-font-headings);
  font-weight: var(--jw-font-weight-bold);
  font-size: var(--jw-fs-6);
  line-height: var(--jw-lh-tight);
  letter-spacing: -0.2px;
	
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* chips row */
.jw-guide-rec-chips {
    display: flex;
    flex-direction: column; /* stack vertically */
    gap: var(--jw-space-2); /* spacing between chips */
    margin-top: -2px;       /* keep your previous adjustment */
    align-items: flex-start; /* optional: left-align chips */
}


.jw-guide-rec-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--jw-fs-2);
  line-height: 1;
  white-space: nowrap;
}

/* "beginner" outline chip */
.jw-guide-rec-chip-outline {
  border: 1px solid color-mix(in srgb, var(--jw-primary-contrast) 35%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--jw-primary-contrast) 92%, transparent);
}

/* "30 deeds" slightly filled chip */
.jw-guide-rec-chip-solid {
  border: 0;
  background: color-mix(in srgb, var(--jw-primary-contrast) 14%, transparent);
  color: color-mix(in srgb, var(--jw-primary-contrast) 95%, transparent);
}

.jw-guide-rec-desc {
  font-size: var(--jw-fs-2);
  line-height: var(--jw-lh);
  color: color-mix(in srgb, var(--jw-primary-contrast) 78%, transparent);

  /* clamp to keep the tile clean */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* footer: arrow button bottom-left */
.jw-guide-rec-footer {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.jw-guide-rec-go {
  width: var(--jw-hit);
  height: var(--jw-hit);
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  line-height: 1;

  background: color-mix(in srgb, var(--jw-primary-contrast) 18%, transparent);
  color: var(--jw-primary-contrast);
}

/* Interaction */
.jw-guide-rec-tile:active .jw-guide-rec-card {
  transform: translateY(1px);
}

.jw-guide-rec-tile:focus-visible .jw-guide-rec-card {
  outline: 2px solid var(--jw-focus-ring);
  outline-offset: 2px;
}


