/* ============================================
   WatchAnything Shared Components
   Profile dropdown, Settings modal, Toasts, Toggles
   ============================================ */

/* ---- Profile Dropdown ---- */
.profile-dropdown {
  position: fixed;
  top: 56px;
  right: 16px;
  width: 220px;
  background: rgba(10,12,15,0.96);
  border: 1px solid rgba(57,255,20,0.15);
  border-radius: 12px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 20px rgba(57,255,20,0.06);
  backdrop-filter: blur(12px);
}
.profile-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.profile-dropdown__header {
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.profile-dropdown__email {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  word-break: break-all;
  font-weight: 500;
}
.profile-dropdown__menu {
  padding: 4px 0;
}
.profile-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.profile-dropdown__item:hover {
  background: rgba(57,255,20,0.08);
  color: var(--accent, #39FF14);
}
.profile-dropdown__item svg {
  opacity: 0.6;
  flex-shrink: 0;
}
.profile-dropdown__item:hover svg {
  opacity: 1;
}
.profile-dropdown__item--danger:hover {
  background: rgba(255,40,40,0.08);
  color: #ff4444;
}
.profile-dropdown__divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 12px;
}

/* ---- Settings Modal ---- */
.wa-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.wa-modal.open {
  opacity: 1;
  visibility: visible;
}
.wa-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.wa-modal__content {
  position: relative;
  width: 92%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  background: rgba(10,12,15,0.98);
  border: 1px solid rgba(57,255,20,0.15);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 30px rgba(57,255,20,0.06);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s ease;
}
.wa-modal.open .wa-modal__content {
  transform: translateY(0) scale(1);
}
.wa-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.wa-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.3px;
}
.wa-modal__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.wa-modal__close:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.wa-modal__body {
  padding: 16px 20px 20px;
}
.wa-modal__section {
  margin-bottom: 20px;
}
.wa-modal__section:last-child {
  margin-bottom: 0;
}
.wa-modal__section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.4);
  margin: 0 0 12px;
}
.wa-modal__field {
  margin-bottom: 12px;
}
.wa-modal__label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}
.wa-modal__static {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.wa-modal__input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.wa-modal__input:focus {
  border-color: var(--accent, #39FF14);
  box-shadow: 0 0 0 3px rgba(57,255,20,0.1);
}
.wa-modal__input::placeholder {
  color: rgba(255,255,255,0.25);
}
.wa-modal__btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.wa-modal__btn--primary {
  background: var(--accent, #39FF14);
  color: #000;
  border-color: var(--accent, #39FF14);
}
.wa-modal__btn--primary:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.wa-modal__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.wa-modal__error {
  font-size: 12px;
  color: #ff4444;
  margin-top: 8px;
  display: none;
}
.wa-modal__opts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wa-modal__opt {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.wa-modal__opt:hover {
  transform: scale(1.05);
}
.wa-modal__opt.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2), 0 0 12px currentColor;
}
.wa-modal__toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

/* ---- Toggle Switch ---- */
.toggle-track {
  width: 40px;
  height: 22px;
  background: rgba(255,255,255,0.15);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-track.on {
  background: var(--accent, #39FF14);
}
.toggle-thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-track.on .toggle-thumb {
  transform: translateX(18px);
}

/* ---- Toasts ---- */
.wa-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.wa-toast {
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(20,22,25,0.98);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: auto;
  max-width: 320px;
}
.wa-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.wa-toast--success {
  border-color: rgba(57,255,20,0.3);
}
.wa-toast--error {
  border-color: rgba(255,60,60,0.4);
  color: #ff6666;
}
.wa-toast--info {
  border-color: rgba(0,240,255,0.3);
}

/* ---- Card Action Buttons (watchlist/favorite quick actions) ---- */
.card__actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 5;
}
.card:hover .card__actions {
  opacity: 1;
  transform: translateY(0);
}
.card__action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  backdrop-filter: blur(4px);
}
.card__action-btn:hover {
  background: var(--accent, #39FF14);
  color: #000;
  border-color: var(--accent, #39FF14);
}
.card__action-btn.active {
  background: var(--accent, #39FF14);
  color: #000;
  border-color: var(--accent, #39FF14);
}
.card__action-btn svg {
  width: 14px;
  height: 14px;
}

/* ---- Section headers with "View All" link ---- */
.section__header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section__view-all {
  font-size: 12px;
  color: var(--accent, #39FF14);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.section__view-all:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: rgba(255,255,255,0.4);
}
.empty-state__icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state__title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}
.empty-state__desc {
  font-size: 13px;
}

/* ---- Progress bar on cards (continue watching) ---- */
.card__progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
  z-index: 4;
}
.card__progress-bar {
  height: 100%;
  background: var(--accent, #39FF14);
  transition: width 0.3s;
}

/* ---- Share button ---- */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.share-btn:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

/* ---- Watch page action buttons ---- */
.watch-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.watch-action-btn--primary {
  background: var(--accent, #39FF14);
  color: #000;
  border-color: var(--accent, #39FF14);
}
.watch-action-btn--primary:hover {
  filter: brightness(1.08);
}
.watch-action-btn--secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}
.watch-action-btn--secondary:hover {
  background: rgba(255,255,255,0.14);
}
.watch-action-btn--active {
  background: var(--accent, #39FF14);
  color: #000;
  border-color: var(--accent, #39FF14);
}

/* ---- Cast / Info pills ---- */
.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.info-pill {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
