/* ============================================================
   events.css — shared styles for app pages (profiles, groups, events, etc.)
   ============================================================ */


/* ------------------------------------------------------------
   Events table column widths
   (life_events, profiles, contact)
   ------------------------------------------------------------ */
#tasks-table.events-table th.events-col-who,
#tasks-table.events-table td.events-col-who,
#tasks-table.events-table th.events-col-shared,
#tasks-table.events-table td.events-col-shared,
#tasks-table.events-table th.events-col-owner,
#tasks-table.events-table td.events-col-owner {
  width: 5em;
  max-width: 5em;
  box-sizing: border-box;
}

/* Profiles events table: row tint by type (Type column hidden on profiles only) */
#tasks-table.profiles-events-table tbody tr.profiles-events-row-life {
  background-color: #e3f2fd;
}
#tasks-table.profiles-events-table tbody tr.profiles-events-row-default {
  background-color: #fff;
}
#tasks-table.profiles-events-table.table-hover tbody tr.profiles-events-row-life:hover {
  background-color: #d4eafc;
}
#tasks-table.profiles-events-table.table-hover tbody tr.profiles-events-row-default:hover {
  background-color: #f8f9fa;
}

/* Profiles: Who column = wrapping avatar row (Shared / Owner hidden on profiles only) */
#tasks-table.profiles-events-table th.events-col-who,
#tasks-table.profiles-events-table td.events-col-who.profiles-events-who-cell {
  width: auto;
  max-width: none;
  min-width: 6rem;
  white-space: normal;
  vertical-align: middle;
}
#tasks-table.profiles-events-table .profiles-events-who-avatars {
  gap: 0.15rem 0;
  max-width: 100%;
}


/* ------------------------------------------------------------
   Profile page header
   (profiles, contact)
   ------------------------------------------------------------ */
.profile-page-header .profile-avatar-wrap {
  flex-shrink: 0;
}

.profile-page-header .profile-avatar-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.profile-page-header #profile-photo-edit-btn {
  bottom: -2px;
  right: -2px;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  line-height: 1.2;
}

.profile-page-header .profile-name-row {
  gap: 0.35rem;
}

.profile-page-header #profile-name-edit-btn {
  color: #6c757d;
  line-height: 1;
  vertical-align: middle;
}

.profile-page-header #profile-name-edit-btn:hover,
.profile-page-header #profile-name-edit-btn:focus {
  color: #007bff;
}

/* Contact record page header (profiles.html) */
.contact-page-header .contact-avatar-wrap {
  flex-shrink: 0;
}

.contact-page-header .contact-avatar-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.contact-page-header #contact-photo-edit-btn {
  bottom: -2px;
  right: -2px;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  line-height: 1.2;
}

.contact-page-header .contact-name-row {
  gap: 0.35rem;
}

.contact-page-header #contact-name-edit-btn {
  color: #6c757d;
  line-height: 1;
  vertical-align: middle;
}

.contact-page-header #contact-name-edit-btn:hover,
.contact-page-header #contact-name-edit-btn:focus {
  color: #007bff;
}

/* profiles.html — dense vertical layout (font sizes unchanged) */
main.contact-page-compact .contact-compact-line {
  margin-bottom: 0.1rem;
  line-height: 1.25;
}

main.contact-page-compact .contact-section-tight {
  padding-top: 0.35rem;
  margin-top: 0.35rem;
  scroll-margin-top: 0.5rem;
}

main.contact-page-compact #contact-section-notes {
  scroll-margin-top: 0.5rem;
}

main.contact-page-compact .contact-section-tight .alert {
  margin-bottom: 0.35rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

main.contact-page-compact #work-section-content p,
main.contact-page-compact #education-section-content p,
main.contact-page-compact #family-section-content p,
main.contact-page-compact #interests-section-content p {
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

main.contact-page-compact #work-section-content .small.mb-1,
main.contact-page-compact #education-section-content .small.mb-1,
main.contact-page-compact #family-section-content .small.mb-1,
main.contact-page-compact #interests-section-content .small.mb-1 {
  margin-bottom: 0.1rem !important;
  line-height: 1.25;
}

main.contact-page-compact #work-section-content h6 {
  margin-bottom: 0.2rem !important;
  margin-top: 0.35rem !important;
}

main.contact-page-compact #work-section-content h6:first-child {
  margin-top: 0 !important;
}

main.contact-page-compact #contact-section-pills .contact-section-btn {
  margin-bottom: 0.15rem;
}

main.contact-page-compact #my-notes-section-content p {
  margin-bottom: 0.25rem;
}


/* ------------------------------------------------------------
   Friends list
   ------------------------------------------------------------ */
#af-notes::placeholder {
  color: #868e96;
  opacity: 1;
}

#friends-tbody tr.friends-table-row {
  cursor: pointer;
}

#friends-tbody tr.friends-table-row button {
  cursor: pointer;
}


/* ------------------------------------------------------------
   Groups list
   ------------------------------------------------------------ */
.groups-col-actions {
  width: 220px;
}

.groups-col-admins {
  min-width: 200px;
  max-width: 360px;
}

img.groups-list-admin-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  vertical-align: middle;
}

#groups-tbody td.groups-col-admins-cell {
  vertical-align: middle;
}

#groups-tbody .groups-list-admin-chip {
  max-width: 100%;
}

#groups-tbody .groups-list-admin-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.groups-col-visibility {
  width: 110px;
}

#groups-tbody tr {
  cursor: pointer;
}

#groups-tbody td.groups-col-visibility-cell {
  cursor: default;
}

#groups-tbody img.groups-list-group-photo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  background: #e9ecef;
}

.af-handle-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1056;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.af-handle-dropdown .af-handle-option-photo {
  object-fit: cover;
  background: #e9ecef;
}

.af-handle-dropdown .list-group-item-action.active {
  z-index: 2;
}

.add-event-token-wrap {
  min-height: 2.5rem;
  background: #fff;
  gap: 0.25rem;
}

.add-event-token-input {
  width: auto;
  min-width: 8rem;
  flex: 1 1 8rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  background: transparent;
}

.add-event-token-input:focus {
  box-shadow: none;
}

.add-event-contact-chip {
  max-width: 100%;
}

.add-event-contact-chip-photo-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.add-event-contact-chip-photo-wrap img {
  object-fit: cover;
  background: #e9ecef;
  display: block;
}

.add-event-contact-chip-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  border: 2px solid #fff;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-event-contact-chip-label {
  font-size: 0.85rem;
  max-width: 8rem;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

.add-event-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.75rem;
}

.add-event-media-item {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid #dee2e6;
  background: #000;
  aspect-ratio: 1;
}

.add-event-media-item--cover {
  border-color: #0d6efd;
  box-shadow: 0 0 0 1px #0d6efd;
}

.add-event-media-item__preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.add-event-media-item__actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.35rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.add-event-media-item__cover {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.add-event-media-set-cover,
.add-event-media-remove {
  font-size: 0.7rem;
  line-height: 1.2;
  padding: 0.15rem 0.4rem;
}

.add-event-media-remove {
  margin-left: auto;
  min-width: 1.5rem;
}

/* Add Event modal — allow selecting/copying field text */
#addEventModal .modal-body,
#addEventModal input,
#addEventModal select,
#addEventModal textarea,
#addEventModal .form-control,
#addEventModal .form-text,
#addEventModal .add-event-token-input,
#addEventModal .add-event-contact-chip-label {
  user-select: text;
  -webkit-user-select: text;
}

#addEventModal .btn,
#addEventModal .add-event-contact-chip-remove {
  user-select: none;
  -webkit-user-select: none;
}

.add-event-shortcut-hint {
  font-size: 0.75rem;
  color: #6c757d;
  line-height: 1.2;
}

.add-event-shortcut-hint__keys {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.add-event-shortcut-kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  font-family: inherit;
  line-height: 1.3;
  color: #495057;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.2rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.add-event-shortcut-hint__plus {
  color: #adb5bd;
  font-size: 0.7rem;
}

#groups-tbody a.groups-list-group-link {
  cursor: pointer;
  font-weight: 500;
}

#groups-tbody a.groups-list-group-link:hover {
  text-decoration: underline;
}

#groups-tbody a.groups-list-admin-profile-link {
  color: inherit;
  text-decoration: none;
}

#groups-tbody a.groups-list-admin-profile-link:hover .groups-list-admin-name {
  text-decoration: underline;
}

#groups-tbody a.groups-list-admin-profile-link.text-primary {
  color: #007bff !important;
}

#cg-group-name[readonly] {
  background-color: #f8f9fa;
}

/* Section anchors: pills scroll here without hiding under sticky UI */
.profile-page-section {
  scroll-margin-top: 1rem;
}

#profile-section-notes,
#contact-section-notes {
  scroll-margin-top: 1rem;
}

/* profiles.html — reduce vertical gaps (main content only) */
main.profiles-page-tight .profile-page-section {
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  scroll-margin-top: 0.5rem;
}

main.profiles-page-tight #profile-section-notes {
  scroll-margin-top: 0.5rem;
}

main.profiles-page-tight .content {
  padding-top: 0.5rem;
}

/* Mobile: keep profile photo/name below fixed header (see .main padding in main.scss) */
@media (max-width: 991.98px) {
  main.profiles-page-tight .profile-page-header {
    scroll-margin-top: 4rem;
  }

  main.profiles-page-tight #profile-section-notes,
  main.profiles-page-tight .profile-page-section {
    scroll-margin-top: 4rem;
  }
}

main.profiles-page-tight .profile-page-header .text-muted.small {
  line-height: 1.35;
}

/* Friends / contact list — thumbnails from `contact_photos` bucket */
img.friends-list-contact-photo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

a.friends-name-link:hover .text-primary {
  text-decoration: underline !important;
}

/* profiles.html / contact_library.html — mutual group pill nav (member vs blind member) */
#contact-my-groups-pills a.contact-my-group-pill,
#profile-mutual-groups-pills a.contact-my-group-pill,
#friends-tbody a.contact-my-group-pill {
  border-radius: 2rem;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  line-height: 1.25;
  display: inline-block;
  text-decoration: none !important;
  border: 1px solid transparent;
}

#contact-my-groups-pills a.contact-my-group-pill--member {
  background: #e9ecef;
  color: #212529;
  border-color: #ced4da;
}

#contact-my-groups-pills a.contact-my-group-pill--member:hover,
#contact-my-groups-pills a.contact-my-group-pill--member:focus {
  background: #dee2e6;
  color: #121416;
}

#contact-my-groups-pills a.contact-my-group-pill--blind {
  background: #495057;
  color: #f8f9fa;
  border-color: #343a40;
}

#contact-my-groups-pills a.contact-my-group-pill--blind:hover,
#contact-my-groups-pills a.contact-my-group-pill--blind:focus {
  background: #343a40;
  color: #fff;
}

/* profiles.html + contact_library.html — blue pill when member/admin; light grey when blind member */
#profile-mutual-groups-pills a.contact-my-group-pill--member,
#friends-tbody a.contact-my-group-pill--member {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

#profile-mutual-groups-pills a.contact-my-group-pill--member:hover,
#profile-mutual-groups-pills a.contact-my-group-pill--member:focus,
#friends-tbody a.contact-my-group-pill--member:hover,
#friends-tbody a.contact-my-group-pill--member:focus {
  background: #0b5ed7;
  color: #fff;
  border-color: #0a58ca;
}

#profile-mutual-groups-pills a.contact-my-group-pill--blind,
#friends-tbody a.contact-my-group-pill--blind {
  background: #e9ecef;
  color: #6c757d;
  border-color: #dee2e6;
}

#profile-mutual-groups-pills a.contact-my-group-pill--blind:hover,
#profile-mutual-groups-pills a.contact-my-group-pill--blind:focus,
#friends-tbody a.contact-my-group-pill--blind:hover,
#friends-tbody a.contact-my-group-pill--blind:focus {
  background: #dee2e6;
  color: #495057;
  border-color: #ced4da;
}

/* life_events.html — row 1: pills; row 2: filters + Add */
.life-events-toolbar-wrap {
  position: relative;
  z-index: 40;
}

.life-events-actions-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
}

.events-filters-panel {
  flex: 1 1 auto;
  min-width: 0;
}

.events-filters-panel__toggle {
  display: none;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.events-filters-panel__toggle::-webkit-details-marker {
  display: none;
}

.events-filters-panel__body.life-events-toolbar {
  overflow: visible;
  gap: 0;
}

.events-add-event-wrap {
  flex-shrink: 0;
}

.life-events-toolbar {
  overflow: visible;
  gap: 0;
}

.events-filter-bar-panel {
  min-height: 2.5rem;
}

.life-events-toolbar #events-who-filter-wrap.events-who-filter-panel {
  overflow: visible;
  flex: 1 1 10rem;
  max-width: none;
}

.life-events-toolbar #events-what-filter-wrap.events-what-filter-panel {
  overflow: visible;
  flex: 1 1 10rem;
  max-width: none;
}

.life-events-toolbar .events-what-filter-input-wrap {
  z-index: 45;
}

.life-events-toolbar .events-what-filter-input-wrap .af-handle-dropdown {
  z-index: 1060;
}

.life-events-toolbar .what-filter-option {
  white-space: normal;
  word-break: break-word;
}

.life-events-toolbar .life-events-who-filter-picker {
  flex: 1 1 auto;
  min-width: 10rem;
  z-index: 50;
}

.life-events-toolbar .life-events-who-filter-picker .af-handle-dropdown {
  z-index: 1060;
}

.life-events-toolbar .life-events-who-filter-picker .add-event-token-wrap {
  min-height: 2rem;
}

.life-events-toolbar .life-events-who-filter-picker .add-event-contact-chip {
  margin-bottom: 0.15rem;
}

.life-events-toolbar .life-events-who-filter-picker .add-event-contact-chip-photo-wrap img {
  width: 28px;
  height: 28px;
}

/* ------------------------------------------------------------
   Events page — tweet-style feed (events.html)
   ------------------------------------------------------------ */
.events-page-feed-wrap {
  width: 100%;
}

.events-feed {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eff3f4;
  border-radius: 1rem;
  overflow: hidden;
}

.event-tweet-card {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 0;
  border-bottom: 1px solid #eff3f4;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.event-tweet-card:last-child {
  border-bottom: 0;
}

.event-tweet-card:hover,
.event-tweet-card:focus {
  background-color: #f7f9f9;
  outline: none;
}

.event-tweet-card--just-saved {
  animation: event-tweet-card-saved-highlight 2.5s ease-out;
}

@keyframes event-tweet-card-saved-highlight {
  0%,
  15% {
    background-color: #e8f4fd;
  }
  100% {
    background-color: #fff;
  }
}

.event-tweet-card__layout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.event-tweet-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: #e9ecef;
}

.event-tweet-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.event-tweet-card__header {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.35rem;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.event-tweet-card__text {
  order: 2;
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.4;
  color: #0f1419;
  word-break: break-word;
}

/* No photo/video: event name in a square hero box */
.event-tweet-card--text-only .event-tweet-card__text {
  order: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: calc(100% + 2rem);
  margin: 0.5rem -1rem 0.75rem;
  padding: 1.25rem;
  aspect-ratio: 1 / 1;
  background: #eff3f4;
  border-radius: 0.75rem;
  text-align: center;
  font-size: clamp(1.625rem, 4.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.25;
  color: #0f1419;
  word-break: break-word;
}

.event-tweet-card__media {
  order: 3;
  display: none;
  margin: 0.5rem 0 0.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #000;
  border: 1px solid #eff3f4;
}

.event-tweet-card__media-carousel {
  position: relative;
}

.event-tweet-card__media-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pinch-zoom;
  scrollbar-width: none;
}

.event-tweet-card__media-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 20, 25, 0.55);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.event-tweet-card__media-nav:hover {
  background: rgba(15, 20, 25, 0.72);
}

.event-tweet-card__media-nav-icon {
  font-size: 1.75rem;
  line-height: 1;
  pointer-events: none;
}

.event-tweet-card__media-nav--prev {
  left: 0.5rem;
}

.event-tweet-card__media-nav--next {
  right: 0.5rem;
}

.event-tweet-card__media-carousel--multi:hover
  .event-tweet-card__media-nav:not([hidden]) {
  display: flex;
}

@media (hover: none), (pointer: coarse) {
  .event-tweet-card__media-nav {
    display: none !important;
  }
}

.event-tweet-card__media-track::-webkit-scrollbar {
  display: none;
}

.event-tweet-card__media-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.event-tweet-card__media-slide--title,
.event-tweet-card__media-slide--story {
  aspect-ratio: 1 / 1;
  background: #eff3f4;
  box-sizing: border-box;
}

.event-tweet-card__media-slide--title {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.event-tweet-card__title-slide-text {
  margin: 0;
  text-align: center;
  font-size: clamp(1.625rem, 4.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.25;
  color: #0f1419;
  word-break: break-word;
}

.event-tweet-card__media-slide--story {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 1rem 1.125rem;
  overflow: hidden;
}

.event-tweet-card__story-text {
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
  color: #0f1419;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  overflow: hidden;
}

.event-tweet-card--title-in-carousel .event-tweet-card__text {
  display: none;
}

.event-tweet-card--has-carousel .event-tweet-card__media:not([hidden]) {
  display: block;
  margin: 0.5rem 0 0.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #eff3f4;
  border: 1px solid #eff3f4;
}

.event-tweet-card--has-media .event-tweet-card__media-slide--story {
  background: #eff3f4;
}

#addEventModal .event-story-details-input {
  min-height: 9rem;
  resize: vertical;
}

#addEventModal .event-name-limit-hint {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #6c757d;
}

#event-story-measurer {
  position: absolute;
  left: -9999px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

.event-tweet-card__media-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 560px);
  object-fit: contain;
  background: #000;
}

.event-tweet-card__media-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 560px);
  background: #000;
}

.event-tweet-card__media-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.5rem;
  pointer-events: none;
  z-index: 2;
}

.event-tweet-card__media-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.event-tweet-card__media-dot--active {
  background: #fff;
  transform: scale(1.15);
}

.event-tweet-card__media-video[hidden],
.event-tweet-card__media-img[hidden] {
  display: none !important;
}

.event-tweet-card__media:not([hidden]) {
  display: block;
}

.event-tweet-card__media--failed {
  background: #f7f9f9;
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-tweet-card__media--failed .event-tweet-card__media-img {
  background: transparent;
  max-height: none;
  width: auto;
  padding: 1.5rem;
  color: #536471;
  font-size: 0.95rem;
  text-align: center;
}

.event-tweet-card--has-media .event-tweet-card__text {
  order: 2;
  display: block;
  width: auto;
  margin: 0 0 0.5rem;
  padding: 0;
  aspect-ratio: auto;
  background: transparent;
  border-radius: 0;
  font-size: 1.05rem;
  font-weight: 400;
  text-align: left;
}

.event-tweet-card--has-media .event-tweet-card__media {
  order: 3;
  margin: 0 -1rem 0.5rem;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.event-tweet-card__meta {
  order: 5;
  font-size: 0.875rem;
  color: #536471;
  line-height: 1.45;
}

.event-tweet-card__owner {
  font-weight: 700;
  color: #0f1419;
  font-size: 0.95rem;
  word-break: break-word;
}

.event-tweet-card__date {
  color: #536471;
  font-size: 0.875rem;
  white-space: nowrap;
}

.event-tweet-card__dot {
  color: #536471;
  font-size: 0.875rem;
  user-select: none;
}

.event-tweet-card__type {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.event-tweet-card__type--life {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.22em 0.62em 0.22em 0.42em;
  background: linear-gradient(135deg, #fff8e8 0%, #ffe4a8 55%, #ffd36a 100%);
  color: #8a4b00;
  border: 1px solid #e8b84a;
  box-shadow: 0 1px 4px rgba(180, 110, 0, 0.18);
  text-transform: none;
  letter-spacing: 0.01em;
}

.event-tweet-card__type--life .event-tweet-card__type-label {
  font-weight: 700;
  font-size: 0.74rem;
}

.event-tweet-card__type-icon {
  font-size: 1.05rem;
  line-height: 1;
  color: #c77700;
}

.event-tweet-card__type--weekly {
  background: #f0f3f4;
  color: #536471;
}

.event-tweet-card__meta-row + .event-tweet-card__meta-row {
  margin-top: 0.25rem;
}

.event-tweet-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.25rem 0.5rem;
}

.event-tweet-card__people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.event-tweet-card__person-link {
  color: #0f1419;
}

.event-tweet-card__person-link:hover {
  color: #1d9bf0;
  text-decoration: none;
}

.event-tweet-card__person-photo {
  object-fit: cover;
  background: #e9ecef;
}

.event-tweet-card__person-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f1419;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-tweet-card__meta-label {
  font-weight: 600;
  color: #536471;
  margin-right: 0.25rem;
}

@media (max-width: 799.98px) {
  .events-feed {
    max-width: none;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .event-tweet-card {
    padding: 0.875rem 0.75rem;
  }

  .event-tweet-card__avatar {
    width: 40px;
    height: 40px;
  }

  .event-tweet-card--text-only .event-tweet-card__text {
    width: min(100%, calc(100vw - 2rem));
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.75rem;
  }

  .event-tweet-card--has-media .event-tweet-card__media {
    width: min(100%, calc(100vw - 2rem));
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.75rem;
    border-left: 1px solid #eff3f4;
    border-right: 1px solid #eff3f4;
  }

  .event-tweet-card--has-carousel .event-tweet-card__media {
    width: min(100%, calc(100vw - 2rem));
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.75rem;
  }

  .event-tweet-card__media-slide:not(.event-tweet-card__media-slide--story):not(
      .event-tweet-card__media-slide--title
    ) {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .event-tweet-card__media-img,
  .event-tweet-card__media-video {
    margin-left: auto;
    margin-right: auto;
  }

  .life-events-actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .events-filters-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .events-filters-panel__toggle {
    display: block;
    width: 70vw;
    max-width: 70vw;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #495057;
    text-align: center;
  }

  .events-filters-panel__toggle::after {
    content: ' ▾';
    font-size: 0.85em;
    color: #6c757d;
  }

  .events-filters-panel[open] .events-filters-panel__toggle::after {
    content: ' ▴';
  }

  .events-filters-panel:not([open]) .events-filters-panel__body {
    display: none !important;
  }

  .events-filters-panel[open] .events-filters-panel__body {
    margin-top: 0.5rem;
  }

  .events-add-event-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .events-add-event-wrap .btn {
    width: 70vw;
    max-width: 70vw;
  }

  .life-events-toolbar {
    flex-wrap: wrap !important;
    align-items: stretch !important;
  }

  .life-events-toolbar #events-type-filter-wrap,
  .life-events-toolbar #events-year-filter-wrap,
  .life-events-toolbar #events-who-filter-wrap,
  .life-events-toolbar #events-what-filter-wrap {
    margin-right: 0 !important;
    margin-bottom: 0.5rem;
    width: 100%;
    flex: 1 1 100% !important;
    max-width: none !important;
  }

  .life-events-toolbar #events-type-filter-wrap select,
  .life-events-toolbar #events-year-filter-wrap select {
    width: 100% !important;
    max-width: none;
  }
}

@media (min-width: 800px) {
  .events-filters-panel {
    display: block;
  }

  .events-filters-panel__body {
    display: flex !important;
  }

  .life-events-actions-row {
    align-items: stretch;
  }

  .events-filters-panel__body.life-events-toolbar {
    align-items: stretch;
  }

  .life-events-toolbar .events-filter-bar-panel {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    box-sizing: border-box;
  }

  .life-events-toolbar .life-events-who-filter-picker {
    display: flex;
    align-items: center;
    align-self: stretch;
    height: 100%;
  }

  .life-events-toolbar .life-events-who-filter-picker .add-event-token-wrap {
    min-height: 2rem;
    width: 100%;
    align-items: center;
    align-content: center;
  }

  .life-events-toolbar .events-what-filter-input-wrap {
    display: flex;
    align-items: center;
    align-self: stretch;
    width: 100%;
    height: 100%;
  }

  .life-events-toolbar #events-type-filter-wrap .form-control-sm,
  .life-events-toolbar #events-year-filter-wrap .form-control-sm,
  .life-events-toolbar #events-what-filter-wrap .form-control-sm {
    height: 2rem;
    min-height: 2rem;
  }

  .events-add-event-wrap {
    display: flex;
    align-items: center;
  }
}
