/* public/modern.css - Modern Clean UI for WeeNumber (Berded + Simbersuay + BerHoro) */

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  --line-green: #06c755;
  --line-green-hover: #05b34c;
  --brand-blue: #2563eb;
  --bg-slate: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Sarabun", "Prompt", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-slate);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------------- Top Announcement Bar ---------------- */
.top-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
  font-size: 13px;
  padding: 8px 16px;
  text-align: center;
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 11px;
}

.top-contacts {
  display: flex;
  gap: 16px;
  align-items: center;
}

.top-contacts a {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.top-contacts a:hover {
  color: #fff;
}

/* ---------------- Main Header ---------------- */
.main-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-line {
  background-color: var(--line-green);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, background-color 0.15s;
}

.btn-header-line:hover {
  background-color: var(--line-green-hover);
  transform: translateY(-1px);
}

.btn-header-track {
  background-color: #f1f5f9;
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s;
}

.btn-header-track:hover {
  background-color: #e2e8f0;
}

/* ---------------- Category Pills Navigation ---------------- */
.nav-scroll-wrap {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.nav-pills {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  list-style: none;
  white-space: nowrap;
}

.nav-pill-item a {
  display: block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  transition: all 0.15s ease;
}

.nav-pill-item.active a,
.nav-pill-item a:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ---------------- Main Layout Container ---------------- */
.site-container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

/* ---------------- Smart Search Box (Berded Matrix Style) ---------------- */
.search-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 28px;
}

.search-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* 10-Digit Matrix Input */
.pinpoint-box-wrapper {
  margin-bottom: 20px;
}

.pinpoint-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pinpoint-digits-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  max-width: 600px;
  margin: 0 auto;
}

.digit-slot {
  position: relative;
  text-align: center;
}

.digit-slot-label {
  font-size: 10px;
  color: var(--text-light);
  margin-bottom: 2px;
}

.digit-slot-input {
  width: 100%;
  height: 48px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--primary);
  transition: all 0.15s ease;
  caret-color: var(--brand-blue);
}

.digit-slot-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.digit-slot-input.filled {
  border-color: var(--brand-blue);
  background: #eff6ff;
  color: var(--brand-blue);
}

/* Auspicious Pair Quick Tags (BerHoro Style) */
.pair-pills-wrap {
  margin-bottom: 18px;
}

.filter-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pair-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pair-tag-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pair-tag-btn:hover {
  background: #e2e8f0;
}

.pair-tag-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

/* Like & Dislike Digit Chips */
.digit-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .digit-chips-grid {
    grid-template-columns: 1fr;
  }
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: #e2e8f0;
}

.chip-btn.include-active {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.chip-btn.exclude-active {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* Providers & Price Row */
.filter-bottom-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

@media (max-width: 850px) {
  .filter-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.provider-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.provider-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.provider-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.filter-actions-right {
  display: flex;
  gap: 8px;
}

.btn-reset {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  background: #fff;
  transition: all 0.15s;
}

.btn-reset:hover {
  background: #f1f5f9;
  color: #ef4444;
  border-color: #fca5a5;
}

/* ---------------- Listing Header Bar ---------------- */
.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.listing-count {
  font-size: 15px;
  color: var(--text-muted);
}

.listing-count strong {
  color: var(--primary);
}

.sort-select {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #fff;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

/* ---------------- Simcards Modern Card Grid ---------------- */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.sim-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sim-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.sim-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.grade-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.grade-s {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.grade-a {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.grade-vip {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

/* Phone Number Display */
.sim-phone-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  letter-spacing: 1px;
  margin: 6px 0 10px;
  font-feature-settings: "tnum";
}

.sim-phone-highlight {
  color: var(--brand-blue);
  border-bottom: 2px solid #bfdbfe;
}

/* Fortune & Meaning Section */
.sim-fortune-box {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 14px;
  font-size: 12px;
}

.sim-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.sum-pill {
  font-weight: 700;
  color: var(--accent-gold);
}

.sum-meaning-title {
  font-weight: 700;
  color: var(--text-main);
}

.sim-meaning-desc {
  color: var(--text-muted);
  line-height: 1.4;
  font-size: 11.5px;
}

/* Pricing & Actions */
.sim-card-bottom {
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
  margin-top: auto;
}

.sim-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.sim-price-label {
  font-size: 11px;
  color: var(--text-light);
}

.sim-price-val {
  font-size: 20px;
  font-weight: 800;
  color: #dc2626;
}

.sim-card-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 6px;
}

.btn-line-buy {
  background: var(--line-green);
  color: #fff;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-line-buy:hover {
  background: var(--line-green-hover);
}

.btn-web-buy {
  background: #f1f5f9;
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border-color);
  transition: all 0.15s;
}

.btn-web-buy:hover {
  background: #e2e8f0;
}

/* ---------------- Pagination ---------------- */
.modern-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 32px 0;
}

.modern-pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: all 0.15s;
}

.modern-pagination button:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.modern-pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.modern-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------------- Trust Badges & Shipped Ticker ---------------- */
.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.trust-badge-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  align-items: center;
}

.trust-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #f1f5f9;
  flex-shrink: 0;
}

.trust-badge-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.trust-badge-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Recent Shipped List Card */
.shipped-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-bottom: 32px;
}

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

.shipped-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipped-items-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.shipped-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 12.5px;
}

.shipped-item-name {
  font-weight: 700;
  color: var(--text-main);
}

.shipped-item-track {
  color: var(--brand-blue);
  font-weight: 600;
  margin-top: 4px;
  display: inline-block;
}

/* ---------------- Customer Tracking Modal / Drawer ---------------- */
.tracking-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tracking-drawer-overlay.active {
  display: flex;
}

.tracking-drawer-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

/* ---------------- Floating LINE Button ---------------- */
.floating-line-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--line-green);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  z-index: 99;
  transition: transform 0.2s, box-shadow 0.2s;
}

.floating-line-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(6, 199, 85, 0.5);
}

/* ---------------- Modern Footer ---------------- */
.modern-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 16px 24px;
  font-size: 14px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1e293b;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-heading {
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-copy {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

/* ---------------- Modal & Overlay Styles ---------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.close-btn {
  font-size: 24px;
  color: var(--text-muted);
  line-height: 1;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-success {
  background: #16a34a;
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: background-color 0.15s;
}

.btn-success:hover {
  background: #15803d;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
