/**
 * Stories – Advanced UI
 * Carousel, Add Story, Publisher & Zuck viewer overrides
 */

/* ---- Variables ---- */
.stories-wrapper {
  --story-ring-size: 4px;
  --story-size: 112px;
  --story-radius: 18px;
  --story-transition: 0.25s ease;
  --story-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a56 100%);
  --story-gradient-seen: linear-gradient(135deg, #8e9eab 0%, #b0b8be 100%);
  --story-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  --story-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.night-mode .stories-wrapper {
  --story-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  --story-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ---- Wrapper & Carousel ---- */
.stories-wrapper {
  overflow: auto;
  padding-bottom: 4px;
  margin-bottom: 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.stories-wrapper::-webkit-scrollbar {
  height: 6px;
}

.stories-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

body.night-mode .stories-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.stories.carousel {
  overflow: unset !important;
  display: flex;
  gap: 14px;
  padding: 4px 2px;
  align-items: flex-start;
}

/* ---- Add Story (Your story) ---- */
.add-story {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: var(--story-size);
  min-width: var(--story-size);
  height: 160px;
  margin-bottom: 28px;
  cursor: pointer;
  border-radius: var(--story-radius);
  overflow: visible;
  transition: transform var(--story-transition), box-shadow var(--story-transition);
}
.add-story:hover {
  transform: scale(1.03);
  box-shadow: var(--story-shadow-hover);
}

.add-story:active {
  transform: scale(0.98);
}

.add-story .img {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-radius: var(--story-radius);
  border: var(--story-ring-size) solid transparent;
  box-sizing: border-box;
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.add-story .add {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--story-gradient);
  color: #fff;
  fill: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(245, 87, 108, 0.4);
  transition: transform var(--story-transition), box-shadow var(--story-transition);
  z-index: 2;
}

/* Add story plus icon – Font Awesome so it always shows */
.add-story .add .add-story-plus-icon {
  font-size: 22px;
  font-weight: 400;
  color: #fff !important;
  line-height: 1;
  display: block;
  width: 22px;
  height: 22px;
  text-align: center;
}
.add-story:hover .add {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 4px 16px rgba(245, 87, 108, 0.5);
}

body.night-mode .add-story .add {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* ---- Story items (others) ---- */
.stories.sngine.carousel .story {
  width: var(--story-size);
  max-width: 100%;
  flex-shrink: 0;
  transition: transform var(--story-transition), opacity var(--story-transition);
}

.stories.sngine.carousel .story:hover {
  transform: scale(1.03);
}

.stories.sngine.carousel .story > .item-link {
  text-decoration: none;
  display: block;
  border-radius: var(--story-radius);
  box-shadow: var(--story-shadow);
  transition: box-shadow var(--story-transition);
}

.stories.sngine.carousel .story:hover > .item-link {
  box-shadow: var(--story-shadow-hover);
}

.stories.sngine.carousel .story > .item-link > .item-preview {
  max-height: 100%;
  height: 160px;
  border-radius: var(--story-radius);
  padding: var(--story-ring-size);
  background: var(--story-gradient);
  box-sizing: border-box;
}

.stories.sngine .story.seen > .item-link > .item-preview {
  background: var(--story-gradient-seen);
}

.stories.sngine .story > a > .item-preview > img {
  border-radius: calc(var(--story-radius) - 2px);
  padding: 0;
  border: 2px solid #fff;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.night-mode .stories.sngine .story > a > .item-preview > img {
  border-color: var(--card-dark-color, #2d3748);
}

.stories.sngine .story.seen {
  opacity: 0.72;
}

.stories.sngine .story.seen:hover {
  opacity: 0.9;
}

.stories.carousel .story > .item-link > .info {
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---- Card header ---- */
.stories-card .card-header {
  padding-bottom: 8px;
}

.stories-card .card-header .btn-icon {
  transition: transform 0.2s ease;
}

.stories-card .card-header .btn-icon:hover {
  transform: scale(1.1);
}

/* ---- Zuck modal viewer overrides ---- */
#zuck-modal {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

#zuck-modal-content .story-viewer .slides-pointers {
  padding: 12px 16px 0;
  border-spacing: 6px;
}

#zuck-modal-content .story-viewer .slides-pointers > * > * {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  height: 3px;
  overflow: hidden;
}

#zuck-modal-content .story-viewer .slides-pointers > * > .seen {
  background: rgba(255, 255, 255, 0.6);
}

#zuck-modal-content .story-viewer .slides-pointers > * > * > b {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.95) 100%);
}

#zuck-modal-content .story-viewer {
  position: relative;
}
#zuck-modal-content .story-viewer .head {
  padding: 12px 16px;
  height: 60px;
  line-height: 1.2;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
}

#zuck-modal-content .story-viewer .head .item-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#zuck-modal-content .story-viewer .head .left .info .name {
  font-weight: 600;
  font-size: 15px;
}

#zuck-modal-content .story-viewer .head .right .close,
#zuck-modal-content .story-viewer .head .back {
  width: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 28px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

#zuck-modal-content .story-viewer .head .right .close:hover,
#zuck-modal-content .story-viewer .head .back:hover {
  opacity: 1;
}

/* Story viewer head .right: layout so Reply/Like/Report buttons show next to close */
#zuck-modal .story-viewer .head .right,
#zuck-modal-content .story-viewer .head .right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
#zuck-modal .story-viewer .head .right .close,
#zuck-modal-content .story-viewer .head .right .close {
  flex-shrink: 0;
}

/* Reply, Like, Report, etc. – ensure visible and clickable */
#zuck-modal .story-viewer .head .right .js_story-report-hide,
#zuck-modal-content .story-viewer .head .right .js_story-report-hide {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 4px;
}

#zuck-modal .story-viewer .head .right .js_story-report-hide .btn,
#zuck-modal-content .story-viewer .head .right .js_story-report-hide .btn {
  pointer-events: auto;
  opacity: 0.95;
  flex-shrink: 0;
}

#zuck-modal .story-viewer .head .right .js_story-report-hide .btn:hover,
#zuck-modal-content .story-viewer .head .right .js_story-report-hide .btn:hover {
  opacity: 1;
}

/* Story actions – Reels-style vertical strip on the right */
#zuck-modal .story-actions-floating.story-actions-reels {
  position: absolute;
  right: 16px;
  bottom: 80px;
  top: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}
#zuck-modal .story-actions-floating .story-actions-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
#zuck-modal .story-actions-floating .story-seen-by {
  font-size: 12px;
  margin-bottom: 4px;
  text-align: center;
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}
/* Base button – larger touch target, clear affordance */
#zuck-modal .story-actions-floating .story-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
#zuck-modal .story-actions-floating .story-action-btn:hover {
  transform: scale(1.12);
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 5px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff !important;
}
#zuck-modal .story-actions-floating .story-action-btn:active {
  transform: scale(0.98);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* Keyboard focus – visible ring */
#zuck-modal .story-actions-floating .story-action-btn:focus {
  outline: none;
}
#zuck-modal .story-actions-floating .story-action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 3px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
#zuck-modal .story-actions-floating .story-action-btn i {
  font-size: 1.5rem;
  color: inherit;
  pointer-events: none;
}
/* Primary actions – Reply & Like slightly emphasized */
#zuck-modal .story-actions-floating .story-action-btn[data-action="reply"],
#zuck-modal .story-actions-floating .story-action-btn[data-action="reaction"] {
  background: rgba(0, 0, 0, 0.5);
  border-width: 2px;
}
#zuck-modal .story-actions-floating .story-action-btn[data-action="reply"]:hover,
#zuck-modal .story-actions-floating .story-action-btn[data-action="reaction"]:hover {
  background: rgba(0, 0, 0, 0.68);
}
/* Like button when active */
#zuck-modal .story-actions-floating .story-action-btn.text-danger {
  background: rgba(220, 53, 69, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 14px rgba(220, 53, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
#zuck-modal .story-actions-floating .story-action-btn.text-danger:hover {
  background: rgba(220, 53, 69, 0.95);
  box-shadow: 0 5px 24px rgba(220, 53, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
#zuck-modal .story-actions-floating .story-action-btn.text-danger i {
  font-size: 1.5rem;
  color: #fff !important;
}
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #zuck-modal .story-actions-floating .story-action-btn {
    transition: none;
  }
  #zuck-modal .story-actions-floating .story-action-btn:hover,
  #zuck-modal .story-actions-floating .story-action-btn:active {
    transform: none;
  }
}
#zuck-modal.rtl .story-actions-floating.story-actions-reels {
  right: auto;
  left: 16px;
}

/* Story reply footer – horizontal input + send at bottom */
#zuck-modal .story-reply-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  pointer-events: auto;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#zuck-modal .story-reply-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
#zuck-modal .story-reply-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 10px 16px;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 22px;
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#zuck-modal .story-reply-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
#zuck-modal .story-reply-input:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}
#zuck-modal .story-reply-input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}
#zuck-modal .story-reply-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
#zuck-modal .story-reply-send:hover {
  background: #fff;
  transform: scale(1.05);
}
#zuck-modal .story-reply-send:active {
  transform: scale(0.98);
}
#zuck-modal .story-reply-send:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
#zuck-modal .story-reply-send i {
  font-size: 1.1rem;
}

/* App modals (Reply sent, Report, Insights, etc.) must appear above the story viewer (z-index 100000) */
#modal.modal {
  z-index: 100002 !important;
}
.modal-backdrop {
  z-index: 100001 !important;
}

/* Story Insights modal – improved UI */
.story-insights {
  padding: 0.25rem 0;
  max-height: 70vh;
  overflow-y: auto;
}
.story-insights-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.story-insights-stat {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 1rem 0.75rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.03) 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.story-insights-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bs-primary, #0d6efd);
}
.story-insights-stat-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bs-secondary, #6c757d);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
}
.story-insights-section {
  margin-bottom: 1.25rem;
}
.story-insights-section:last-child {
  margin-bottom: 0;
}
.story-insights-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary, #6c757d);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.story-insights-viewers {
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-insights-viewer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
}
.story-insights-viewer:last-child {
  border-bottom: none;
}
.story-insights-viewer:hover {
  background: rgba(0, 0, 0, 0.03);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 8px;
}
.story-insights-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(0, 0, 0, 0.08);
}
.story-insights-viewer-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: inherit;
}
.story-insights-viewer-more {
  font-size: 0.875rem;
  color: var(--bs-secondary, #6c757d);
  padding: 0.5rem 0 0 0.75rem;
  margin-left: 2.25rem;
}
.story-insights-replies {
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-insights-reply {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  margin-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.story-insights-reply:last-child {
  margin-bottom: 0;
}
.story-insights-reply:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}
.story-insights-reply-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(0, 0, 0, 0.08);
}
.story-insights-reply-body {
  flex: 1;
  min-width: 0;
}
.story-insights-reply-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: inherit;
}
.story-insights-reply-msg {
  font-size: 0.9375rem;
  line-height: 1.45;
  margin: 0 0 0.35rem 0;
  color: inherit;
  word-break: break-word;
}
.story-insights-reply-time {
  font-size: 0.75rem;
  color: var(--bs-secondary, #6c757d);
  display: block;
}
.story-insights-empty {
  font-size: 0.9375rem;
  color: var(--bs-secondary, #6c757d);
  margin: 0;
  padding: 0.5rem 0;
}

body.night-mode .story-insights-stat {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .story-insights-stat-value {
  color: var(--bs-primary, #6ea8fe);
}
body.night-mode .story-insights-section-title {
  color: rgba(255, 255, 255, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .story-insights-viewer {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.night-mode .story-insights-viewer:hover {
  background: rgba(255, 255, 255, 0.06);
}
body.night-mode .story-insights-avatar,
body.night-mode .story-insights-reply-avatar {
  border-color: rgba(255, 255, 255, 0.15);
}
body.night-mode .story-insights-reply {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .story-insights-reply:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

#zuck-modal-content .story-viewer .tip {
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 15px;
  bottom: 28px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

#zuck-modal-content .story-viewer .tip.muted {
  padding: 12px 24px;
}

#zuck-modal-content .story-viewer.muted .tip.muted {
  display: none !important;
}

#zuck-modal-content .story-viewer .slides-pagination span {
  font-size: 40px;
  width: 56px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

#zuck-modal-content .story-viewer .slides-pagination span:hover {
  opacity: 1;
}

/* ---- Story publisher modal (advanced) ---- */
.story-publisher-modal {
  max-width: 540px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: story-publisher-in 0.35s ease-out;
}

@keyframes story-publisher-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.story-publisher-modal .modal-body.story-publisher-body {
  padding: 1.35rem 1.5rem;
  max-height: min(72vh, 580px);
  overflow-y: auto;
  scroll-behavior: smooth;
}

.story-publisher-modal .modal-body.story-publisher-body::-webkit-scrollbar {
  width: 6px;
}

.story-publisher-modal .modal-body.story-publisher-body::-webkit-scrollbar-track {
  background: transparent;
}

.story-publisher-modal .modal-body.story-publisher-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

body.night-mode .story-publisher-modal .modal-body.story-publisher-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* Glass header */
.story-publisher-modal-header {
  padding: 1.1rem 1.35rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 50%, rgba(240, 147, 251, 0.9) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.story-publisher-modal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.story-publisher-modal-header .modal-title {
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.story-publisher-modal-header .story-publisher-modal-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  margin-top: 2px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.story-publisher-modal-header .btn-close-white {
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.story-publisher-modal-header .btn-close-white:hover {
  opacity: 1;
  transform: scale(1.1);
}

body.night-mode .story-publisher-modal-header {
  background: linear-gradient(135deg, rgba(76, 95, 213, 0.95) 0%, rgba(90, 61, 122, 0.95) 50%, rgba(176, 101, 192, 0.9) 100%);
}

.story-publisher-modal-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.story-publisher-modal-icon .main-icon {
  filter: brightness(0) invert(1);
}

/* Section cards with stagger */
.story-publisher-card {
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  animation: story-card-in 0.4s ease-out backwards;
}

.story-publisher-card:nth-child(2) { animation-delay: 0.03s; }
.story-publisher-card:nth-child(3) { animation-delay: 0.06s; }
.story-publisher-card:nth-child(4) { animation-delay: 0.09s; }
.story-publisher-card:nth-child(5) { animation-delay: 0.12s; }
.story-publisher-card:nth-child(6) { animation-delay: 0.15s; }
.story-publisher-card:nth-child(7) { animation-delay: 0.18s; }
.story-publisher-card:nth-child(8) { animation-delay: 0.21s; }
.story-publisher-card:nth-child(9) { animation-delay: 0.24s; }

@keyframes story-card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.story-publisher-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body.night-mode .story-publisher-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.night-mode .story-publisher-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.story-publisher-section-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--body-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.story-publisher-section-title i {
  opacity: 0.9;
}

.story-publisher-badge-optional {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.6);
}

body.night-mode .story-publisher-badge-optional {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

/* Drop zone overlay */
.story-publisher-media-card.story-publisher-drop-zone {
  position: relative;
}

.story-publisher-drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: 16px;
  background: rgba(102, 126, 234, 0.92);
  backdrop-filter: blur(8px);
  border: 3px dashed rgba(255, 255, 255, 0.8);
  color: #fff;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.story-publisher-drop-zone.is-dragover .story-publisher-drop-overlay {
  display: flex;
  animation: story-drop-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes story-drop-pulse {
  from { opacity: 0.95; transform: scale(1); }
  to { opacity: 1; transform: scale(1.01); }
}

.story-publisher-drop-overlay-inner {
  text-align: center;
  padding: 1rem;
}

.story-publisher-slides-hint {
  display: flex;
  align-items: center;
}

/* Ads row as card */
.story-publisher-ads-row.story-publisher-card {
  padding: 0.875rem 1.25rem;
}

.story-publisher-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.story-publisher-modal .form-label {
  font-weight: 600;
  color: var(--body-color);
}

.story-publisher-media-card {
  margin-bottom: 1rem;
}

.story-publisher-attachments {
  min-height: 100px;
}

.story-publisher-attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.story-publisher-add-btn {
  width: 100%;
  min-height: 100px;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  gap: 8px;
}

.story-publisher-add-btn:hover {
  border-color: var(--link-color);
  background: rgba(var(--link-color-rgb, 0, 123, 255), 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.story-publisher-add-btn i {
  font-size: 24px;
  color: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.story-publisher-add-btn span {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.story-publisher-add-photo:hover {
  border-color: #0d6efd;
  background: rgba(13, 110, 253, 0.08);
}

.story-publisher-add-photo:hover i { color: #0d6efd; }

.story-publisher-add-video:hover {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.08);
}

.story-publisher-add-video:hover i { color: #dc3545; }

body.night-mode .story-publisher-add-btn {
  border-color: rgba(255, 255, 255, 0.25);
}

body.night-mode .story-publisher-add-btn:hover {
  border-color: var(--link-color);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.night-mode .story-publisher-add-btn i,
body.night-mode .story-publisher-add-btn span {
  color: rgba(255, 255, 255, 0.6);
}

/* Thumbnails when user adds photos/videos */
.story-publisher-modal .attachments li.item {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.story-publisher-modal .attachments li.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-publisher-modal .attachments li.item .btn-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  opacity: 1;
  z-index: 2;
}

.story-publisher-modal .attachments li.item .btn-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.story-publisher-modal .attachments li.item .name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Duration range slider */
.story-publisher-duration-row .form-range.story-duration-range {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  accent-color: var(--link-color);
}

.story-duration-value {
  min-width: 2.5rem;
  text-align: right;
}

.story-duration-labels {
  font-size: 0.7rem;
  padding: 0 2px;
}

.story-publisher-advanced-toggle .btn-link {
  color: var(--link-color);
  font-size: 0.875rem;
}

.story-publisher-advanced-toggle .btn-link:hover {
  color: var(--link-color);
  text-decoration: underline !important;
}

.story-advanced-chevron {
  transition: transform 0.25s ease;
}

.story-publisher-advanced.show .story-advanced-chevron {
  transform: rotate(180deg);
}

.story-publisher-options-card .story-publisher-advanced.collapse {
  display: none;
}

.story-publisher-options-card .story-publisher-advanced.collapse.show {
  display: block;
}

.story-publisher-modal .form-control.story-publisher-caption {
  border-radius: 12px;
  resize: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.story-publisher-modal .form-control.story-publisher-caption:focus {
  border-color: var(--link-color);
  box-shadow: 0 0 0 3px rgba(var(--link-color-rgb, 0, 123, 255), 0.2);
}

body.night-mode .story-publisher-modal .form-control.story-publisher-caption {
  border-color: rgba(255, 255, 255, 0.15);
}

body.night-mode .story-publisher-modal .form-control.story-publisher-caption:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.story-caption-count {
  flex-shrink: 0;
}

/* Poll expandable block */
.story-poll-fields-inner {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.night-mode .story-poll-fields-inner {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.story-publisher-preview-wrap {
  margin-top: 0.25rem;
}

.story-publisher-preview {
  min-height: 80px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.night-mode .story-publisher-preview {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.story-publisher-preview-slides {
  display: flex;
  gap: 8px;
}

.story-preview-thumb {
  background-position: center;
  background-size: cover;
}

.story-empty-hint {
  font-size: 0.8rem;
}

/* User menu profile pic: ensure avatar displays when wrapped in .avatar-wrapper */
.user-menu .avatar-wrapper {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  vertical-align: middle;
  flex-shrink: 0;
}
.user-menu .avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
@media (min-width: 576px) {
  .user-menu .avatar-wrapper {
    width: 25px;
    height: 25px;
  }
}

/* Story ring on header avatar */
.avatar-has-story .avatar-wrapper,
.avatar-has-story img {
  border-radius: 50%;
}
.user-menu.avatar-has-story .avatar-wrapper {
  padding: 3px;
  width: 26px;
  height: 26px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a56 100%);
}
.user-menu.avatar-has-story .avatar-wrapper img {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 2px solid var(--body-bg-color, #f0f2f5);
  border-radius: 50%;
  object-fit: cover;
}
@media (min-width: 576px) {
  .user-menu.avatar-has-story .avatar-wrapper {
    width: 31px;
    height: 31px;
  }
}
body.night-mode .user-menu.avatar-has-story .avatar-wrapper img {
  border-color: var(--body-bg-color-dark, #1E252B);
}
/* Fallback for .avatar-has-story outside user-menu (e.g. other uses) */
.avatar-has-story .avatar-wrapper {
  display: inline-block;
  padding: 3px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a56 100%);
  border-radius: 50%;
}
.avatar-has-story .avatar-wrapper img {
  display: block;
  border: 2px solid var(--body-bg-color, #fff);
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-sizing: border-box;
}

/* Story ring on comment avatars */
.comment-avatar.avatar-has-story {
  padding: 2px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a56 100%);
  border-radius: 50%;
}
.comment-avatar.avatar-has-story .comment-avatar-picture {
  border-radius: 50%;
  border: 2px solid var(--body-bg, #fff);
  display: block;
  box-sizing: border-box;
}

/* Story ring on Pro Users / user-box (newsfeed) */
.pro-box-wrapper .user-box.avatar-has-story .avatar-wrapper {
  display: inline-block;
  width: 60px;
  height: 60px;
  padding: 2px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a56 100%);
  border-radius: 50%;
  box-sizing: border-box;
}
.pro-box-wrapper .user-box.avatar-has-story .avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--body-bg, #fff);
  display: block;
  object-fit: cover;
  box-sizing: border-box;
}

/* Profile section: avatar photo displays properly (circle + cover) */
.profile-avatar-wrapper {
  overflow: hidden;
  border-radius: 50%;
}
/* When "View story" is inside the wrapper, don't clip it – only the avatar stays circular */
.profile-avatar-wrapper.profile-avatar-has-story {
  overflow: visible;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.profile-avatar-wrapper img {
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

/* Profile story ring & View story button – ring is the circle, button below */
.profile-avatar-has-story .profile-story-ring-link {
  display: inline-block;
  padding: 3px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a56 100%);
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar-has-story .profile-story-ring-link img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--body-bg, #fff);
  object-fit: cover;
  box-sizing: border-box;
}
/* Match avatar sizes: story ring link = img size + padding (3px each side) */
@media (max-width: 575px) {
  .profile-avatar-has-story .profile-story-ring-link {
    width: 96px;
    height: 96px;
  }
}
@media (min-width: 576px) and (max-width: 767px) {
  .profile-avatar-has-story .profile-story-ring-link {
    width: 126px;
    height: 126px;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .profile-avatar-has-story .profile-story-ring-link {
    width: 156px;
    height: 156px;
  }
}
@media (min-width: 992px) {
  .profile-avatar-has-story .profile-story-ring-link {
    width: 166px;
    height: 166px;
  }
}
.profile-view-story-btn {
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Story archive tile (dashboard) */
.story-archive-tile .img {
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
}
.story-archive-tile .add {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Profile story highlights strip */
.profile-highlights .profile-highlight-item {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.profile-highlights .highlight-cover {
  border: 2px solid rgba(0, 0, 0, 0.1);
}
body.night-mode .profile-highlights .highlight-cover {
  border-color: rgba(255, 255, 255, 0.15);
}
.profile-highlights .profile-highlight-new .highlight-cover:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}
body.night-mode .profile-highlights .profile-highlight-new .highlight-cover:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Highlight viewer modal (profile) */
#highlight-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
}
#highlight-viewer-modal.show {
  display: flex;
}
#highlight-viewer-modal .highlight-viewer-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  z-index: 2;
  color: #fff;
}
#highlight-viewer-modal .highlight-viewer-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}
#highlight-viewer-modal .highlight-viewer-body {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#highlight-viewer-modal .highlight-viewer-body img,
#highlight-viewer-modal .highlight-viewer-body video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}
#highlight-viewer-modal .highlight-viewer-body video {
  background: #000;
}
#highlight-viewer-modal .highlight-viewer-prev,
#highlight-viewer-modal .highlight-viewer-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 2;
}
#highlight-viewer-modal .highlight-viewer-prev { left: 1rem; }
#highlight-viewer-modal .highlight-viewer-next { right: 1rem; }
#highlight-viewer-modal .highlight-viewer-prev:hover,
#highlight-viewer-modal .highlight-viewer-next:hover {
  background: rgba(255,255,255,0.35);
}
#highlight-viewer-modal .highlight-viewer-prev[disabled],
#highlight-viewer-modal .highlight-viewer-next[disabled] {
  opacity: 0.3;
  cursor: default;
}

/* Viewer: Seen by & reaction */
.story-seen-by {
  font-size: 0.8rem;
  opacity: 0.95;
}

/* Sensitive content blur (viewer) */
#zuck-modal-content .story-viewer .slides .item.sensitive-blur .media {
  filter: blur(20px);
  pointer-events: none;
}
#zuck-modal-content .story-viewer .slides .item.sensitive-blur::after {
  content: attr(data-tap-hint);
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
#zuck-modal-content .story-viewer .slides .item.sensitive-blur {
  cursor: pointer;
}
#zuck-modal-content .story-viewer .slides .item.sensitive-blur[data-tap-hint=""]::after,
#zuck-modal-content .story-viewer .slides .item.sensitive-blur:not([data-tap-hint])::after {
  content: 'Tap to view';
}
#zuck-modal-content .story-viewer .slides .item.sensitive-reveal .media {
  filter: none;
}
#zuck-modal-content .story-viewer .slides .item.sensitive-reveal::after {
  display: none;
}

/* Progressive image load in story viewer */
#zuck-modal-content .story-viewer .slides .item img.media {
  opacity: 0.7;
  transition: opacity 0.25s ease-out;
}
#zuck-modal-content .story-viewer .slides .item img.media.story-media-loaded {
  opacity: 1;
}

/* Overlay text on story slide */
#zuck-modal-content .story-viewer .slides .item {
  position: relative;
}
#zuck-modal-content .story-viewer .slides .item .story-overlay-text {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
  white-space: pre-wrap;
  word-break: break-word;
}

.story-publisher-modal-footer {
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.02);
}

body.night-mode .story-publisher-modal-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.story-publisher-footer-tip {
  font-size: 0.8rem;
  max-width: 220px;
}

@media (max-width: 576px) {
  .story-publisher-footer-tip {
    width: 100%;
    max-width: none;
  }
}

.story-publisher-modal-footer .btn-primary {
  min-width: 120px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(var(--link-color-rgb, 0, 123, 255), 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-publisher-modal-footer .btn-primary:hover {
  box-shadow: 0 4px 16px rgba(var(--link-color-rgb, 0, 123, 255), 0.45);
  transform: translateY(-1px);
}

.story-publisher-modal-footer .btn-primary:active {
  transform: translateY(0);
}

/* Focus visible for accessibility */
.story-publisher-modal .form-control:focus-visible,
.story-publisher-modal .form-select:focus-visible,
.story-publisher-modal .form-range:focus-visible {
  outline: none;
}

.story-publisher-modal .form-control:focus-visible,
.story-publisher-modal .form-select:focus-visible {
  border-color: var(--link-color);
  box-shadow: 0 0 0 3px rgba(var(--link-color-rgb, 0, 123, 255), 0.2);
}

/* Story viewer: hashtags/location and poll overlay */
.story-meta-layer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.85rem;
  border-radius: 8px;
  z-index: 3;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}

.story-poll-layer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 280px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 12px;
  z-index: 10;
  pointer-events: auto;
}
.story-poll-layer * {
  pointer-events: auto;
}

.story-poll-layer .story-poll-question {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.story-poll-layer .story-poll-option-btn {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.story-poll-layer .story-poll-option-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.story-poll-layer .story-poll-option-result {
  margin-bottom: 8px;
  position: relative;
}

.story-poll-layer .story-poll-option-result .opt-label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.story-poll-layer .story-poll-option-result .opt-pct {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.story-poll-layer .story-poll-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  margin-top: 4px;
  min-width: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .stories-wrapper {
    --story-size: 100px;
  }

  .add-story,
  .stories.sngine.carousel .story > .item-link > .item-preview {
    height: 148px;
  }

  .add-story {
    min-width: 100px;
    width: 100px;
  }

  .stories.sngine.carousel .story {
    width: 100px;
  }

  .story-publisher-modal-header .d-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .story-publisher-modal-icon {
    margin-bottom: 8px;
  }

  .story-publisher-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .story-publisher-modal-footer .d-flex.gap-2 {
    justify-content: stretch;
  }

  .story-publisher-modal-footer .d-flex.gap-2 .btn {
    flex: 1;
  }
}
