/* كل ما يعرض حالة الكهرباء: البطاقة، الشارة، زر التحديث،
   التحذير السياقي، بلاغي الأخير. */

.status-box {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1rem;
  margin: 0 0 0.75rem;
}

.status-line {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 1.6em;
}

#status-detail {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

/* ————— شارة الثقة ————— */
#confidence {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #eee;
  color: #333;
  font-weight: normal;
}
#confidence[hidden]        { display: none; }
#confidence[data-level="confirmed"] { background: #cfe8cf; color: #1d4d1d; }
#confidence[data-level="likely"]    { background: #f4e6a6; color: #5a4a00; }
#confidence[data-level="stale"]     { background: #ddd;    color: #555;    }

/* ————— زر التحديث اليدوي ————— */
/* مدفوع لأقصى اليسار في RTL. حالته النشطة داكنة وواضحة،
   وحالته المعطّلة شاحبة — ليعرف المستخدم فورًا إن كان قابلاً للضغط. */
.icon-btn {
  margin-inline-start: auto;
  background: #4b5563;
  border: 1px solid #4b5563;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.icon-btn:hover:not(:disabled) { background: #374151; border-color: #374151; }
.icon-btn:disabled {
  background: #e5e7eb;
  border-color: #e5e7eb;
  color: #9ca3af;
  cursor: wait;
}
.icon-btn:focus-visible { outline: 3px solid #333; outline-offset: 2px; }

/* ————— التحذير السياقي ————— */
.warning {
  background: #fff3cd;
  border: 1px solid #f0d478;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}
.warning[hidden] { display: none; }

/* ————— بلاغي الأخير ————— */
#my-last-report {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #eef6ff;
  border: 1px solid #cce0f0;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #235;
  text-align: center;
}
#my-last-report[hidden] { display: none; }
