/* ============================
   1. Guest card content overflow fixes
   ============================ */
.row > * {
  flex-shrink: 1 !important;      /* Allow flex items to shrink */
  min-width: 0 !important;        /* Required for flex-shrink to work properly */
}

.guest-card-content {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}

.row {
  overflow-x: hidden;             /* Prevent horizontal scrollbar due to minor overflow */
}

/* ============================
   2. Mobile: Force 1 card per row on mobile (fix spilling)
   ============================ */
@media (max-width: 767px) {
  .row.row-cards > [class*='col-'] {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    flex: 0 0 100% !important;    /* Full width */
    max-width: 100% !important;
    width: 100% !important;
  }

  .card {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .card-body {
    flex: 1 1 auto;
  }
}

/* ============================
   3. Button hover styles
   ============================ */
.btn:hover {
  background-color: #f59f0033 !important;  /* Orange */
  color: white !important;               /* Keep text visible */
  border-color: #292828 !important;
}


/* ============================
   4. Header base styles
   ============================ */
.navbar {
  background: transparent !important;
  transition: all 0.2s ease-in-out;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1030;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  border: none !important;
  box-shadow: 0 1px 2px #000000;
  padding: 0.5rem 0.5rem;   /* keep inner spacing instead of margin */
}

.navbar.scrolled .container-fluid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;               /* makes centering easier */
  width: 97%;             /* or max-width if you want it tighter */
  max-width: 1300px;      /* keeps consistent size on wide screens */
  margin: 0 auto;         /* centers horizontally */  
  background: #1f2937 !important;
  border-radius: 0 0 2rem 2rem;
  box-shadow: 0 6px 10px #000000ea;
  transition: all 0.2s ease-in-out;
  padding: 0.5rem 0.75rem;        /* even padding left & right */
  animation: slideDown 0.2s ease forwards;
  z-index: 1030;
}

/* Navbar items */
.navbar * {
  z-index: 3000;
  background: transparent !important; /* keep items transparent */
  color: #fff;
  padding-top: 0;
  padding-bottom: 0;
}

.navbar .nav-item.dropdown .dropdown-menu {
  background: #0c1420ee !important;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Slide-down animation */
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

.navbar-brand {
  background: transparent !important;
}

.navbar-brand img {
  display: block;
  height: 3.5rem;
  width: auto;
  pointer-events: none;
  margin-top: -2px;
  transition: height 0.3s ease; /* shrink on scroll */
}

/* Shrink logo when scrolled */
.navbar.scrolled .navbar-brand img {
  height: 2.6rem;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
  height: 2.5rem;
  width: 2.5rem;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255, 0.9%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .avatar.avatar-sm {
  height: 2.2rem;
  width: 2.2rem;
  margin-top: 0;
}

/* ===================================
Reduce padding on tablets so items fit */
@media (min-width: 768px) and (max-width: 991px) {
  /* Reduce logo size just for tablet screens */
  .navbar-brand img {
    width: 50px !important;
    height: 50px !important;
    flex-shrink: 0 !important;   /* Prevent logo compression */
  }

  .navbar .container-fluid {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Shrink gap between right-side icons */
  .navbar-nav.order-md-last .nav-link {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Prevent username block from forcing overflow */
  .navbar .nav-item .ps-2 {
    display: none !important;
  }

  /* Allow items to shrink proportionally */
  .navbar-nav.order-md-last,
  .navbar-brand {
    flex-shrink: 1;
  }
}

/* ============================
   5. Dropdown menu animation
   ============================ */
.dropdown-menu {
  border-radius: 0.4rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
  visibility: hidden;
  z-index: 2500;                        /* Page header filter dropdowns above guest cards */
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.navbar .dropdown-menu {
  margin-top: 0.25rem;
  z-index: 3000;                        /* Navbar dropdowns above everything */
}

/* ============================
   6. Dropend fixes for desktop
   ============================ */
@media (min-width: 768px) {
  .navbar-nav .dropend {
    position: relative;
  }

  .navbar-nav .dropend .dropdown-menu {
    position: absolute !important;
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: 0.1rem;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
    z-index: 3000 !important;           /* navbar dropends above page header */
  }

  .navbar-nav .dropend:hover > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .dropend > .dropdown-toggle::after {
    transform: rotate(90deg);
  }
}

/* Nested dropend inside page header dropdowns */
@media (min-width: 768px) {
  .dropdown-menu .dropend {
    position: relative;
  }

  .dropdown-menu .dropend .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: 0.1rem;
    display: none;
    opacity: 0;
    visibility: hidden;
    background-color: #1F2937 !important;
    z-index: 2500 !important;           /* inside page header dropdowns */
  }

  .dropdown-menu .dropend:hover > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* ============================
   7. Dropup fix
   ============================ */
.dropup .dropdown-menu {
  margin-bottom: 0.5rem;
}

/* ============================
   8. Mobile responsiveness
   ============================ */
@media (max-width: 767px) {
  .navbar-nav {
    padding: 0.5rem 0;
  }

  /* Shrink logo when scrolled */
  .navbar.scrolled .navbar-nav {
    padding: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .nav-link {
    padding: 0.5rem 1rem;
  }

  .navbar {
    height: auto !important;
    position: relative;
    z-index: 1050;
    min-height: 3.5rem !important;
  }

  .navbar-brand img {
    height: 2.4rem;
    margin-top: -2px;
  }

  .navbar .avatar.avatar-sm {
    height: 1.8rem;
    width: 2rem;
  }

  .navbar-toggler {
    height: 2rem;
    width: 2.2rem;
  }

  .navbar-toggler svg {
    pointer-events: none; /* make sure clicks go to button */
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
  }

  .icon-tabler-menu-deep,
  .icon-tabler-x {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }

  .icon-tabler-menu-deep.hidden,
  .icon-tabler-x.hidden {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
    pointer-events: none;
  }

  .navbar-collapse.collapse {
    transition: height 0.35s ease;
    overflow: visible;
    position: relative;
    z-index: 1060;
    background: transparent !important;
    color: #fff !important;
  }

  .navbar-collapse .dropdown-menu {
    transform: none;
    visibility: visible;
    display: none;
    z-index: 1070 !important;
    position: static;
    background: #111827b0 !important;
    color: #fff !important;
    border: none;
    padding: 0.5rem 0;
  }

  .navbar-collapse .dropdown-menu.show {
    display: block;
  }

  .navbar-collapse .dropdown-menu .dropdown-menu {
    background-color: #1F2937 !important;
    border: none;
  }

  .navbar-collapse .dropdown-item {
    color: #fff !important;
  }

  .navbar-collapse .dropdown-item:hover {
    background-color: #374151 !important;
  }

  /* Logo centering fix on mobile */
  .navbar > .container-xl {
    position: relative;
  }

  .navbar-brand.navbar-brand-autodark {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000;
  }

  .navbar-nav.flex-row.order-md-last {
    margin-left: auto;
  }
}

@media (min-width: 768px) {
  .navbar-brand.navbar-brand-autodark {
    position: static !important;
    transform: none !important;
  }
}

/* ============================
   9. Page styles
   ============================ */
.page {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 10%;
}

/* ============================
   10. Guest card footer & buttons
   ============================ */
.card .d-flex.w-100 {
  flex-wrap: nowrap;
  overflow: visible;               /* Allow dropdowns to spill */
  padding-top: 0.5rem;
  margin-top: auto;
  min-height: 3rem;
}

.card .card-btn {
  flex: 1 1 50%;
  padding: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.card .card-btn svg {
  flex-shrink: 0;
}

.card .card-btn svg.icon {
  width: 18px;
  height: 18px;
}

.card {
  overflow: visible !important;
}

.dropdown-menu {
  z-index: 2000 !important;       /* guest card dropdowns below page header filters */
}

.icon.rotate {
  transform: rotate(180deg);
  transition: transform 0.3s ease-in-out;
}

.row.row-deck .card {
  border-radius: 24px;
}

/* ============================
   11. Advanced table layout fixes
   ============================ */
#advanced-table .table thead th:nth-child(2),
#advanced-table .table tbody td:nth-child(2) {
  width: 45%; /* Note column */
}

#advanced-table .table thead th:nth-child(3),
#advanced-table .table tbody td:nth-child(3) {
  width: 18%; /* Status */
}

#advanced-table .table thead th:nth-child(4),
#advanced-table .table tbody td:nth-child(4) {
  width: 15%; /* Service */
}

#advanced-table .table thead th:nth-child(5),
#advanced-table .table tbody td:nth-child(5) {
  width: 7.5%; /* Review */
}

#advanced-table .table thead th:nth-child(1),
#advanced-table .table tbody td:nth-child(1) {
  width: 12%; /* Date */
}

#advanced-table .table thead th:nth-child(3),
#advanced-table .table tbody td:nth-child(3),
#advanced-table .table thead th:nth-child(4),
#advanced-table .table tbody td:nth-child(4),
#advanced-table .table thead th:nth-child(5),
#advanced-table .table tbody td:nth-child(5) {
  white-space: nowrap;
}

.note-cell {
  white-space: normal;
  text-align: left;
  color: #6c757d;
}

#advanced-table .table thead th {
  text-align: center;
  color: var(--bs-body-color);
  font-weight: 600;
}

#advanced-table .table tbody td:not(.note-cell) {
  text-align: center;
  vertical-align: middle;
}

#channel-of-visit-table th:first-child,
#channel-of-visit-table td:first-child {
  white-space: nowrap;
  width: 40%;
}

/* ============================
   12. Card footer styles
   ============================ */
.card-footer.d-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-footer .text-center.text-muted {
  flex-grow: 1;
  text-align: center;
}

.card-footer .pagination {
  margin: 0;
  margin-left: auto;
}

.card-footer:has(.text-center.text-muted) .pagination {
  display: none;
}

.card-footer:not(:has(.text-center.text-muted)) .pagination {
  display: flex;
}

/* Dropdown wrapper */
.notif-dropdown,
.dropdown-menu-card {
    max-width: 300px;        /* narrower width */
    min-width: 250px;
    width: 100%;             /* responsive */
}

/* Inner card must not overflow */
.notif-dropdown .card {
    width: 100% !important;
    min-width: 0; /* allow shrinking */
}

/* Scrollable notification list */
.notif-dropdown .list-group,
#notif-list {
    max-height: 400px;       /* max height for scroll */
    overflow-y: auto;        /* vertical scrollbar when needed */
}

/* Optional: nice scrollbar for Webkit browsers */
#notif-list::-webkit-scrollbar {
    width: 6px;
}

#notif-list::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

#notif-list::-webkit-scrollbar-track {
    background: transparent;
}

/* Truncate long text */
.notif-dropdown .notif-item .text-truncate,
.notif-dropdown .notif-item .notif-link.text-truncate {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .notif-dropdown {
        max-width: 90vw !important;
    }

    #notif-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 576px) {
    .notif-dropdown {
        max-width: 90vw !important;
    }
}

/************************/
/* Dashboard Welcome Text
/************************/
@keyframes typing {
  0% { width: 0; }
  60%, 80% { width: 100%; }
  100% { width: 0; }
}

@keyframes fadeText {
  0%, 90%, 100% { opacity: 0; }
  10%, 80% { opacity: 1; }
}

.typing-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 600;
  vertical-align: middle;
  width: 0;
  color: var(--user-color);
  animation: typing 6s steps(20, end) infinite, fadeText 6s ease-in-out infinite;
}


/* Dashboard User Marquee Scroll */
/* Continuous marquee effect */
.scroll-container {
  position: relative;
}

.scroll-wrapper {
  --speed: 80s;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 64px, black calc(100% - 64px), transparent 100%);
}

/* Fixed overlay at the left edge of the marquee */
.team-name-overlay {
  position: absolute;
  left: 5px;
  top: 70%;
  transform: translateY(-50%);
  z-index: 20; /* above the marquee track */
  font-size: 0.6rem;
  background: #1F2937; /* semi-transparent for readability */
  color: white;
  box-shadow: 0 4px 8px #000000d2;
  font-style: italic;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  white-space: nowrap;
  pointer-events: none; /* allow scrolling behind it */
}

.scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.scroll-track {
  display: flex;
  gap: 1rem;
  min-width: max-content;
  animation: scroll-marquee var(--speed) linear infinite;
  scroll-snap-type: x mandatory;
  will-change: transform;
}

.user-card-wrapper {
  scroll-snap-align: start;
  list-style: none;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  box-shadow: #000000;
}

.user-card-wrapper:hover {
  transform: scale(1.05);
}

/* The continuous scroll illusion */
@keyframes scroll-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Pauses animation on hover for manual scroll */
.scroll-wrapper:hover .scroll-track {
  animation-play-state: paused;
}

/* Optional soft shadow for contrast */
.user-card-wrapper .user-card {
  box-shadow: 0 4px 8px #000000d2;
  padding: 0 auto;
}


/* Team - Role Switch Animation - User List */
.team-role-container {
  min-width: 280px;
  height: 24px; /* Adjust to your badge height */
}

.team-role-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.5s ease, opacity 0.5s ease;
  font-size: small;
}

.team-role-item.slide-out {
  opacity: 0;
  transform: translateY(100%);
}

.team-role-item.slide-in {
  opacity: 0;
  transform: translateY(-100%);
}


/* Team Switch Animation - Dashboard */
.team-container {
  min-width: 120px;
  height: 20px; /* Adjust to your badge height */
}

.team-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.team-item.slide-out {
  opacity: 0;
  transform: translateY(100%);
}

.team-item.slide-in {
  opacity: 0;
  transform: translateY(-100%);
}


/* Magnet Guest Count */
.gradient-border {
  position: relative;
  display: inline-block;
  border-radius: 6px;
  padding: 4px 8px;
  background: #1e1e1e;
  z-index: 0;
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* border thickness */
  border-radius: inherit;
  background: linear-gradient(90deg, 
    #f59f008c, 
    #394255, 
    #ffd04d, 
    #f97316, 
    #14f50088);
  background-size: 400% 400%;
  animation: borderflow 6s linear infinite;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  /* Standard mask for non-WebKit browsers */
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
}

@keyframes borderflow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}

/* New Guest Badge */
.new-badge-gradient {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.new-badge-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* border thickness */
  border-radius: inherit;
  background: linear-gradient(90deg, 
    #f59f008c, 
    #394255, 
    #ffd04d, 
    #f97316, 
    #14f50088);
  background-size: 400% 400%;
  animation: borderflow 6s linear infinite;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  /* Standard mask for non-WebKit browsers */
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
}

@keyframes borderflow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}


/* New Guest Badge */
.chat-room-banner-gradient {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.chat-room-banner-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* border thickness */
  border-radius: inherit;
  background: linear-gradient(90deg, 
    #f59f008c, 
    #394255, 
    #ffd04d, 
    #f97316, 
    #14f50088);
  background-size: 400% 400%;
  animation: borderflow 6s linear infinite;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  /* Standard mask for non-WebKit browsers */
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
}

@keyframes borderflow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}







/* Popup styling */
#userGuestPopup { position: fixed; top: 0; left:0; right:0; bottom:0; z-index:2000; }
#userGuestPopup .popup-backdrop { position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);}
#userGuestPopup .popup-content { position:absolute;top:50%;left:50%;transform:translate(-50%,-50%); background:#111827; color:#fff; width:70%; max-height:80%; border-radius:8px; overflow:hidden; display:flex; flex-direction:column; }
#userGuestPopup .popup-header { padding:0.5rem; border-bottom:1px solid #1F2937; }
#userGuestPopup .popup-body { flex-grow:1; overflow-y:auto; padding:0.5rem; }
.user-item { margin-bottom:0.25rem; cursor:pointer; border-radius:4px; padding:4px; }
/*.user-item:hover { background:#333; }*/
.guest-list { margin-left:20px; margin-top:2px; }
.guest-item { display:flex; align-items:center; padding:2px 4px; margin-bottom:2px; cursor:pointer; border-radius:4px; }
/*.guest-item:hover {}*/
.guest-avatar { width:28px; height:28px; border-radius:4px; margin-right:6px; object-fit:cover; }
.badge-assigned { background-color:#28a745; margin-left:auto; font-size:10px; padding:2px 4px; border-radius:4px; }
.badge-unassigned { background-color:#ffc107; margin-left:auto; font-size:10px; padding:2px 4px; border-radius:4px; }

/* Reply preview styles */
.highlight-chat-bubble {
  box-shadow: 0 0 12px #4ade80 !important;
  transition: box-shadow 0.3s ease-in-out;
}
.reply-preview {
  background-color: #374151;
  border-left: 4px solid #3b82f6;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
}

#chatInput {
    transition: height 0.15s ease;
  }

.data.message {
  white-space: pre-wrap; /* preserves newlines and wraps text */
  word-break: break-word; /* optional: prevents overflow */
}


.chat-bubble-date {
  position: absolute;
  bottom: 2px;
  right: 6px;
}

/*.chat-bubble { position: relative; }*/

.mention-dropdown {
  position: absolute;
  background: #1f2937; /* dark background */
  color: white;
  border-radius: 6px;
  padding: 4px 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2000;
  display: none;
  max-width: 80px;
  font-size: 0.875rem;
  transition: opacity 0.15s ease;

  /* ✅ Critical mobile fixes */
  -webkit-overflow-scrolling: touch;   /* Smooth momentum scroll */
  overscroll-behavior: contain;        /* Prevent scroll bleed */
  touch-action: pan-y;                 /* Allow vertical scroll only */
}
.mention-dropdown::-webkit-scrollbar {
  width: 6px;
}
.mention-dropdown::-webkit-scrollbar-thumb {
  background-color: #4b5563;
  border-radius: 3px;
}
.mention-item {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  gap: 8px;
}
.mention-item:hover,
.mention-item.active {
  background: #111827;
}
.mention-item .avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}
.mention-item .user-info {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  align-items: center;
  gap: 6px;
}
.mention-item .user-info .name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mention-item .user-info .title {
  font-style: italic;
  font-size: 0.75rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* -------------- Chat options / selection / flags -------------- */

/* Selected bubble highlight */
.chat-bubble.selected {
  outline: 2px solid #f59f00;
  box-shadow: 0 0 12px #f59f009a;
  transform: translateZ(0);
}

/* Flags container (outside bubble, bottom-left) */
.chat-bubble-flags {
  position: absolute;
  bottom: -10px;
  left: -10px;
  display: flex;
  gap: 0.5px;
  align-items: center;
  font-size: 0.85rem;
  z-index: 20;
  pointer-events: none;
}


.chat-bubble-flags .mention-flag {
  color: #00aeff;
  background: none !important;
  padding: 2px;
  border-radius: 8px;
  font-weight: 300;
  animation: mention-bounce 1.2s infinite ease-in-out;
}

.chat-bubble-flags .pin-flag {
  color: #e703fc;
  background: none !important;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 300;
}

@keyframes mention-bounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* Options panel (vertical, right sticky inside chat container) */
.options-panel {
  position: absolute;        /* absolute inside chat container */
  top: 116px;                  /* center vertically */
  right: 5px;               /* stick to the right */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;    /* stack buttons vertically */
  gap: 10px;
  padding: 10px 6px;
  background: #1f2937;
  color: #f59f00;
  border-radius: 16px;
  box-shadow: 0 4px 8px #000000d2;
  transition: opacity 180ms ease, transform 200ms cubic-bezier(.2,.9,.3,1);
  z-index: 1000;
  opacity: 1;
}

.options-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.95);
}

.options-panel button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #e6eef6;
  padding: 8px;
  font-size: 1.1rem;
  border-radius: 8px;
}
.options-panel button:hover { background: rgba(255,255,255,0.08); }


/* Inline edit textarea */
.chat-edit-input {
  width: 100%;
  min-height: 56px;
  padding: 8px;
  border-radius: 8px;
  border: 1px dashed rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: inherit;
  resize: vertical;
}

/* floating scroll-to-bottom arrow */
.scroll-to-bottom {
  position: absolute;
  right: 5px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #1f2937;
  color: #f59f00;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px #000000d2;
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms, transform 180ms;
}
.scroll-to-bottom.show { opacity: 1; transform: translateY(0); }
.scroll-to-bottom:hover { background: #111827; }

/* Bounce for new guest */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

.badge-bounce {
  display: inline-block;
  animation: bounce 1s infinite;
}

/* Wiggle for review badge */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.badge-wiggle {
  display: inline-block;
  animation: wiggle 0.6s infinite;
  transform-origin: center;
}

/* Optional: make wrapper align badge correctly */
.badge-wrapper {
  transform: translate(-50%, -50%);
}

.chat-bubble-body .mention {
  font-weight: 600;             /* slightly bold */
  background-color: transparent !important; /* remove gray bg */
  border: none !important;      /* remove any border */
  outline: none !important;     /* remove outline */
  box-shadow: none !important;  /* remove box-shadow if any */
  padding: 0;                   /* optional: remove extra spacing */
  margin: 0;                    /* optional: remove extra spacing */
}

/* ================== TEAM SELECTOR ================== */
.team-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px 10px;
  justify-content: center;
}

.team-selector .team-btn {
  border: none;
  border-radius: 14px;
  color: #fff;
  padding: 8px 10px;
  gap: 2px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 0 #000000d2;
}

.team-selector .team-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.team-selector .team-btn.active-team {
  transform: scale(0.85);
  box-shadow: inset 0 3px 6px #000000d2;
  opacity: 0.95;
  background: #f59f0080;
}

/* Default: show inactive icon, hide active icon */
.team-icon-active {
  display: none;
}

.active-team .team-icon-inactive {
  display: none;
}

.active-team .team-icon-active {
  display: inline-block;
}


/* ================== TEAM USER STRIP WRAPPER ================== */
#activeUserListWrapper {
  position: relative;
  top: 0;
  z-index: 50;
  display: block;
  width: 100%;
  background: #111827;
  padding: 0;
  max-height: 0;
  box-sizing: border-box;
  border-radius: 10px;
  overflow: hidden;
  max-height: 0; /* hidden by default */
  transition: max-height 0.3s ease, padding 0.3s ease, top 0.3s ease;
}

#activeUserListWrapper.visible {
  min-height: 80px; /* expanded height */
  padding: 4px 6px;
}

/* INNER horizontal scroller */
#activeUserList {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  width: 100%;
  height: 80px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbars on all browsers */
#activeUserList::-webkit-scrollbar { display: none; }
#activeUserList { -ms-overflow-style: none; scrollbar-width: none; }

/* Scrollbar thumb for desktop */
.team-user-strip::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

/* ================== USER CARD ================== */
.user-card {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 180px;
  border-radius: 10px;
  padding: 1px 2px;
  background: #1f2937;
  transition: transform 0.2s ease, background 0.2s ease;
}

.user-card:hover {
  transform: scale(0.98);
  background: rgba(255,255,255,0.1);
}

/* ONLINE DOT */
.online-dot {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #2ecc71;
  border: 2px solid var(--tblr-bg-surface, #1e1e1e);
  box-shadow: 0 0 3px rgba(46, 204, 113, 0.6);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.user-card:not(.online) .online-dot {
  display: none;
}

.online-badge {
  display: none; /* default hidden */
}
.user-card[data-online="true"] .online-badge {
  display: block;
}


/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
  #activeUserListWrapper.visible {
    min-height: 60px; /* expanded height */
    padding: 4px 6px;
  }

  #activeUserList {
    display: flex;
    align-items: center; /* vertically center inside wrapper */
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 4px 6px;
    max-height: 60px;
    border-radius: 10px;
  }

  .user-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 120px;
    padding: 1px 2px;
    border-radius: 10px;
    flex: 0 0 auto;
    background: #1f2937;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .user-card .card-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 0.2rem; /* tighter spacing */
    padding: 2px 4px;
  }

  .user-card img,
  .user-card .avatar {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
  }

  .user-card .flex-grow-1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}


#stickyDateHeader {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #f59f00; /* text-yellow-800*/
  background-color: #1f2937; /* bg-yellow-lt*/
  box-shadow: 0 4px 8px #000000d2;
  text-align: center;
  justify-content: center;
  margin: 0 auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
}


/* Apply only to the reply message text */
.reply-preview-text {
  flex: 1 1 auto;                     /* take up remaining space */
  min-width: 0;                /* ✅ prevent overflow squeeze */
  display: -webkit-box;
  -webkit-line-clamp: 3;       /* clamp to 3 lines */
  line-clamp: 3;               
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.2;
}

#replyPreview,
#guestPreview {
  width: 100%;
  flex-shrink: 0; /* don’t collapse */
}

/* Textarea Formatting 
#chatInput {
    width: 100%;
    min-height: 40px;
    max-height: 100px;
    line-height: 20px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    resize: none;
  }*/

.preview {
  position: fixed !important;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  padding: 10px;
  background: #343531;
  color: white;
  font-family: monospace;
  white-space: pre-wrap;
  max-width: 200px;
  overflow-wrap: break-word;
  z-index: 10000;
  font-size: 0.65rem;
  border-radius: 0.5rem;
}

.highlight { background-color: #8eb615; color: white; }

.numbered-line,
.nested-line {
  display: block;
  white-space: pre; /* keeps exact indentation (even at line start) */
  font-family: inherit;
  margin: 0;
}

.numbered-line {
  margin-left: 1rem;
}

.nested-line {
  margin-left: 2rem;
}




/* Bold and italic are <b> and <i> */
.chat-bubble-body i {
  font-style: italic;
  color: #ffa600b4; /* purple for numbers/bullets */
}

.chat-bubble-body b {
  font-weight: 900;
  color: #ffa600;
}

.chat-bubble-body u {
  text-decoration: underline;
  color: #ffa600cc; /* blue for underline */
}

/* Highlight overrides inner colors */
.chat-bubble-body .highlight {
  background-color: #ffa60098;
  color: white !important;   /* override normal bold/italic color */
  border-radius: 3px;
  padding: 0 3px;
}
.chat-bubble-body .highlight b,
.chat-bubble-body .highlight i,
.chat-bubble-body .highlight u {
  color: inherit !important;   /* force highlighted color */
}



.chat-bubble-body .message-row {
  font-weight: 300;
}


#chatInput {
  min-height: 20px;
  line-height: 20px;
  white-space: pre-wrap; /* preserve newlines */
}








@media (max-width: 768px) {
  #chatBackBtn {
    display: inline-flex; /* visible on mobile */
    align-items: center;
    justify-content: center;
  }
}

/* Desktop keeps column layout */
@media (min-width: 769px) {
  #chatBackBtn {
    display: inline-flex; /* hide back button on desktop */
  }
}






/* ============================
   8. Mobile Chat responsiveness
   ============================ */
@media (max-width: 767px) {
  .navbar-chat .navbar-nav {
    padding: 0.5rem 0.5rem;
  }

  .navbar-chat.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;               /* makes centering easier */
    width: 97%;             /* or max-width if you want it tighter */
    max-width: 1300px;      /* keeps consistent size on wide screens */
    margin: 0 auto;         /* centers horizontally */  
    background: #1f2937 !important;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 6px 10px #000000ea;
    transition: all 0.2s ease-in-out;
    padding: 0.25rem 0.2rem;        /* even padding left & right */
    animation: slideDown 0.2s ease forwards;
    z-index: 1030;
  }

  /* Navbar items */
  .navbar * {
    z-index: 3000;
    background: transparent !important; /* keep items transparent */
    color: #fff;
    padding-top: 0;
    padding-bottom: 0;
  }

  .navbar .nav-item.dropdown .dropdown-menu {
    background: #0c1420ee !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  /* Slide-down animation */
  @keyframes slideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
  }

  .navbar-chat .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    height: 2.5rem;
    width: 2.5rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Shrink logo when scrolled */
  .navbar-chat.scrolled .navbar-nav {
    padding: 0.25rem 0.25rem;
    margin-left: 0;
    margin-right: 0;
  }

  .navbar-chat {
    height: auto !important;
    position: relative;
    z-index: 1050;
    min-height: 3.5rem !important;
  }

  .navbar-chat .navbar-toggler svg {
    pointer-events: none; /* make sure clicks go to button */
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
  }

  .navbar-chat .icon-tabler-menu-deep,
  .navbar-chat .icon-tabler-x {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }

  .navbar-chat .icon-tabler-menu-deep.hidden,
  .navbar-chat .icon-tabler-x.hidden {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
    pointer-events: none;
  }

  .navbar-chat .navbar-collapse.collapse {
    transition: height 0.35s ease;
    overflow: visible;
    position: relative;
    z-index: 1060;
    background: transparent !important;
    color: #fff !important;
  }

  .chat-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(var(--vh, 1vh) * 100); /* full screen minus header */
    overflow: hidden;
    padding-top: 45px; /* push content below header */
    bottom: 0;
  }

  .chat-wrapper .chat-column .card-footer {
    position: sticky;
    bottom: 0;
    z-index: 50;
    padding: 0 0;
    width: 95%;
    margin: 0.25rem auto;
    background: #111827 !important;
    box-shadow: 0 6px 10px #000000ea;
    border-radius: 1rem;
    flex-shrink: 0;
  }

  

  

  .chat-wrapper .page-body {
    margin-bottom: 0;
    padding-bottom: 0;
    background: #111827 !important;
  }

  .chat-card {
    flex: 1 1 auto;
    height: 100%;
    margin: 0 0.5rem;
    margin-bottom: 0;
    background: #1f2937;
    box-shadow: 0 4px 8px #000000d2;
    border-radius: 2rem 2rem 0 0 !important;
    overflow: hidden;
  }

  .chat-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;
    border-radius: 2rem 2rem 0 0 !important;
  }

  #chatMessagesContainer {
    flex: 1 1 auto;
    overflow-y: auto;    /* ✅ only this scrolls */
    overflow-x: hidden;
    height: auto;        /* let flexbox size it */
    -webkit-overflow-scrolling: touch;
  }
}

.chat-card {
  border-radius: 2rem;
}

.chat-wrapper .chat-column .card-footer {
  border-radius: 2rem !important;
}

.chat-bubble {
  background-color: #0c121f !important;
  border-radius: 1.5rem 1.5rem 1.5rem 0;
}

.chat-bubble-me {
  background-color: #1c3536 !important;
  border-radius: 1.5rem 1.5rem 0 1.5rem;
}

/* Watermark logo in chat background */
.chat-wrapper .chat-column .card-body::before {
  content: "";
  position: absolute;
  top: 80px; left: 0; right: 0; bottom: 2rem;
  background: url('/static/images/church_logo.png') no-repeat center;
  background-size: 350px;
  opacity: 0.5; /* faint watermark */
  pointer-events: none; /* don’t block clicks/scroll */
  z-index: 0;
}


/* Desktop: no gap */
@media (min-width: 768px) {
  .chat-wrapper {
    height: 100vh !important;
  }
}


/* Pinned preview stack (always visible top-left of chat container) */
/* Stack container (top-left fixed) */
.pinned-preview {
  position: absolute;
  top: 0;
  left: 20px;
  display: flex;
  flex-direction: column-reverse; /* newest at bottom */
  gap: 5px;
  z-index: 50;
  transition: top 0.3s ease; /* smooth slide with banner */
}

/* Outer card wrapping pinner + preview bubble */
.pinned-outer {
  position: relative;
  background-color: #111827; /* dark grey bg */
  border-radius: 14px;
  padding: 4px 7px;
  color: #fff;
  font-size: 0.6rem;
  max-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

/* Pin icon top-left outside the card */
.pinned-outer .pinned-icon {
  position: absolute;
  top: 5px;
  left: -15px;
  border-radius: 15%;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
  background: none !important;
}
.pinned-outer .pinned-icon svg {
  width: 14px;
  height: 14px;
}

/* Pinner label */
.pinned-outer .pinner {
  font-size: 0.65rem;
  font-style: italic;
  font-weight: 400;
  color: #fbbf24;
  margin-bottom: 6px;
  padding: 0 0;
}

/* Inner preview bubble (with green border-left) */
.pinned-outer .pinned-info {
  background-color: #25292634;
  border-left: 4px solid rgba(247, 3, 215, 0.527);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 0.6rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  color: #6c757d;
  line-height: 1rem;

  /* ✅ Truncate to 2 lines with ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* max 2 lines */
  line-clamp: 2; /* standard property for compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal; /* allow wrapping */
  text-overflow: ellipsis;
}

.pinned-outer .reply-preview-text .newline-icon {
  font-size: 0.65rem;
  color: #f703d7; /* pink to match pin theme */
  vertical-align: middle;
}


/* Fade + slide up + slight scale for new card */
@keyframes fadeSlideUpScale {
  0%   { opacity: 0; transform: translateY(40px) scale(0.75); }
  70%  { opacity: 1; transform: translateY(-2px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.pinned-outer.new-card {
  animation: fadeSlideUpScale 0.9s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Oldest third card fade + slight scale in */
@keyframes fadeScaleIn {
  0%   { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.pinned-outer.oldest-third {
  animation: fadeScaleIn 0.6s ease forwards;
}

/* Highlight when scroll-to-bubble */
.chat-bubble.highlight-pinned {
  animation: glow 5s ease-in-out;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 0px rgba(247, 3, 215, 0.0);
  }
  50% {
    box-shadow: 0 0 12px rgba(247, 3, 215, 0.8); /* bright pink glow */
  }
  100% {
    box-shadow: 0 0 0px rgba(247, 3, 215, 0.0);
  }
}

.pinned-preview .pinned-item:hover {
  transform: scale(1.05);
}

.chat-bubble,
.chat-bubble * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
}
.chat-bubble .fs-4 {
  -webkit-user-select: text; /* allow text selection inside bubble */
  user-select: text;
}





/* --- Prevent mobile overflow --- */
#calendar {
  max-width: 100%;
  overflow-x: hidden;
}

/* Remove card-body padding if needed for tighter fit */
.card-body #calendar {
  margin: 0 auto;
}

/* --- Clean dark theme for FullCalendar --- */

/* Remove header background and border */
.fc-theme-bootstrap5 .fc-toolbar.fc-header-toolbar {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 0.75rem;
  padding: 2px 0;
}

/* Center title and make smaller */
.fc-toolbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--tblr-body-color, #e0e0e0);
}

/* Remove outer calendar border */
.fc-theme-bootstrap5 td,
.fc-theme-bootstrap5 th {
  border: none !important;
}

/* Remove borders for clean dark look */
.fc-theme-bootstrap5 td,
.fc-theme-bootstrap5 th,
.fc-theme-bootstrap5 .fc-scrollgrid {
  border: none !important;
}

/* Optional subtle border for grid lines 
.fc .fc-daygrid-day-frame {
  border: 1px solid rgba(255, 255, 255, 0.05);
}*/

/* Hide top header background (days of week row) */
.fc .fc-col-header-cell {
  background: #111827 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f97316; /* orange text for days */
  font-weight: 700;
  font-size: 1rem;
  padding-top: 0;
}

/* Give FullCalendar a rounded border and soft shadow */
.fc {
  background-color: #1F2937;
  border-radius: 24px;
  padding: 8px;
  box-shadow: 0 4px 12px #000000c0;
}

.fc .fc-daygrid {
  overflow: hidden; /* ensures the inner cells follow the rounding */
  padding: 4px 4px;
  background-color: #111827;
  border-radius: 24px;
  box-shadow: 0 4px 12px #000000c0;
}

/* Calendar body background */
.fc .fc-scrollgrid {
  background: transparent !important;
}

/* Optional: add subtle glow or border for better visibility */
.fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
  background-color: #1F2937;
  color: #f97316;
  box-shadow: 0 0 12px #000000c0;
}

.fc .fc-daygrid.fc-day-today {
  overflow: hidden; /* ensures the inner cells follow the rounding */
  padding: 2px 0;
  background-color: transparent !important;
  box-shadow: 0 0 12px #000000c0;
}


/* Orange reminders */
.fc-event[style*="orange"] {
  background: #f97316 !important;
  box-shadow: 0 0 4px #f973164d;
}

/* Make calendar fully responsive */
@media (max-width: 768px) {
  #calendar {
    font-size: 0.8rem;
  }

  .fc-toolbar.fc-header-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .fc-toolbar-chunk {
    width: 100%;
    text-align: center;
  }
}


/* --- Event color strip --- */
.color-strip {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  margin: 0.5px 0;
}

/* --- Popup overlay --- */
.calendar-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.calendar-popup.show {
  opacity: 1;
}

/* --- Popup box --- */
.calendar-popup-box {
  background: #111827;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  width: 90%;
  max-width: 420px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-height: 80vh;
  overflow-y: auto;
}

/* --- Title --- */
.calendar-popup-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #e5e5e5;
  text-align: center;
}

/* --- List items --- */
.calendar-popup-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.calendar-popup-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Color dot --- */
.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
}

/* --- Event details --- */
.event-info {
  flex: 1;
}

.event-title {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.event-chip {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #ccc;
}

/* --- Mobile adjustments --- */
@media (max-width: 768px) {
  .calendar-popup-box {
    width: 95%;
    padding: 0.75rem 1rem;
  }
  .event-title {
    font-size: 0.85rem;
  }
  .event-chip {
    font-size: 0.7rem;
  }
}


/* Centered alert inside modal */
#attendanceModal .alert {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

/* Shake animation for modal */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

.shake {
  animation: shake 0.4s ease;
}


/* Attendance Modal Carousel Overlay */
.overlay-status {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.8rem;
  background: #000000;
  box-shadow: #000000d2;
  border-radius: 6px;
  padding: 3px 6px;
}

.carousel-eventmode {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.8rem;
  background: #000000;
  box-shadow: #000000d2;
  border-radius: 6px;
  padding: 3px 6px;
}

.register-btn {
  position: absolute;
  bottom: 60px;
  left: 0;
  font-size: 0.8rem;
  background: #000000;
  box-shadow: #000000d2;
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
  color: #f97316
}

#teamSelectionRow .team-btn.active {
  transform: scale(0.85);
  box-shadow: inset 0 3px 6px #000000d2;
  opacity: 0.95;
  color: #ffffff;
  background: #f59f0080 !important;
}

.start-event-btn {
  cursor: pointer;
  transition: color 0.2s ease;
}
.start-event-btn:hover {
  color: #38bdf8; /* or any highlight color matching your theme */
}

.pulse-success {
  animation: pulseSuccess 0.8s ease;
}

@keyframes pulseSuccess {
  0% { transform: scale(1); background-color: inherit; }
  50% { transform: scale(1.1); background-color: #16a34a; }
  100% { transform: scale(1); background-color: inherit; }
}

.blur {
  filter: blur(3px);
  pointer-events: none;
}
.cursor-pointer {
  cursor: pointer;
}


/**********************
Dashboard Event Carousel
/*********************/
.vertical-carousel {
  position: relative;
  overflow: hidden;
  height: 60vh;
}

.team-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.team-slide.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

#dashboardEventCarousel .right-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 0.8rem;
  box-shadow: #000000d2;
  border-radius: 6px;
  padding: 3px 6px;
  }

#dashboardEventCarousel .left-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 0.8rem;
  box-shadow: #000000d2;
  border-radius: 6px;
  padding: 3px 6px;
  }


/* Wiggle for attendance event countdown */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.countdown-end-wiggle {
  display: inline-block;
  animation: wiggle 0.2s infinite;
  transform-origin: center;
}

/* Wiggle for start countdown */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.countdown-start-wiggle {
  display: inline-block;
  animation: wiggle 0.6s infinite;
  transform-origin: center;
}


