/* App-specific overrides loaded after Sociala style.css */

/* Bootstrap safety: ensure modal sits above backdrop */
#Modalstory.modal {
  z-index: 1055 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
}

/* Stories modal: remove theme gradients that sit above the image and can steal pointer events */
#Modalstory .bg-gradiant-bottom,
#Modalstory .bg-gradiant-top {
  position: relative;
}

#Modalstory .bg-gradiant-bottom::after,
#Modalstory .bg-gradiant-top::before {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Ensure the modal provides a reliable containing block for absolutely-positioned elements */
#Modalstory .modal-body {
  position: relative;
}

/* Story slider layout and interaction */
#Modalstory .story-slider {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: #000;
  border-radius: 0;
  touch-action: pan-y;
  user-select: none;
  pointer-events: auto;
  cursor: grab;
}

#Modalstory .story-slider-track {
  display: flex;
  width: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s ease;
  will-change: transform;
}

#Modalstory .story-slider.is-dragging .story-slider-track {
  transition: none;
}

#Modalstory .story-slider.is-dragging {
  cursor: grabbing;
}

#Modalstory .story-slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
}

#Modalstory .story-slide img {
  display: block;
  width: 100%;
  height: min(78vh, 720px);
  object-fit: cover;
  pointer-events: none;
}

#Modalstory .story-slider-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  pointer-events: auto;
}

#Modalstory .story-slider-prev {
  left: 14px;
}

#Modalstory .story-slider-next {
  right: 14px;
}

#Modalstory .story-slider-nav i {
  font-size: 20px;
  line-height: 1;
}

#Modalstory .story-slider-dots {
  position: absolute;
  right: 0;
  bottom: 88px;
  left: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}

#Modalstory .story-slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

#Modalstory .story-slider-dot.is-active {
  background: #fff;
}

/* Comment / message bar should always sit above the slider */
#Modalstory .story-comment-bar {
  z-index: 7;
  pointer-events: auto;
}

/* Avoid mobile browser UI causing the bar to slip behind the bottom */
@supports (height: 100dvh) {
  #Modalstory .modal-dialog {
    max-height: 100dvh;
  }
}

/* Contrast: any blue background should use white text (normal + hover). */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  color: #fff !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-check:active + .btn-outline-primary,
.btn-check:checked + .btn-outline-primary,
.btn-check:focus + .btn-outline-primary {
  color: #fff !important;
}

/* TNFON form uplift (scoped to .tnfon-form) */
.tnfon-form .form-control,
.tnfon-form .tnfon-input,
.tnfon-form .tnfon-select,
.tnfon-form .tnfon-textarea {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f5f5f5;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 20px;
  min-height: 44px;
}

.theme-dark .tnfon-form .form-control,
.theme-dark .tnfon-form .tnfon-input,
.theme-dark .tnfon-form .tnfon-select,
.theme-dark .tnfon-form .tnfon-textarea {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tnfon-form .form-control:focus,
.tnfon-form .tnfon-input:focus,
.tnfon-form .tnfon-select:focus,
.tnfon-form .tnfon-textarea:focus {
  border-color: var(--theme-color);
  box-shadow: 0 0 0 0.15rem rgba(0, 0, 0, 0.06);
  outline: 0;
}

.tnfon-form textarea.form-control,
.tnfon-form .tnfon-textarea {
  overflow: hidden;
  resize: none;
  min-height: 44px;
}

.tnfon-form select.form-control {
  cursor: pointer;
  min-height: 44px;
  height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Hide story file input but keep it in the DOM for validation + click() */
.tnfon-story-file-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Custom select (replaces native dropdown pane) */
.tnfon-select-wrap {
  position: relative;
  width: 100%;
}

.tnfon-select-native {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.tnfon-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
  user-select: none;
}

.tnfon-select-btn .tnfon-select-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tnfon-select-btn .tnfon-select-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(0, 0, 0, 0.4);
  border-bottom: 2px solid rgba(0, 0, 0, 0.4);
  transform: rotate(45deg);
  margin-top: -2px;
  flex: 0 0 auto;
}

.theme-dark .tnfon-select-btn .tnfon-select-caret {
  border-right-color: rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.tnfon-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1060;
  display: none;
  max-height: 240px;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  padding: 6px;
}

.theme-dark .tnfon-select-menu {
  background: #293145;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.tnfon-select-wrap.is-open .tnfon-select-menu {
  display: block;
}

.tnfon-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 18px;
  color: #222;
}

.theme-dark .tnfon-select-option {
  color: #f8f9fa;
}

.tnfon-select-option:hover,
.tnfon-select-option:focus {
  outline: 0;
  background: rgba(0, 0, 0, 0.04);
}

.theme-dark .tnfon-select-option:hover,
.theme-dark .tnfon-select-option:focus {
  background: rgba(255, 255, 255, 0.06);
}

.tnfon-select-option.is-selected {
  background: rgba(63, 106, 216, 0.12);
  color: var(--theme-color, #3f6ad8);
  font-weight: 700;
}

.theme-dark .tnfon-select-option.is-selected {
  background: rgba(63, 106, 216, 0.2);
  color: #fff;
}

.bg-primary,
.bg-info,
.bg-current,
.bg-current-shade,
.bg-primary-gradiant,
.bg-blue-gradiant,
.bg-facebook,
.bg-messenger,
.bg-twiiter,
.bg-linkedin,
.bg-skype {
  color: #fff !important;
}

.bg-primary a,
.bg-info a,
.bg-current a,
.bg-current-shade a,
.bg-primary-gradiant a,
.bg-blue-gradiant a,
.bg-facebook a,
.bg-messenger a,
.bg-twiiter a,
.bg-linkedin a,
.bg-skype a {
  color: #fff !important;
}

/* Comment composer: avoid internal scrollbars (auto-grow handles overflow). */
form[data-comment-form="true"] textarea {
  overflow: hidden;
  resize: none;
  line-height: 1.3;
}

/* Enforce consistent border radius of 30px for all buttons across the project */
button,
.btn,
.btn-round-xl,
.rounded-xl,
[role="button"],
input[type="button"],
input[type="submit"],
form button,
form input[type="submit"] {
  border-radius: 30px !important;
}

/* Live Search Dropdown styles */
.live-search-dropdown-menu {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: top center;
}

body.theme-dark .live-search-dropdown-menu {
  background-color: rgba(21, 30, 47, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.live-search-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #adb5bd;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 12px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

body.theme-dark .live-search-section-title {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.live-search-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  color: #343a40;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.live-search-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
  transform: translateX(4px);
}

body.theme-dark .live-search-item {
  color: #f8f9fa;
}

body.theme-dark .live-search-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.live-search-item img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 12px;
}

.live-search-item-info {
  display: flex;
  flex-direction: column;
}

.live-search-item-title {
  font-size: 12px;
  font-weight: 600;
}

.live-search-item-subtitle {
  font-size: 10px;
  color: #6c757d;
}

.live-search-view-all {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--theme-color, #3f6ad8);
  padding: 10px;
  border-radius: 12px;
  background-color: rgba(63, 106, 216, 0.05);
  margin-top: 12px;
  transition: all 0.2s ease;
}

.live-search-view-all:hover {
  background-color: rgba(63, 106, 216, 0.1);
  color: var(--theme-color, #3f6ad8);
}
