@import url('https://fonts.cdnfonts.com/css/ibm-plex-sans-thai');
body {
  display: flex;
  width: 20rem;
  height: 40rem;
  padding: var(--spacing-xl, 16px);
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-family: "IBM Plex Sans Thai";
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: #F8F8F8 !important;
  border-radius: 6px;
}
*::-webkit-scrollbar-thumb {
  background: #D9D9D9 !important;
  border-radius: 6px;
}
*{
  padding: 0px;
  margin: 0px;
}

.picture {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  gap: 8px;
  align-self: stretch;
  width: 288px;
  height: 80px;
  position: relative;
}

.contactLogo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  margin-top: 8px;
  justify-content: center;
}

.contact {
  margin-left: auto;
  margin-right: auto;
  color: var(--Gray-500, #667085);
  /* Caption/Regular */
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px; /* 150% */
  margin-bottom: 4px;
  margin-top: 8px;
}

.info {
  display: flex;
  padding: 4px 8px;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md, 8px);
  border-radius: 4px;
  background: var(--Blue-50, #E8EAF7);
  margin-bottom: 0.5rem;
  width: fit-content;
}

.titleInfo {
  color: var(--Secondary, #2B3BA6);
  /* Subbody/Semi Bold */
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 20px; /* 142.857% */
}

.title {
  color: var(--Text-Secondary, #344054);
  /* Caption/Regular */
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px; /* 150% */
  width: 140px;
}

.titleModal {
  color: var(--Text-Secondary, #344054);
  /* Caption/Regular */
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px; /* 150% */
  margin-bottom: 8px;
}

.CompanyContainer {
  width: 195px;
  height: 16px;
  display: flex;
  justify-content: center;
}

.detail {
  color: #101828;
  font-weight: 500;
  font-size: 12px;
  line-height: 18px;
  width: 180px;
}

.company {
  text-decoration-line: underline;
}

.btn {
  color: var(--Component-colors-Utility-Warning-utility-warning-700, #B54708);
  text-align: center;
  cursor: pointer;
  /* Caption/Medium */
  font-size: 12px;
  font-weight: 500;
  line-height: 18px; /* 150% */
  display: flex;
  padding: var(--spacing-xxs, 2px) var(--spacing-md, 8px) var(--spacing-xxs, 2px) var(--spacing-sm, 6px);
  align-items: center;
  gap: var(--spacing-xs, 4px);
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--Component-colors-Utility-Warning-utility-warning-200, #FEDF89);
  background: var(--Component-colors-Utility-Warning-utility-warning-50, #FFFAEB);
}

.grid-container {
  display: grid;
  grid-template-columns: 150px auto;
  gap: 8px;
  padding: 0 0 4px 0;
}

.tagContainer {
  display: flex;
  flex-direction: row;
}

.segment {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.container-show-tag {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 273px;
}

.titleDesc {
  color: #101828;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px; /* 142.857% */
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}


.headerModal{
  color: #101828;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px; /* 142.857% */
  margin-bottom: 16px;
}

.quantity {
  color: #344054;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  align-items: center;
  margin-left: 8px;
}

.text {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: #101828;
}

.segmentContainer {
  display: flex;
  flex-direction: column;
  width: auto;
}

.status-bagde-success {
  display: flex;
  padding: var(--spacing-xxs, 2px) var(--spacing-md, 8px) var(--spacing-xxs, 2px) var(--spacing-sm, 6px);
  align-items: center;
  gap: var(--spacing-xs, 4px);
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--Component-colors-Utility-Success-utility-success-200, #ABEFC6);
  background: var(--Component-colors-Utility-Success-utility-success-50, #ECFDF3);
  justify-content: center;
  height: fit-content;
  width: fit-content;
}

.text-bagde-success {
  color:#067647;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px; /* 150% */
}

.status-bagde-blue {
  display: flex;
  padding: var(--spacing-xxs, 2px) var(--spacing-md, 8px) var(--spacing-xxs, 2px) var(--spacing-sm, 6px);
  align-items: center;
  gap: var(--spacing-xs, 4px);
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--Component-colors-Utility-Success-utility-success-200, #B2DDFF);
  background: var(--Component-colors-Utility-Success-utility-success-50, #EFF8FF);
  justify-content: center;
  height: fit-content;
  width: fit-content;
}

.text-bagde-blue {
  color:#175CD3;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px; /* 150% */
}

.status-bagde {
  display: flex;
  padding: 6px;
  align-items: center;
  gap: var(--spacing-xs, 4px);
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--Component-colors-Utility-Warning-utility-warning-200, #FEDF89);
  background: var(--Component-colors-Utility-Warning-utility-warning-50, #FFFAEB);
  justify-content: end;
  margin-left: auto;
  width: fit-content;
  height: fit-content;
}

.text-bagde {
  color: #B54708;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px; /* 150% */
}

.imgIcon {
  position: absolute;
  bottom: -9px;
  right: 97px;
}

.text-title {
  color: #344054;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.tooltip {
  transform: none;
}

.tooltip:hover > .tooltip-text {
  pointer-events: auto;
  opacity: 1.0;
}

.tooltip > .tooltip-text {
  display: block;
  position: absolute;
  z-index: 6000;
  overflow: visible;
  left: 10px;
  padding: 5px 8px;
  margin-top: 5px;
  line-height: 16px;
  border-radius: 4px;
  text-align: left;
  color: #fff;
  pointer-events: none;
  opacity: 0.0;
  -o-transition: all 0.3s ease-out;
  -ms-transition: all 0.3s ease-out;
  -moz-transition: all 0.3s ease-out;
  -webkit-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}

/* Arrow */
.tooltip > .tooltip-text:before {
  display: inline;
  top: -5px;
  content: "";
  position: absolute;
  border: solid;
  border-color: rgb(231, 231, 231) transparent;
  border-width: 0 .5em .5em .5em;
  z-index: 6000;
  right: 35%;
}

/* Invisible area so you can hover over tooltip */
.tooltip > .tooltip-text:after {
  top: -20px;
  content: " ";
  display: block;
  height: 20px;
  position: absolute;
  width: 60px;
  left: 20px;
}

.tooltip-scroll {
  overflow-y: auto;
  max-height: 374px;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  padding: 8px 12px 8px 12px;
  gap: 16px;
  background-color: #FFF;
}

.text-value {
  font-weight: 500;
  font-size: 12px;
  line-height: 18px;
  color: #101828;
}

.text-500 {
  font-weight: 500;
  font-size: 14px;
  line-height: 18px;
  color: #101828;
  align-items: center;
}

ul {
  padding-left: 24px;
  margin-top: 4px;
}

.card {
  border-radius: 4px;
  background: #EAECF0;
  padding: 8px;
  margin: 4px;
  height: 16px;
  width: auto;
}

.tag {
  border-radius: 4px;
  background: #EAECF0;
  padding: 8px;
  margin: 4px;
}

.text.single-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tooltip-tag {
  transform: none;
}

.tooltip-tag:hover > .tooltip-text {
  pointer-events: auto;
  opacity: 1.0;
}

.tooltip-tag > .tooltip-text {
  display: block;
  position: absolute;
  z-index: 6000;
  overflow: visible;
  margin-top: -350px;
  line-height: 16px;
  border-radius: 4px;
  text-align: left;
  color: #fff;
  pointer-events: none;
  opacity: 0.0;
  -o-transition: all 0.3s ease-out;
  -ms-transition: all 0.3s ease-out;
  -moz-transition: all 0.3s ease-out;
  -webkit-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}

.tooltip-tag > .tooltip-text:before {
  display: inline;
  bottom: -.7em;
  content: "";
  position: absolute;
  border: solid;
  border-color: rgba(231, 231, 231) transparent;
  border-width: .5em .5em 0 .5em;
  z-index: 6000;
  left: 20px;
}

.tooltip-tag > .tooltip-text:after {
  top: -20px;
  content: " ";
  display: block;
  height: 20px;
  position: absolute;
  width: 60px;
  left: 20px;
}

/* Tab Styles */
.tab-container {
  width: 100%;
  /* margin-bottom: 16px; */
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid #EAECF0;
}

.tab-button {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  font-family: "IBM Plex Sans Thai";
  font-size: 14px;
  font-weight: 600;
  color: #667085;
  line-height: 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-button.active {
  color: #F26634;
  border-bottom-color: #F26634;
}

.tab-button:hover {
  color: #F26634;
}

.tab-content {
  display: none;
  width: 100%;
}

.tab-content.active {
  display: block;
}

/* CSS TIMELINE */

/* Timeline Styles */
.timeline-header {
  font-size: 16px;
  font-weight: 600;
  color: #101828;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  max-height: 450px;          /* เพิ่มความสูงสูงสุด */
  overflow-y: auto;           /* เพิ่ม scroll bar */
  padding-right: 8px;         /* เผื่อพื้นที่ scroll bar */
  padding: 16px;
}

/* ปรับแต่ง scroll bar */
.timeline-container::-webkit-scrollbar {
  width: 6px;
}

.timeline-container::-webkit-scrollbar-track {
  background: #F8F8F8;
  border-radius: 6px;
}

.timeline-container::-webkit-scrollbar-thumb {
  background: #D9D9D9;
  border-radius: 6px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
  background: #BDBDBD;
}

.timeline-date-header {
  display: flex;
  padding: 4px 8px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border-radius: 4px;
  border: 1px solid var(--success-1, #039855);
  background: var(--white, #FFF);
  color: var(--success-1, #039855);

  /* CaptionV.2/Semibold600 */
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px; /* 150% */
  margin-bottom: 4px;
}

.timeline-activity {
  display: flex;
  padding: 8px;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  border-radius: 8px;
  border: 1px solid var(--Color-Gray-200, #EAECF0);
  margin-bottom: 4px;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.activity-order-id {
  font-size: 12px;
  color: #2B3BA6;
  margin-bottom: 4px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px; /* 150% */
}

.activity-order-id:empty {
  display: none;
  margin-bottom: 0;
}

.activity-timestamp {
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 8px;
}

.activity-icons {
  display: block;
}

.activity-source {
  align-self: stretch;
  border-radius: 4px;
  text-align: center;
  display: flex;
  gap: 4px;
  align-items: center;
}

/* Style สำหรับ Label "แหล่งที่มา:" */
.source-label {
  color: var(--Gray-900, #101828);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
}

/* Style สำหรับ Value (Offline, EXTERNAL/IMPORT, etc.) */
.source-value {
  color: var(--secondary-700-secondary, #2B3BA6);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px;
}

.source-offline {
  color: #6B7280;
}

.source-external {
  color: #7C3AED;
}

.view-more-btn {
  width: 100%;
  background: #F26634;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.3s ease;
  flex-shrink: 0;             /* ป้องกันไม่ให้ถูกบีบ */
  color: var(--White, #FFF);
text-align: center;

/* Caption/Medium */
font-family: "IBM Plex Sans Thai";
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: 18px; /* 150% */
}

.view-more-btn:hover {
  background: #E55A2B;
}

.view-more-btn .material-icons-round {
  font-size: 18px;
}

/* Event Label - ข้อความ "อีเวนต์ที่เกิดขึ้น:" */
.event-label {
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
  margin-bottom: 4px;
}

/* Event Info Group - กลุ่มของ title, order-id, timestamp */
.event-info-group {
  display: flex;
  padding: 8px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  border-radius: 8px;
  background: var(--Color-Gray-50, #F9FAFB);
  margin-bottom: 8px;
  
}

/* ปรับ CSS ของ elements ภายใน event-info-group */
.event-info-group .activity-title {
  color: #101828;
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px;
  margin-bottom: 0;
}

.event-info-group .activity-order-id {
  color: var(--secondary, #2B3BA6);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px;
  margin-bottom: 0;
}

.event-info-group .activity-timestamp {
  color: #667085;
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
  margin-bottom: 0;
}

/* Enhanced Tooltip CSS ตาม layout ที่ต้องการ */

.tooltip-event {
  position: relative;
  cursor: pointer;
}

.tooltip-event:hover > .tooltip-text-event {
  pointer-events: auto;
  opacity: 1.0;
}

.tooltip-text-event {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  border: 1px solid #D0D5DD;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  /* width: 280px; */
  max-width: 300px;
  transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-event:hover .tooltip-text-event {
  visibility: visible;
  opacity: 1;
}

/* Arrow สำหรับ tooltip */
.tooltip-text-event:before {
  display: inline;
  bottom: -5px;
  content: "";
  position: absolute;
  border: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent;
  border-width: 0.5em 0.5em 0 0.5em;
  z-index: 6000;
  left: 45%;
}

.tooltip-text-event:after {
  bottom: -20px;
  content: " ";
  display: block;
  height: 20px;
  position: absolute;
  width: 60px;
  left: 20px;
}

/* ปรับ CSS สำหรับ tooltip-scroll-event ให้มีขนาดที่เหมาะสม */

.tooltip-scroll-event {
  display: flex;
  padding: 8px 12px;
  flex-direction: column;
  justify-content: flex-start; /* เปลี่ยนจาก center เป็น flex-start */
  align-items: flex-start;
  gap: 12px; /* ลด gap จาก 16px เป็น 12px */
  border-radius: 8px;
  border: 1px solid var(--Color-Gray-200, #EAECF0);
  background: #FFF;
  
  /* ปรับขนาดให้เหมาะสม */
  width: 280px; /* กำหนดความกว้างคงที่แทน min-width */
  max-width: 320px; /* จำกัดความกว้างสูงสุด */
  /* max-height: 250px; ลดความสูงจาก 300px เป็น 250px */
  
  /* จัดการ overflow */
  overflow-x: hidden; /* ไม่ให้ scroll ซ้าย-ขวา */
  overflow-y: auto; /* scroll แนวตั้งเมื่อจำเป็น */
  
  /* Shadow และ effects */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* ป้องกันการ wrap text ที่ไม่ต้องการ */
  word-wrap: break-word;
  word-break: break-word;
}

/* ปรับ tooltip positioning ให้ไม่เกินขอบหน้าจอ */
.tooltip-text-event {
  /* display: block; */
  position: absolute;
  z-index: 6000;
  /* overflow: visible; */
  
  /* จำกัดไม่ให้เกินขอบขวาของหน้าจอ */
  right: auto;
  
  /* padding: 5px 8px; */
  margin-top: 5px;
  line-height: 16px;
  /* border-radius: 4px; */
  text-align: left;
  color: #fff;
  pointer-events: none;
  opacity: 0.0;
  transition: all 0.3s ease-out;
  display: flex;
  padding: 8px 12px;
  flex-direction: column;
  justify-content: flex-start; /* เปลี่ยนจาก center เป็น flex-start */
  align-items: flex-start;
  gap: 12px; /* ลด gap จาก 16px เป็น 12px */
  border-radius: 8px;
  border: 1px solid var(--Color-Gray-200, #EAECF0);
  background: #FFF;
  
  /* ปรับขนาดให้เหมาะสม */
  width: 280px; /* กำหนดความกว้างคงที่แทน min-width */
  /* max-width: 320px; จำกัดความกว้างสูงสุด */
  max-height: 250px; /*ลดความสูงจาก 300px เป็น 250px */
  
  /* จัดการ overflow */
  overflow-x: hidden; /* ไม่ให้ scroll ซ้าย-ขวา */
  overflow-y: auto; /* scroll แนวตั้งเมื่อจำเป็น */
  
  /* Shadow และ effects */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* ป้องกันการ wrap text ที่ไม่ต้องการ */
  word-wrap: break-word;
  word-break: break-word;
}

/* Responsive positioning - ถ้า tooltip เกินขอบขวา ให้แสดงทางซ้าย */
@media (max-width: 768px) {
  .tooltip-text-event {
    left: auto;
    right: 10px;
    width: auto;
    max-width: calc(100vw - 40px); /* จำกัดไม่ให้เกินขอบหน้าจอ */
  }
  
  .tooltip-scroll-event {
    width: 260px; /* ลดขนาดใน mobile */
    max-width: calc(100vw - 60px);
  }
}

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

/* Text Section */
.tooltip-event-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

/* Event Title + Parameter */
.tooltip-event-text {
  font-size: 13px;
  font-weight: 500;
  color: #101828;
  line-height: 18px;
}

/* DateTime */
.tooltip-event-datetime {
  font-size: 12px;
  color: #667085;
  line-height: 18px;
  width: 100%;
}

/* ปรับ scrollbar ให้บาง */
.tooltip-scroll-event::-webkit-scrollbar {
  width: 3px; /* ลดขนาดจาก 4px เป็น 3px */
}

.tooltip-scroll-event::-webkit-scrollbar-track {
  background: transparent; /* ทำให้ track โปร่งใส */
}

.tooltip-scroll-event::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

.tooltip-scroll-event::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* CSS สำหรับหน้ากิจกรรมทั้งหมด */

/* Header ของหน้ากิจกรรมทั้งหมด */
.full-activity-header {
  display: flex;
  flex-direction: column; /* เปลี่ยนจาก row เป็น column */
  align-items: flex-start; /* จัดชิดซ้าย */
  gap: 12px; /* ระยะห่างระหว่างปุ่มกับ title */
  /* margin-bottom: 20px; */
  /* padding: 8px 0; */
}

/* ปุ่มย้อนกลับ */
.back-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  background: var(--Color-Gray-100, #F2F4F7);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "IBM Plex Sans Thai";
  align-self: flex-start; /* ให้ปุ่มชิดซ้าย */
}

.back-button:hover {
  background: var(--Color-Gray-200, #EAECF0);
}

.back-icon {
  font-size: 16px;
  color: var(--Gray-600, #475467);
}

.back-text {
color: var(--Text-Primary, #101828);
text-align: center;

/* Caption/Medium */
font-family: "IBM Plex Sans Thai";
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: 18px; /* 150% */
}

/* หัวข้อหน้ากิจกรรมทั้งหมด */
.full-activity-title {
  color: var(--Gray-900, #101828);
  font-family: "IBM Plex Sans Thai";
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  margin: 0;
  align-self: flex-start; /* ให้ title ชิดซ้าย */
  width: 100%; /* ใช้ความกว้างเต็ม */
}

/* Container รายการกิจกรรม */
.full-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ส่วนของแต่ละวันที่ */
.activity-date-section {
  display: flex;
  flex-direction: column;
}

/* Header วันที่ */
.activity-date-header {
  color: #344054;
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px;
  padding: 8px 0 8px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.activity-date-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--Color-Gray-200, #EAECF0);
  z-index: 1;
}

.activity-date-header span {
  position: relative;
  z-index: 2;
  background: var(--white, #FFF);
  padding: 0 16px;
  display: inline-block;
}

/* แต่ละรายการกิจกรรม */
.activity-full-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  background: var(--white, #FFF);
  
  /* เปลี่ยนเป็น border เฉพาะ top และ bottom */
  /* border-top: 1px solid var(--Color-Gray-200, #EAECF0); */
  border-bottom: 1px solid var(--Color-Gray-200, #EAECF0);
  border-left: none;
  border-right: none;
  border-radius: 0; /* ลบ border-radius */
  
  transition: all 0.2s ease;
  margin-bottom: 0;
}

/* .activity-full-item:hover {
  background: var(--Color-Gray-50, #F9FAFB);
  border-top-color: var(--Color-Gray-300, #D0D5DD);
  border-bottom-color: var(--Color-Gray-300, #D0D5DD);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
} */

/* รายการแรกและสุดท้าย */
.activity-full-item:first-of-type {
  border-top: 1px solid var(--Color-Gray-200, #EAECF0);
}

.activity-full-item:last-of-type {
  border-bottom: 1px solid var(--Color-Gray-200, #EAECF0);
}

/* ไอคอนของกิจกรรม */
.activity-icon-full {
  display: flex;
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  font-size: 16px;
  flex-shrink: 0;
}

/* เนื้อหาของกิจกรรม */
.activity-content-full {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

/* หัวข้อกิจกรรม */
.activity-title-full {
  color: var(--Gray-900, #101828);
  font-family: "IBM Plex Sans Thai";
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  
  /* จัดการ text overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* เวลาของกิจกรรม */
.activity-time-full {
  color: var(--Gray-500, #667085);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
}

/* Responsive สำหรับ mobile */
@media (max-width: 768px) {
  .full-activity-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .full-activity-title {
    font-size: 16px;
    line-height: 24px;
  }
  
  .activity-full-item {
    padding: 10px;
  }
  
  .activity-icon-full {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .activity-title-full {
    font-size: 13px;
    line-height: 18px;
  }
  
  .activity-time-full {
    font-size: 11px;
    line-height: 16px;
  }
}

/* Animation เมื่อเปลี่ยนหน้า */
.full-activity-list {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CSS สำหรับ Timeline Activities แบบง่าย ตามภาพ */

/* Container สำหรับ activities ในวันเดียวกัน */
.timeline-day-container {
  display: flex;
  flex-direction: column;
  background: var(--white, #FFF);
  border: 1px solid var(--Color-Gray-200, #EAECF0);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 24px;
}

/* แต่ละ activity section */
.timeline-activity-section {
  display: flex;
  flex-direction: column;
}

/* เพิ่ม spacing สำหรับ activities ที่ 2 เป็นต้นไป */
.timeline-activity-spaced {
  padding-top: 16px;
  border-top: 1px solid #EAECF0
}

/* เนื้อหาหลักของ activity */
.activity-content-simple {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative; /* เพิ่มเพื่อรองรับ tooltip */
  cursor: pointer; /* แสดงว่า hover ได้ */
}

/* เพิ่ม hover effect สำหรับ activity content */
/* .activity-content-simple:hover {
  background: var(--Color-Gray-50, #F9FAFB);
  border-radius: 6px;
  padding: 8px;
  margin: -8px;
  transition: all 0.2s ease;
} */


/* Label "อีเวนต์ที่เกิดขึ้น:" */
.event-label-simple {
  color: var(--text-secondary, #667085);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
}

/* Title ของ activity */
.activity-title-simple {
  color: var(--text-primary, #101828);
  font-family: "IBM Plex Sans Thai";
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 20px;
  margin-bottom: 4px;
}

/* Order ID */
.activity-order-id-simple {
  color: var(--secondary, #2B3BA6);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px;
  margin-bottom: 4px;
}

/* Timestamp */
.activity-timestamp-simple {
  color: var(--text-tertiary, #667085);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
  margin-bottom: 8px;
}

/* ส่วนของ icons */
.activity-icons-section {
  margin-bottom: 12px;
  width: 100%;
  overflow: hidden;  /* ป้องกันล้นขอบ */
}

.activity-icons-simple {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ส่วนของ source */
.activity-source-simple {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 8px;
}

/* Style สำหรับ Label "แหล่งที่มา:" */
.activity-source-simple .source-label {
  color: var(--Gray-900, #101828);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
}

/* Style สำหรับ Value (EXTERNAL/IMPORT, Offline) */
.activity-source-simple .source-value {
  color: var(--secondary-700-secondary, #2B3BA6);
  font-family: "IBM Plex Sans Thai";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px;
}

/* Activity icons styling */
.activity-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Hover effect สำหรับ day container */
/* .timeline-day-container:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease;
} */

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.no-data {
  text-align: center;
  padding: 20px;
  color: #999;
  font-style: italic;
}

.activity-icon-svg {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  margin-right: 4px;
  display: inline-block;
  flex-shrink: 0;
}

/* Vertical Tooltip Layout - เค้าโครงตามรูป */

.tooltip-text-event {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  /* border: 1px solid #D0D5DD; */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 1000;
  /* width: 320px; */
  transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-event:hover .tooltip-text-event {
  visibility: visible;
  opacity: 1;
}

/* Header */
.tooltip-header-event {
  font-size: 14px;
  font-weight: 600;
  color: #101828;
  text-align: left;
  padding: 4px 0px 0px 4px;
}

/* Content Container - แนวตั้ง */
.tooltip-content-event {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* Event Item - แต่ละแถว (Stack Layout) */
.tooltip-event-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid #E4E7EC;
  box-sizing: border-box;
  align-items: start;
}

.tooltip-event-item:last-child,
.tooltip-event-item:only-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Icon */
.tooltip-event-icon {
  width: 24px !important;
  height: 24px !important;
  grid-column: 1;
  margin-top: 2px;
}

/* Text Section */
.tooltip-event-content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

/* Event Title + Parameter */
.tooltip-event-text {
  font-size: 14px;
  font-weight: 500;
  color: #101828;
  line-height: 20px;
  margin-bottom: 4px;
  word-wrap: break-word;
  width: 100%;
}