/* nobat.css (updated - light/white theme + booking summary layout)
   CHANGE: .nobat-message از اول نمایش داده نشود و فقط با کلاس nobat-show/یا بعد از JS نمایش داده شود.
*/
:root{
  --nobat-bg: #ffffff;
  --nobat-card: #ffffff;
  --nobat-border: rgba(0,0,0,.10);
  --nobat-text: #0f172a;
  --nobat-muted: rgba(15,23,42,.65);
  --nobat-accent: #0ea5e9;
  --nobat-accent2: #7c5cff;
  --nobat-danger:#e11d48;
  --nobat-ok:#16a34a;
  --nobat-field-bg: rgba(2,6,23,.04);
}
.nobat-shell, .nobat-staff-shell{
  direction: rtl;
  font-family: 'IRANSansX' !important;
  color: var(--nobat-text);
  max-width: 1100px;
  margin: 18px auto;
  background: transparent;
}
/* Header */
.nobat-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}
.nobat-badge{
  display:inline-block;
  padding:8px 12px;
  border: 1px solid var(--nobat-border);
  border-radius:999px;
  background: rgba(14,165,233,.08);
  color: var(--nobat-accent);
  font-weight:700;
  margin-bottom:10px;
}
.nobat-title{
  margin:0;
  font-size: 22px;
}
.nobat-sub{
  margin:6px 0 0;
  color: var(--nobat-muted);
  line-height: 1.7;
}
.nobat-content{
  display:grid;
  grid-template-columns: 1fr 1.1fr;
  gap:14px;
}
@media (max-width: 900px){
  .nobat-content{ grid-template-columns: 1fr; }
}
/* Cards */
.nobat-card{
  background: var(--nobat-card);
  border: 1px solid var(--nobat-border);
  border-radius: 14px;
  overflow:hidden;
}
.nobat-card-head{
  padding: 14px 16px;
  border-bottom: 1px solid var(--nobat-border);
}
.nobat-card-head h3{ margin:0; font-size:16px; }
/* Form */
.nobat-form{
  padding: 14px 16px 16px;
}
.nobat-row{
  display:flex;
  gap:12px;
  margin-bottom:12px;
}
.nobat-field{
  flex:1;
}

.nobat-row-2 {
  display: flex;
  gap: 10px;
}

.nobat-row-2 .nobat-field {
  flex: 1;
}


.nobat-field label{
  display:block;
  font-size: 13px;
  color: var(--nobat-muted);
  margin-bottom:8px;
}
.nobat-field input,
.nobat-field select,
.nobat-field textarea{
  width:100%;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--nobat-field-bg);
  border: 1px solid var(--nobat-border) !important;
  color: var(--nobat-text);
  outline:none;
  box-sizing: border-box;
  font-family: 'IRANSansX';
    font-size: 14px;
}
.nobat-field textarea{
  resize: vertical;
}
.nobat-field input:focus,
.nobat-field select:focus,
.nobat-field textarea:focus{
  border-color: rgba(14,165,233,.6);
  box-shadow: 0 0 0 4px rgba(14,165,233,.12);
}
/* Actions & message */
.nobat-actions{
  display:flex;
  gap:12px;
  margin-top: 8px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap: wrap;
}
.nobat-btn{
  border: 0;
  cursor:pointer;
  padding: 11px 14px;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--nobat-accent), var(--nobat-accent2));
  transition: .15s transform, .15s opacity;
}
.nobat-btn:hover{ transform: translateY(-1px); }
.nobat-btn:disabled{
  cursor:not-allowed;
  opacity:.55;
  transform:none;
}
/* IMPORTANT: از اول نمایش داده نشود */
.nobat-message{
  min-height: 22px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--nobat-border);
  background: rgba(2,6,23,.03);
  color: var(--nobat-muted);
display: none; /* تغییر اصلی */
}
/* فقط وقتی JS کلاس nobat-show بدهد نشان داده شود */
.nobat-message.nobat-show{
  display:block;
}
.nobat-message.nobat-ok{
  border-color: rgba(22,163,74,.35);
  background: rgba(22,163,74,.08);
  color: rgba(22,163,74,1);
}
.nobat-message.nobat-err{
  border-color: rgba(225,29,72,.35);
  background: rgba(225,29,72,.08);
  color: rgba(225,29,72,1);
}
/* Days */
.nobat-day-nav{
  padding: 14px 16px 10px;
  display:grid;
  grid-template-columns: 40px 1fr 40px;
  gap:12px;
  align-items:center;
}
.nobat-nav-btn{
  display: flex;
  align-items: center;     /* وسط عمودی */
  justify-content: center; /* وسط افقی */

  font-size: 24px;         /* بزرگ‌تر */
  line-height: 1;          /* جلوگیری از افتادن پایین */

  width: 40px;
  height: 40px;

  border-radius: 10px;
  border: 1px solid #d0d7ff;
  background: #f4f7ff;
  color: #1e2a78;
  cursor: pointer;
}
.nobat-nav-btn:hover{ border-color: rgba(14,165,233,.55); }
.nobat-day-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 520px){
  .nobat-day-grid{ grid-template-columns: repeat(2, 1fr); }
}
.nobat-day{
  border: 1px solid var(--nobat-border);
  background: rgba(2,6,23,.03);
  border-radius: 12px;
  padding: 10px 8px;
  text-align:center;
  cursor:pointer;
  transition: .15s;
  box-sizing: border-box;
}
.nobat-day:hover{
  border-color: rgba(14,165,233,.55);
  transform: translateY(-1px);
}
.nobat-day[aria-disabled="true"]{
  cursor:not-allowed;
  opacity: .45;
}
.nobat-day.is-active{
  border-color: rgba(14,165,233,.85);
  background: rgba(14,165,233,.12);
}
.nobat-day .pdate{
  font-weight: 900;
  font-size: 12.5px;
  line-height:1.4;
}
.nobat-day .edate{
  color: var(--nobat-muted);
  font-size: 11px;
  margin-top:4px;
}
.nobat-divider{
  height:1px;
  background: var(--nobat-border);
}
/* Slots */
.nobat-slot-area{
  padding: 14px 16px 16px;
}
.nobat-slot-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.nobat-slot-head h3{ margin:0; font-size:16px; }
.nobat-slot-date{
  color: var(--nobat-accent);
  font-weight: 900;
}
.nobat-slots{
  display: grid;
  gap: 10px;
  /* موبایل: 2 تا در هر ردیف */
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nobat-slot{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--nobat-border);
  background: rgba(2,6,23,.03);
  color: var(--nobat-text);
  cursor:pointer;
  text-align:center;
  font-weight: 900;
  transition: .15s;
  user-select:none;
  box-sizing: border-box;
}
.nobat-slot:hover{
  border-color: rgba(14,165,233,.55);
  transform: translateY(-1px);
}
.nobat-slot[aria-disabled="true"]{
  cursor:not-allowed;
  opacity:.45;
}
.nobat-slot.is-active{
  border-color: rgba(14,165,233,.85);
  background: rgba(14,165,233,.12);
}
.nobat-note{
  margin-top: 14px;
  color: var(--nobat-muted);
  font-size: 12.5px;
  line-height:1.7;
}

/* Nobat Table */

.nobat-list {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  margin: 20px 0px;
}

/* جدول */
.nobat-table {
  font-family: 'IRANSansX' !important;
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

/* هدر */
.nobat-table thead {
  background: #4f46e5;
  color: #fff;
}

.nobat-table th {
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
}

/* سلول‌ها */
.nobat-table td {
  padding: 12px;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #eef1f6;
}

/* ردیف‌ها */
.nobat-table tbody tr {
  transition: all 0.2s ease;
}

/* هاور */
.nobat-table tbody tr:hover {
  background: #f4f7ff;
}

/* سطر زوج */
.nobat-table tbody tr:nth-child(even) {
  background: #fafbff;
}

/* ردیف (شماره) */
.nobat-table td:first-child {
  font-weight: bold;
  color: #4f46e5;
}

/* pagination */
.nobat-pagination {
  margin-top: 20px;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.nobat-pagination a {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d0d7ff;
  background: #f4f7ff;
  color: #1e2a78;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nobat-pagination a:hover {
  background: #e0e7ff;
}

.nobat-pagination a.active {
  background: #4f46e5;
  color: #fff;
}

/* Summary (important: layout exactly as requested) */
.nobat-summary{
  margin-top: 12px;
  background: #ffffff;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.08);
}
/* Each line:*/

.nobat-summary-line{
  display: inline-block;
  text-align:center;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 6px 0;
  direction: rtl;
}
.nobat-summary-line span{
  font-size: 13.5px;
  font-weight: 800;
  color: rgba(15,23,42,.95);
}
.nobat-summary-sep{
  opacity: .5;
  font-weight: 800;
}

.nobat-visit-type{
  display:flex;
  gap:10px;
}
.nobat-type-btn{
  flex:1;
  padding:10px;
  border-radius:10px;
  border:1px solid var(--nobat-border);
  background:var(--nobat-field-bg);
  cursor:pointer;
  font-weight:700;
}
.nobat-type-btn.active{
  background: var(--nobat-accent);
  color:#fff;
}

.nobat-online-options{
  display:flex;
  gap:10px;
}
.nobat-online-item{
  flex:1;
  text-align:center;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--nobat-border);
  cursor:pointer;
  font-weight:700;
}
.nobat-online-item.active{
  background: var(--nobat-accent);
  color:#fff;
}
@media (max-width: 600px){

  .nobat-card.nobat-card-slots.nobat-card-right {
    order: -1;
    }
     .nobat-slots{
     grid-template-columns: repeat(4, minmax(0, 1fr));
  }
    .nobat-row-2 {
    flex-direction: column;
  }
  
.nobat-list {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  background: #ffffff;
  border-radius: 16px;
  padding: 15px;

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  margin-top: 20px;

  overflow: hidden; /* 🔥 مهم */
}

  .nobat-table {
    width: 100%;
  }

  .nobat-table thead {
    display: none;
  }

  .nobat-table,
  .nobat-table tbody,
  .nobat-table tr {
    display: block;
    width: 100%;
  }

  .nobat-table tr {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  }

  .nobat-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 6px 0;
    border: none;

    font-size: 13px;

    /* 🔥 مهم برای جلوگیری از بیرون زدن */
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .nobat-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #4f46e5;

    /* جلوگیری از به‌هم‌ریختگی */
    flex-shrink: 0;
    margin-left: 10px;
  }

  /* متن سمت راست */
  .nobat-table td span {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
}
