/* =============================================================
   history.css — Spin History page styles
   VIB BTS World Tour ARIRANG Campaign
   Figma tokens:
     Brand/Blue banner:  #0057D6
     Brand/Light Orange: #FDB814
     Mono/Mono 1: #000000  Mono/Mono 2: #5E5C62
     Mono/Mono 4: #E4E4E4  Mono/Mono 5: #F2F2F2
     Mono/Mono 6: #FAFAFA  Mono/Mono 7: #FFFFFF
     Drop shadow 1: 0 1px 5px rgba(188,188,188,0.25)
     Font: Inter
============================================================= */

*, *::before, *::after { box-sizing: border-box; }

body.hist-page {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #FAFAFA;
  color: #000;
  font-size: 16px;
  line-height: 26px;
}

/* ============================================================
   HEADER — 77px, white, border-bottom #e4e4e4, logo centered
============================================================= */
.hist-header {
  background: #fff;
  border-bottom: 1px solid #E4E4E4;
  height: 77px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hist-header__inner {
  max-width: 1100px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#hist-popup-logout.fade.in {
    display: flex !important;
  }

 #hist-popup-logout .modal-dialog {
    margin: auto
  }

  #hist-popup-logout .modal-login-header {
    margin-bottom: 0px; 
    margin-top: 0px;
  }

/* Breadcrumb — absolute left */
.hist-header__breadcrumb {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  line-height: 26px;
}

.hist-header__breadcrumb-link {
  color: #000;
  text-decoration: none;
}

@media only screen and (min-width: 1025px) {
  .hist-header__breadcrumb-link:hover {
  text-decoration: underline;
  color: #000;
}
}

#hist-popup-general .box_modal_success {
  text-align: left;
}


.hist-header__breadcrumb-sep {
  color: #000;
  font-size: 14px;
}

.hist-header__breadcrumb-current {
  color: #000;
}

/* Logo — centered */
.hist-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 77px;
  height: 77px;
}

.hist-header__logo img {
  display: block;
}

/* ============================================================
   MAIN — py-40px
============================================================= */
.hist-main {
  /* min-height: calc(100vh - 77px); */
  min-height: calc(100vh - 493px); 
  padding: 40px 20px;
}

.hist-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* ============================================================
   SIDEBAR — 347px fixed width
============================================================= */
.hist-sidebar {
  width: 347px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Trở về */
.hist-back {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  line-height: 26px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
  transition: color 0.2s;
}

.icon-back {
  display: flex;
  align-items: center;
}

@media only screen and (min-width: 769px) {
  .hist-back:hover {
    color: #F47920;
  }
}

/* Profile card */
.hist-profile-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 1px 5px 0px rgba(188, 188, 188, 0.25);
  background: #fff;
  border: 1px solid #F2F2F2;
}

/* Card top image: 5px padding → 197px content inside */
.hist-profile-card__img-wrap {
 
  height: 202px;
}

.hist-profile-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 5px;
  object-fit: contain;
}

/* Card user info */
.hist-profile-card__body {
  padding: 0px 30px 0px 30px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hist-profile-card__greeting {
  font-size: 14px;
  line-height: 18px;
  color: #5E5C62;
  margin: 0;
  font-weight: 400;
}

.hist-profile-card__name {
  display: block;
  font-size: 24px;
  line-height: 30px;
  font-weight: 600;
  color: #000;
  margin: 0;
}

/* Logout row */
.hist-profile-card__footer {
  padding: 20px 30px 30px;
}

.hist-profile-card__logout {
  font-size: 16px;
  line-height: 26px;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  transition: color 0.2s;
}

@media only screen and (min-width: 769px) {
  .hist-profile-card__logout:hover {
    color: #F47920;
  }
}

/* ============================================================
   RIGHT CONTENT
============================================================= */
.hist-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

@media only screen and (max-width: 767px) {
  .hist-content {
    width: 100%;
  }
}

.hist-title {
  font-size: 24px;
  line-height: 30px;
  font-weight: 600;
  color: #000;
  margin: 0;
}

/* ============================================================
   LOADING
============================================================= */
.hist-loading {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #E4E4E4;
  padding: 48px 30px;
  text-align: center;
  color: #5E5C62;
  font-size: 16px;
}

/* ============================================================
   EMPTY STATE
   Figma: white, border #e4e4e4, rounded-20px, p-30px,
          flex-col, gap-20px, items-center
============================================================= */
.hist-empty {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #E4E4E4;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hist-empty__text {
  font-size: 16px;
  line-height: 26px;
  color: #5E5C62;
  margin: 0;
  text-align: center;
}

/* Button: #FDB814, rounded-25px, h-48px, px-30px */
.hist-empty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FDB814;
  color: #000;
  font-weight: 600;
  font-size: 16px;
  line-height: 26px;
  border-radius: 25px;
  height: 48px;
  padding: 0 30px;
  min-width: 125px;
  text-decoration: none;
  transition: color 0.3s ease, filter 0.15s;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hist-empty__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.hist-empty__btn:hover,
.hist-empty__btn:focus {
  filter: brightness(0.95);
  color: #000;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  #hist-empty a:hover,
  .hist-empty__btn:hover {
    color: #fff;
    filter: none;
    text-decoration: none;
  }

  #hist-empty a:hover::before,
  .hist-empty__btn:hover::before {
    opacity: 1;
  }
}

/* ============================================================
   LIST — Figma flex layout (replaces <table>)
   .hist-list__header  → blue pill, separate from body
   .hist-list__body    → white rounded container
   .hist-list__row     → each data row
   .hist-list__divider → 1px #E4E4E4 separator
============================================================= */
.hist-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Blue pill header row */
.hist-list__header {
  background: #0057D6;
  border-radius: 30px;
  display: flex;
  align-items: stretch;
  margin-bottom: 15px;
}

.hist-list__col {
  flex: 1;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  color: #fff;
}

/* White rounded rows container */
.hist-list__body {
  border: 1px solid #E4E4E4;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

/* Each row */
.hist-list__row {
  display: flex;
  align-items: stretch;
  background: #fff;
}

.hist-list__cell {
  flex: 1;
  padding: 15px 20px;
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  color: #000;
}

.hist-list__cell--time {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Divider between rows */
.hist-list__divider {
  height: 1px;
  background: #E4E4E4;
  margin: 0 20px;
}

/* ============================================================
   RESPONSIVE
============================================================= */
@media (max-width: 768px) {
  .hist-profile-card {
    display: none;
  }
  .hist-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 0px;
    align-items: flex-start;
    background: #FAFAFA;
  }

  .hist-layout {
    flex-direction: column;
  }

  .hist-sidebar {
    width: 100%;
    padding: 20px 20px 10px 20px;
  }

  .hist-main {
    padding: 0px;
  }

  .hist-title {
    font-size: 24px;
  }

  .hist-header__breadcrumb {
    font-size: 13px;
    left: 16px;
  }

  .hist-list__col,
  .hist-list__cell {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 400;
  }

  .hist-list__cell--time {
    display: block;
    white-space: pre-line;
  }

  .hist-content {
    padding: 30px 20px 30px 20px;
    background: #FFFFFF;
    box-shadow: 0 1px 5px 0 rgba(188, 188, 188, 0.25);
    margin-bottom: 40px;
  }
  
  #hist-popup-logout.fade.in .modal-dialog {
    transform: translateY(0) !important;
  }
  #hist-popup-logout .modal-dialog {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  #hist-popup-logout.fade .modal-dialog {
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .modal-logout-content {
    border-radius: 20px 20px 0 0 !important;
    padding: 20px 20px calc(40px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    max-height: 90vh;
    overflow-y: auto;
    height: auto;
    left: 0;
  }
  .modal-login-header {
    margin-bottom: 0;
    gap: 20px;
  }

  .modal-logout-actions {
    flex-direction: row;
    align-items: stretch;
    gap: 30px;
    display: flex;
  }
  .user-sheet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .is-inside-app .header-icon-btn {
    display: none;
  }
}