/* =========================================================
   YeuCigar Tools — Widget Layout CSS
   Phiên bản 1.0 (chuẩn áp dụng cho tất cả công cụ từ 2025-10)
   ========================================================= */

/* --- Cấu trúc khối widget --- */
.widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.widget {
  background: #fff;
  border: 1px solid #e7e7ea;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.widget-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.widget-head i.icon {
  font-size: 22px;
  background: #0b5cff;
  color: #fff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-head h1,
.widget-head h2,
.widget-head h3 {
  margin: 0;
  font-size: 18px;
  color: #111;
}

.widget-body {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

/* --- Lưới responsive --- */
@media(max-width: 600px) {
  .widgets {
    grid-template-columns: 1fr;
  }
  .widget-head i.icon {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
  .widget-head h2 {
    font-size: 16px;
  }
}

/* --- Thẻ tag (từ khóa liên quan) --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 13px;
  background: #fff;
  transition: all 0.2s ease;
}

.tag:hover {
  background: #f3f4f6;
  border-color: #ccc;
}

/* --- Notice / cảnh báo / mẹo --- */
.notice {
  background: #fff7ed;
  border: 1px solid #fde3b7;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  font-size: 14px;
  color: #4a3215;
}

/* --- Widget nổi bật (số liệu chính) --- */
.widget-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.widget-stat .value {
  font-size: 36px;
  font-weight: 700;
  color: #0b5cff;
}

.widget-stat .label {
  font-size: 14px;
  color: #666;
}

/* --- Bảng mini trong widget --- */
.widget table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 10px;
}

.widget th,
.widget td {
  border: 1px solid #e7e7ea;
  padding: 6px 8px;
  text-align: left;
}

.widget th {
  background: #f3f4f6;
  font-weight: 600;
}

/* --- Animation nhỏ khi load --- */
@keyframes fadeUp {
  from {opacity:0;transform:translateY(6px);}
  to {opacity:1;transform:translateY(0);}
}
.widget {
  animation: fadeUp 0.3s ease;
}
