/* ==========================================================================
   Freela Web — Experience pages (Live Chat, Video Call, Video Feed, Upload)
   Complements the site's existing Bootstrap / style.css / innerpages.css.
   ========================================================================== */

.exp-call-card,
.exp-feed-card,
.exp-dropzone,
.exp-chat-list-card {
  box-sizing: border-box;
}

/* ---------- Live Chat conversation list ---------- */

.exp-chat-list-card {
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .06);
}

.exp-chat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f5f7;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.exp-chat-search i {
  color: var(--text-medium, #6b7280);
  font-size: 14px;
}

.exp-chat-search input {
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 14px;
  width: 100%;
}

.exp-chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 560px;
  overflow-y: auto;
}

.exp-chat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.exp-chat-item:hover,
.exp-chat-item--active {
  background: rgba(var(--color-primary-rgb), .08);
}

.exp-chat-item__avatar {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.exp-chat-item__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.exp-chat-item__status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid #fff;
}

.exp-chat-item__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.exp-chat-item__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.exp-chat-item__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark, #1f2430);
}

.exp-chat-item__time {
  font-size: 11px;
  color: var(--text-medium, #6b7280);
  flex-shrink: 0;
}

.exp-chat-item__preview {
  font-size: 13px;
  color: var(--text-medium, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exp-chat-item__badge {
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Video Call ---------- */

.exp-call-card {
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .06);
}

.exp-call-stage {
  position: relative;
  height: 480px;
  border-radius: 10px;
  overflow: hidden;
  background: #000 center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  margin-bottom: 20px;
}

.exp-call-stage__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .6) 100%);
  pointer-events: none;
}

.exp-call-status {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.exp-call-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  animation: exp-pulse 1.4s ease-in-out infinite;
}

@keyframes exp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.exp-call-peer {
  position: relative;
  z-index: 1;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.exp-call-peer__name {
  font-size: 17px;
  font-weight: 700;
}

.exp-call-peer__role {
  font-size: 13px;
  opacity: .85;
}

.exp-call-self {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 170px;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .3);
  background: #000 center/cover no-repeat;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.exp-call-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.exp-call-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #f4f5f7;
  color: var(--text-dark, #1f2430);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .15s ease, transform .1s ease;
}

.exp-call-btn:hover {
  background: rgba(var(--color-primary-rgb), .12);
}

.exp-call-btn:active {
  transform: scale(.94);
}

.exp-call-btn--off {
  background: #fdecea;
  color: #e74c3c;
}

.exp-call-btn--end {
  width: 60px;
  height: 60px;
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
}

.exp-call-btn--end:hover {
  background: #dc2626;
}

/* ---------- Video Feed ---------- */

.exp-feed {
  height: 640px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  border-radius: 10px;
  scrollbar-width: none;
}

.exp-feed::-webkit-scrollbar {
  display: none;
}

.exp-feed-card {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: #000 center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  margin-bottom: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .1);
}

.exp-feed-card__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .75) 100%);
}

.exp-feed-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}

.exp-feed-card.exp-is-paused .exp-feed-card__play {
  opacity: 1;
}

.exp-feed-card__body {
  position: relative;
  z-index: 1;
  padding: 16px;
  color: #fff;
  width: 100%;
}

.exp-feed-card__user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.exp-feed-card__username {
  font-weight: 700;
  font-size: 14px;
}

.exp-feed-follow {
  margin-left: auto;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.exp-feed-card__caption {
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 6px;
}

.exp-feed-card__music {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: .9;
}

.exp-feed-actions {
  position: absolute;
  right: 10px;
  bottom: 80px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.exp-feed-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 20px;
}

.exp-feed-action span {
  font-size: 11px;
  font-weight: 600;
}

.exp-feed-action--liked {
  color: #e74c3c;
}

/* ---------- Video Upload ---------- */

.exp-dropzone {
  border: 2px dashed #d7dae0;
  border-radius: 10px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  position: relative;
  overflow: hidden;
}

.exp-dropzone:hover,
.exp-dropzone--drag {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), .05);
}

.exp-dropzone__icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), .1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 22px;
}

.exp-dropzone h6 {
  margin: 0 0 6px;
}

.exp-dropzone p {
  font-size: 12px;
  margin: 0 0 16px;
}

.exp-dropzone__hint {
  font-size: 11px;
  color: var(--text-medium, #6b7280);
  margin-top: 14px;
}

.exp-dropzone__preview {
  position: absolute;
  inset: 0;
  display: none;
  background: #000;
}

.exp-dropzone__preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.exp-dropzone__remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.exp-radio {
  background: #f8f9fb;
  border: 1px solid #eceef1;
  border-radius: 8px;
  padding: 12px 14px 12px 40px;
}

.exp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #fff;
  border: 1px solid #e5e7eb;
  color: var(--text-dark, #1f2430);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1050;
}

.exp-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.exp-toast i {
  color: #2ecc71;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .exp-call-stage {
    height: 360px;
  }

  .exp-feed {
    height: 560px;
  }
}
