/* web/css/share.css — Mukbang (오늘 뭐 먹지?) Story 9:16 Canvas & Social Share Styles */

/* Share Modal Backdrop */
.share-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.share-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Dialog Box */
.share-modal-dialog {
  background: #161A24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 107, 107, 0.15);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.share-modal-backdrop.open .share-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 26, 36, 0.95);
}

.modal-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #FFA94D;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F8F9FA;
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #B0B8C4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

/* Modal Body */
.share-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Mode Switcher Tabs */
.share-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #0F1117;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-mode-tab {
  background: transparent;
  border: none;
  color: #8C96A5;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.share-mode-tab:hover {
  color: #F8F9FA;
}

.share-mode-tab.active {
  background: #212634;
  color: #FFA94D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Meal Chips for Selective Sharing */
.modal-meal-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-meal-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-meal-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.modal-meal-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-content {
  background: #212634;
  color: #B0B8C4;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.modal-meal-chip:hover .chip-content {
  background: #283042;
  color: #F8F9FA;
}

.modal-meal-checkbox:checked + .chip-content {
  background: rgba(255, 107, 107, 0.2);
  color: #FF6B6B;
  border-color: #FF6B6B;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.25);
}

/* Story Theme Selector */
.story-theme-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #747D8C;
}

.theme-chips {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-chip {
  background: #212634;
  color: #B0B8C4;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-chip:hover {
  background: #283042;
  color: #F8F9FA;
}

.theme-chip.active {
  background: rgba(255, 169, 77, 0.2);
  color: #FFA94D;
  border-color: #FFA94D;
}

/* 9:16 Canvas Story Preview Area */
.canvas-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #0B0D12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
}

.canvas-aspect-box {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #181C26;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.canvas-preview-hint {
  font-size: 0.72rem;
  color: #747D8C;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Modal Actions List */
.modal-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-share-instagram {
  background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCB045 100%);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(253, 29, 29, 0.35);
  transition: all 0.2s ease;
}

.btn-share-instagram:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(253, 29, 29, 0.5);
}

.btn-share-kakao {
  background: #FEE500;
  color: #191600;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(254, 229, 0, 0.25);
  transition: all 0.2s ease;
}

.btn-share-kakao:hover {
  background: #FADA0A;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(254, 229, 0, 0.4);
}

.btn-share-whatsapp {
  background: #25D366;
  color: #FFFFFF;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
}

.btn-share-whatsapp:hover {
  background: #20BA5A;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.btn-download-png {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.btn-download-png:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-share-link {
  background: #212634;
  color: #F8F9FA;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-share-link:hover {
  background: #283042;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  background: rgba(22, 26, 36, 0.95);
  border: 1px solid rgba(255, 169, 77, 0.5);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 169, 77, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  text-align: center;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
