/* ── Schedule Modal Overlay & Container ── */
.reels-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.reels-modal-overlay.hidden {
  display: none !important;
}

.reels-schedule-modal {
  background: rgba(18, 12, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 26px 22px;
  width: 100%;
  max-width: 360px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.reels-schedule-header {
  display: flex;
  justify-content: center;
}

.reels-schedule-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reels-schedule-date-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(217, 70, 239, 0.5);
}

.reels-time-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
}

.reels-time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.reels-time-arrow {
  width: 46px;
  height: 36px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reels-time-arrow.arrow-hour {
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: #c084fc;
}

.reels-time-arrow.arrow-hour:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #c084fc;
}

.reels-time-arrow.arrow-min {
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #ec4899;
}

.reels-time-arrow.arrow-min:hover {
  background: rgba(236, 72, 153, 0.2);
  border-color: #ec4899;
}

.reels-time-box {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  background: rgba(18, 12, 38, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  user-select: none;
}

.reels-time-box.hour-box {
  border: 2px solid #818cf8;
  box-shadow:
    0 0 22px rgba(129, 140, 248, 0.35),
    inset 0 0 14px rgba(129, 140, 248, 0.15);
}

.reels-time-box.min-box {
  border: 2px solid #ec4899;
  box-shadow:
    0 0 22px rgba(236, 72, 153, 0.35),
    inset 0 0 14px rgba(236, 72, 153, 0.15);
}

.reels-time-colon {
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  align-self: center;
  margin: 0 2px;
}

.reels-schedule-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reels-schedule-cancel-btn {
  flex: 1;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reels-schedule-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.reels-schedule-confirm-btn {
  flex: 1.2;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.45);
  transition: all 0.2s ease;
}

.reels-schedule-confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(236, 72, 153, 0.6);
  filter: brightness(1.05);
}

.reels-confirm-check-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

/* ── Brand Dark Glass Calendar View Styles ── */
.reels-schedule-view.hidden {
  display: none !important;
}

.reels-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.reels-cal-back-btn {
  background: transparent;
  border: none !important;
  box-shadow: none !important;
  color: var(--p-white, #ffffff);
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.reels-cal-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-2px);
}

.reels-cal-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reels-cal-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-transform: capitalize;
}

.reels-cal-nav-arrows {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reels-cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reels-cal-nav-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(192, 132, 252, 0.4);
}

.reels-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
}

.reels-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.reels-cal-day {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.15s ease;
  user-select: none;
}

.reels-cal-day.other-month {
  color: rgba(255, 255, 255, 0.25);
  cursor: default;
}

.reels-cal-day.today:not(.selected) {
  border: 1.5px solid rgba(168, 85, 247, 0.6);
}

.reels-cal-day.selected {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.5);
}

.reels-cal-day:not(.other-month):hover:not(.selected) {
  background: rgba(168, 85, 247, 0.2);
}

.reels-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reels-cal-today-btn {
  background: transparent;
  border: none;
  color: #c084fc;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.reels-cal-today-btn:hover {
  background: rgba(168, 85, 247, 0.15);
}

.reels-cal-apply-btn {
  padding: 9px 20px;
  border-radius: 14px;
  background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
  transition: all 0.2s ease;
}

.reels-cal-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(236, 72, 153, 0.55);
}

/* ── Publish Warning / Progress / Result Modal ── */
.reels-publish-overlay {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.reels-publish-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.reels-publish-modal {
  background: rgba(18, 12, 38, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 32px 24px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.reels-publish-overlay.visible .reels-publish-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.reels-publish-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reels-publish-icon.info {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.14);
  box-shadow:
    0 0 0 8px rgba(192, 132, 252, 0.06),
    0 0 26px rgba(192, 132, 252, 0.28);
}

.reels-publish-icon.warning {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
  box-shadow:
    0 0 0 8px rgba(251, 191, 36, 0.06),
    0 0 26px rgba(251, 191, 36, 0.28);
}

.reels-publish-icon.success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.14);
  box-shadow:
    0 0 0 8px rgba(74, 222, 128, 0.06),
    0 0 26px rgba(74, 222, 128, 0.28);
}

.reels-publish-icon.error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.14);
  box-shadow:
    0 0 0 8px rgba(248, 113, 113, 0.06),
    0 0 26px rgba(248, 113, 113, 0.28);
}

.reels-publish-icon.progress {
  background: transparent;
  box-shadow: none;
}

.reels-publish-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.reels-publish-lines {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
}

.reels-publish-line {
  display: block;
}

.reels-publish-line + .reels-publish-line {
  margin-top: 4px;
}

.reels-publish-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.reels-publish-actions.hidden {
  display: none !important;
}

.reels-publish-btn {
  flex: 1;
  height: 48px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reels-publish-btn.hidden {
  display: none !important;
}

.reels-publish-btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.reels-publish-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.reels-publish-btn-primary {
  background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.45);
}

.reels-publish-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(236, 72, 153, 0.6);
  filter: brightness(1.05);
}

.reels-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #c084fc;
  border-right-color: #ec4899;
  animation: reels-spin 0.8s linear infinite;
}

@keyframes reels-spin {
  to {
    transform: rotate(360deg);
  }
}
