/* ==========================================================================
   NOOR-E-HARAM — PILGRIM TOOLS & VIRAL UTILITIES STYLESHEET
   Crafted with luxury Islamic aesthetics: #06281e (Emerald), #C59B27 (Gold)
   Zero Layout Shift (CLS 0.00) & Mobile-First High Performance
   ========================================================================== */

/* ── TOOL HUB & CARD GRID ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.tool-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold-soft);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 380px;
  contain: layout;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold-premium), var(--gold-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-luxury);
  border-color: var(--gold-accent);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tool-badge--viral {
  background: rgba(197, 155, 39, 0.15);
  color: var(--gold-accent-accessible);
  border: 1px solid rgba(197, 155, 39, 0.3);
}

.tool-badge--offline {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tool-badge--free {
  background: rgba(6, 40, 30, 0.08);
  color: var(--emerald);
  border: 1px solid rgba(6, 40, 30, 0.15);
}

.tool-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0b3d2e, #06281e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-premium);
  font-size: 1.85rem;
  margin-bottom: 20px;
  box-shadow: 0 8px 16px rgba(6, 40, 30, 0.18);
  border: 1px solid var(--border-gold-soft);
}

.tool-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  color: var(--emerald);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.tool-card-desc {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.tool-card-action {
  margin-top: auto;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #06281e, #0b3d2e);
  color: var(--gold-pale);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid var(--border-gold);
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(6, 40, 30, 0.15);
}

.btn-tool:hover {
  background: linear-gradient(135deg, #C59B27, #8B6914);
  color: #ffffff;
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(197, 155, 39, 0.3);
}

/* ── TOOL INTERACTIVE WORKSPACE ── */
.tool-workspace {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-gold-soft);
  box-shadow: var(--shadow-luxury);
  padding: 36px 32px;
  margin-bottom: 40px;
  contain: layout;
}

@media (max-width: 768px) {
  .tool-workspace {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }
}

/* ── FORM ELEMENTS IN TOOLS ── */
.tool-form-group {
  margin-bottom: 20px;
}

.tool-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--emerald);
  margin-bottom: 8px;
}

.tool-input,
.tool-select,
.tool-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.18);
}

.tool-textarea {
  resize: vertical;
  min-height: 90px;
}

/* ── DUA MAKER STYLES ── */
.dua-category-card {
  background: var(--pearl);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  transition: border-color 0.2s ease;
}

.dua-category-card:hover {
  border-color: var(--gold-accent);
}

.dua-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.dua-location-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  color: var(--emerald);
  font-weight: 700;
  margin: 0;
}

.dua-item-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid #ebe7df;
}

@media (max-width: 640px) {
  .dua-item-row {
    grid-template-columns: 1fr;
  }
}

.btn-remove-dua {
  background: none;
  border: none;
  color: #991b1b;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  transition: background 0.2s ease;
}

.btn-remove-dua:hover {
  background: #fee2e2;
}

.sunnah-dua-box {
  background: rgba(6, 40, 30, 0.04);
  border-left: 3px solid var(--gold);
  padding: 14px 18px;
  margin: 12px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.arabic-text {
  font-family: 'Amiri', serif;
  font-size: 1.45rem;
  line-height: 2.1;
  color: var(--emerald-dark);
  direction: rtl;
  text-align: right;
  margin-bottom: 6px;
}

.translit-text {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--emerald-mid);
  margin-bottom: 4px;
}

.meaning-text {
  font-size: 0.9rem;
  color: var(--text-mid);
}

/* ── CARD MAKER STYLES ── */
.canvas-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #111827;
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  contain: layout;
  min-height: 420px;
}

#greetingCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  background: #06281e;
}

.template-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.template-btn {
  padding: 12px 14px;
  background: var(--pearl);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.template-btn.active,
.template-btn:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--gold-accent-accessible);
}

/* ── TAWAF & SA'I COUNTER STYLES ── */
.counter-shell {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.counter-mode-pills {
  display: flex;
  background: var(--emerald-dark);
  border-radius: var(--radius-pill);
  padding: 6px;
  margin-bottom: 28px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

.mode-pill {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s ease;
}

.mode-pill.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #041c14;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(197, 155, 39, 0.35);
}

.circuit-display-ring {
  width: 240px;
  height: 240px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #0b3d2e 0%, #06281e 80%);
  border: 6px solid var(--gold-premium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 36px rgba(4, 28, 20, 0.4), inset 0 0 25px rgba(226, 199, 127, 0.2);
  position: relative;
  contain: layout;
}

.circuit-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 5.5rem;
  font-weight: 700;
  color: var(--gold-pale);
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.circuit-label {
  font-size: 0.95rem;
  color: var(--gold-premium);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-top: 4px;
}

.counter-tap-btn {
  width: 100%;
  padding: 22px;
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #C59B27, #8B6914);
  color: #ffffff;
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-xl);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(197, 155, 39, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.counter-tap-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(197, 155, 39, 0.3);
}

.counter-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.counter-action-btn {
  flex: 1;
  padding: 12px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-mid);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.counter-action-btn:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

/* ── PACKING CHECKLIST STYLES ── */
.packing-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.packing-filter-btn {
  padding: 9px 18px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s ease;
}

.packing-filter-btn.active,
.packing-filter-btn:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: var(--gold-pale);
}

.checklist-category-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f1ede5;
  cursor: pointer;
  user-select: none;
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--gold-accent-accessible);
  cursor: pointer;
}

.checklist-text {
  font-size: 0.98rem;
  color: var(--text-dark);
  flex-grow: 1;
}

.checklist-weight {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--pearl);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.weight-dashboard {
  background: linear-gradient(135deg, #06281e, #0b3d2e);
  color: #ffffff;
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  border: 1px solid var(--border-gold);
}

.weight-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 14px 0 8px;
}

.weight-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #C59B27);
  transition: width 0.4s ease;
  border-radius: var(--radius-pill);
}

.weight-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* ── PRINT VIEW STYLES ── */
@media print {
  .header,
  .footer,
  .top-ticker-bar,
  .btn,
  .btn-tool,
  .counter-actions-row,
  .template-selector,
  .packing-filters,
  .sidebar-card,
  .header-actions {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .tool-workspace {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .dua-item-row {
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
}


/* ── LIVE BATCH SCHEDULE & SEAT MATRIX ── */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.batch-card {
  background: var(--white);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.batch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-luxury);
  border-color: var(--gold-accent);
}

.batch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.batch-tag-urgent {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.batch-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--emerald);
  margin: 0 0 8px;
  font-weight: 700;
}

.batch-meta-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  color: var(--text-mid);
}

.batch-seat-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 8px 0 6px;
}

.batch-seat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #C59B27);
  border-radius: var(--radius-pill);
}

/* ── HOTEL PROXIMITY SIMULATOR ── */
.proximity-simulator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.proximity-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.proximity-card.highlight-best {
  border: 2px solid var(--gold);
  background: var(--pearl);
}

.proximity-meters {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--emerald);
  line-height: 1;
  margin: 8px 0 4px;
}
