/* =========================================================
   TRIPY WEB DRAWER — APP PARITY
   Exact direction: one rounded top card, white overall bg,
   low side padding, shadowed cards, mobile/tablet/desktop
   ========================================================= */

#tripy-web-app .tripy-web-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

#tripy-web-app .tripy-web-drawer.is-open {
  pointer-events: auto;
}

#tripy-web-app .tripy-web-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.44);
  opacity: 0;
  transition: opacity 240ms ease;
}

#tripy-web-app .tripy-web-drawer.is-open .tripy-web-drawer__backdrop {
  opacity: 1;
}

#tripy-web-app .tripy-web-drawer__panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(430px, calc(100vw - 8px));
  max-width: 430px;
  height: 100vh;
  background: #ffffffd6;
  border-radius: 32px 32px 32px 32px;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 60px;
  overflow: hidden;
  transform: translateX(-105%);
  transition: transform 260ms ease;
  box-shadow: none;
}

#tripy-web-app .tripy-web-drawer.is-open .tripy-web-drawer__panel {
  transform: translateX(0);
  padding-left: 0px;
    margin-left: 0px;
}

#tripy-web-app .tripy-web-drawer__mount {
  height: 100%;
  padding: 0px 0px 18px;
  background: #ffffff00;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

#tripy-web-app .tripy-drawer {
  min-height: 100%;
  padding: 0;
  background: transparent;
  color: #111827;
}

/* =========================================================
   TOP COMBINED CARD
   ========================================================= */

#tripy-web-app .tripy-drawer__profile {
  position: relative;
  margin: 0 0 10px;
  padding: 0;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(18, 28, 60, 0.14);
  overflow: hidden;
}

/* gradient top part */
#tripy-web-app .tripy-drawer__profile-link {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 20px;
  gap: 14px;
  align-items: center;
  min-height: 138px;
  padding: 16px 18px 18px 18px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(135deg, #3090c8 0%, #3b67c0 46%, #6912ce 100%);
}

#tripy-web-app .tripy-drawer__profile-link::after {
  content: none;
}

/* avatar */
#tripy-web-app .tripy-drawer__avatar {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 4px solid rgba(125, 236, 255, 0.62);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

#tripy-web-app .tripy-drawer__avatar img {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  object-fit: cover;
  background: #ffffff;
}

#tripy-web-app .tripy-drawer__who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding-top: 2px;
}

#tripy-web-app .tripy-drawer__kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

#tripy-web-app .tripy-drawer__kicker-prefix {
  color: #ffffff;
  flex: 0 0 auto;
}

#tripy-web-app .tripy-drawer__kicker-name {
  color: #ffe55c;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tripy-web-app .tripy-drawer__who strong {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tripy-web-app .tripy-drawer__who span#tripy-web-drawer-user-email {
  display: none !important;
}

#tripy-web-app .tripy-drawer__chev {
  justify-self: end;
  align-self: center;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  opacity: 0.98;
}

#tripy-web-app .tripy-drawer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: none;
}

#tripy-web-app .tripy-drawer__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* =========================================================
   QUICK ACTIONS — INSIDE SAME TOP CARD
   ========================================================= */

#tripy-web-app .tripy-drawer__quickrow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 14px 14px;
  background: #ffffff;
}

#tripy-web-app .tripy-drawer-quick {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 2px;
  text-decoration: none;
  color: #111827;
}

#tripy-web-app .tripy-drawer-quick__emoji {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
  font-size: 24px;
}

#tripy-web-app .tripy-drawer-quick b {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

/* =========================================================
   SECTIONS AREA
   ========================================================= */

#tripy-web-app .tripy-drawer__sections {
  display: grid;
  gap: 14px;
  margin: 0;
}

#tripy-web-app .tripy-drawer-section {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 12px 24px rgba(22, 30, 61, 0.12);
  overflow: hidden;
}

#tripy-web-app .tripy-drawer-section__head {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 16px 14px 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

#tripy-web-app .tripy-drawer-section__emoji {
  font-size: 21px;
  line-height: 1;
}

#tripy-web-app .tripy-drawer-section__copy strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  color: #111827;
}

#tripy-web-app .tripy-drawer-section__copy small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(17, 24, 39, 0.58);
  font-weight: 600;
  line-height: 1.3;
}

#tripy-web-app .tripy-drawer-section__arrow {
  display: none;
}

#tripy-web-app .tripy-drawer-section__body {
  overflow: hidden;
  transition: height 220ms ease;
}

#tripy-web-app .tripy-drawer-section__inner {
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}

/* =========================================================
   TILE ROWS
   ========================================================= */

#tripy-web-app .tripy-drawer-tile {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 12px;
  border-radius: 16px;
  text-decoration: none;
  background: #f8f9fd;
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  color: #111827;
}

#tripy-web-app .tripy-drawer-tile__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 22px;
}

#tripy-web-app .tripy-drawer-tile__icon--flag {
  padding: 4px;
}

#tripy-web-app .tripy-drawer-tile__icon--flag img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

#tripy-web-app .tripy-drawer-tile__copy {
  min-width: 0;
}

#tripy-web-app .tripy-drawer-tile__copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
}

#tripy-web-app .tripy-drawer-tile__copy small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  color: rgba(17, 24, 39, 0.60);
}

#tripy-web-app .tripy-drawer-tile__chev {
  opacity: 0.48;
  font-size: 26px;
  line-height: 1;
  color: #6b7280;
}

#tripy-web-app .tripy-drawer-tile__lock {
  color: #dc2626;
  font-size: 18px;
}

#tripy-web-app .tripy-drawer-tile.is-locked {
  opacity: 0.95;
}

#tripy-web-app .tripy-drawer-tile.is-highlight {
  background: linear-gradient(135deg, #1e1b4b, #312e81, #6366f1);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  color: #ffffff;
}

#tripy-web-app .tripy-drawer-tile.is-highlight .tripy-drawer-tile__copy strong {
  color: #ffffff;
}

#tripy-web-app .tripy-drawer-tile.is-highlight .tripy-drawer-tile__copy small {
  color: rgba(255, 255, 255, 0.82);
}

#tripy-web-app .tripy-drawer-tile.is-highlight .tripy-drawer-tile__icon {
  background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   DROPDOWNS
   ========================================================= */

#tripy-web-app .tripy-drawer-dd {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: #ffffff;
  overflow: hidden;
}

#tripy-web-app .tripy-drawer-dd__head {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

#tripy-web-app .tripy-drawer-dd__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 22px;
}

#tripy-web-app .tripy-drawer-dd__copy {
  min-width: 0;
}

#tripy-web-app .tripy-drawer-dd__copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
}

#tripy-web-app .tripy-drawer-dd__copy small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(17, 24, 39, 0.60);
}

#tripy-web-app .tripy-drawer-dd__arrow {
  transition: transform 200ms ease;
  opacity: 0.58;
  font-size: 24px;
  color: #6b7280;
}

#tripy-web-app .tripy-drawer-dd__head[aria-expanded="true"] .tripy-drawer-dd__arrow {
  transform: rotate(90deg);
}

#tripy-web-app .tripy-drawer-dd__body {
  overflow: hidden;
  transition: height 220ms ease;
}

#tripy-web-app .tripy-drawer-dd__inner {
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}

/* =========================================================
   ATTENTION / MODAL
   ========================================================= */

@keyframes tripyPulse {
  0%, 100% { box-shadow: 0 12px 24px rgba(22, 30, 61, 0.12); }
  50% { box-shadow: 0 16px 34px rgba(220, 38, 38, 0.18); }
}

#tripy-web-app .tripy-drawer-section.is-attention {
  animation: tripyPulse 1.6s ease-in-out infinite;
}

#tripy-web-app .tripy-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 9999;
}

#tripy-web-app .tripy-modal.is-open {
  opacity: 1;
  transform: scale(1);
}

#tripy-web-app .tripy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

#tripy-web-app .tripy-modal__card {
  position: relative;
  width: min(520px, calc(100% - 32px));
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

#tripy-web-app .tripy-modal__title {
  font-size: 16px;
  font-weight: 900;
  color: #111827;
}

#tripy-web-app .tripy-modal__body {
  margin-top: 8px;
  color: rgba(17, 24, 39, 0.75);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
}

#tripy-web-app .tripy-modal__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 641px) and (max-width: 1024px) {
  #tripy-web-app .tripy-web-drawer__panel {
    width: min(442px, calc(100vw - 34px));
  }

  #tripy-web-app .tripy-web-drawer__mount {
    padding: 0px 0px 20px;
  }

  #tripy-web-app .tripy-drawer__profile-link {
    min-height: 144px;
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 18px 46px 18px 18px;
  }

  #tripy-web-app .tripy-drawer__avatar {
    width: 86px;
    height: 86px;
  }

  #tripy-web-app .tripy-drawer__avatar img {
    width: 72px;
    height: 72px;
  }
}

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 1025px) {
  #tripy-web-app .tripy-web-drawer__panel {
    width: min(450px, 32vw);
    max-width: 450px;
  }

  #tripy-web-app .tripy-web-drawer__mount {
    padding: 0px 0px 20px;
  }

#tripy-web-app .tripy-drawer__profile-link {
  min-height: 150px;
  grid-template-columns: 88px minmax(0, 1fr) 22px;
  padding: 18px 18px 18px 18px;
}

  #tripy-web-app .tripy-drawer__avatar {
    width: 88px;
    height: 88px;
  }

  #tripy-web-app .tripy-drawer__avatar img {
    width: 74px;
    height: 74px;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 640px) {
  #tripy-web-app .tripy-web-drawer__panel {
   width: min(430px, calc(100vw - 56px));
        border-radius: 28px 28px 28px 28px;
  }

  #tripy-web-app .tripy-web-drawer__mount {
    padding: 0px 0px 20px;
  }

  #tripy-web-app .tripy-drawer__profile {
    border-radius: 24px;
    margin-bottom: 12px;
  }

 #tripy-web-app .tripy-drawer__profile-link {
  grid-template-columns: 76px minmax(0, 1fr) 18px;
  gap: 12px;
  min-height: 132px;
  padding: 14px 14px 16px 14px;
}

#tripy-web-app .tripy-drawer__profile-link::after {
  content: none;
}

  #tripy-web-app .tripy-drawer__avatar {
    width: 76px;
    height: 76px;
  }

  #tripy-web-app .tripy-drawer__avatar img {
    width: 64px;
    height: 64px;
  }

  #tripy-web-app .tripy-drawer__kicker {
    font-size: 15px;
  }

  #tripy-web-app .tripy-drawer__who strong {
    font-size: 14px;
  }

  #tripy-web-app .tripy-drawer__quickrow {
    gap: 10px;
    padding: 14px 12px 12px;
  }

  #tripy-web-app .tripy-drawer-quick__emoji {
    width: 52px;
    height: 52px;
    font-size: 23px;
  }

  #tripy-web-app .tripy-drawer-quick b {
    font-size: 12.5px;
  }

  #tripy-web-app .tripy-drawer-section {
    border-radius: 20px;
  }

  #tripy-web-app .tripy-drawer-section__head {
    padding: 15px 12px 10px;
  }

  #tripy-web-app .tripy-drawer-section__inner {
    padding: 0 10px 10px;
  }

  #tripy-web-app .tripy-drawer-tile {
    gap: 10px;
    padding: 12px 10px;
  }

  #tripy-web-app .tripy-drawer-dd__head {
    gap: 10px;
    padding: 12px 10px;
  }

  #tripy-web-app .tripy-drawer-dd__inner {
    padding: 0 10px 10px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  #tripy-web-app .tripy-web-drawer__backdrop,
  #tripy-web-app .tripy-web-drawer__panel,
  #tripy-web-app .tripy-drawer-section__body,
  #tripy-web-app .tripy-drawer-dd__body,
  #tripy-web-app .tripy-drawer-dd__arrow,
  #tripy-web-app .tripy-modal {
    transition: none;
  }

  #tripy-web-app .tripy-drawer-section.is-attention {
    animation: none;
  }
}