/* Common styles for Icon Repository Mocks */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --bg-main: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

*,
::before,
::after {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 禁止設定: テキスト・画像の選択・ドラッグを制御 */
.no-select {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.icon-preview-guard {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* スタイリッシュなトースト通知 */
#guard-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100010;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#guard-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#guard-toast .toast-icon {
  width: 20px;
  height: 20px;
  color: #f59e0b;
}

/* 広告シミュレーション枠スタイル */
.ad-banner-mock {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 12px;
}

.ad-banner-mock::before {
  content: '広告 / Sponsored';
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 10px;
  background: rgba(100, 116, 139, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* 広告モーダル（ダウンロード前シミュレーション） */
.ad-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100005;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ad-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.ad-modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.ad-modal-backdrop.active .ad-modal-card {
  transform: scale(1);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* スイッチャー用トップバー */
.mock-switcher-bar {
  background: #0f172a;
  color: #f8fafc;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 9000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mock-switcher-bar a {
  color: #94a3b8;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
}

.mock-switcher-bar a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.mock-switcher-bar a.active {
  color: #ffffff;
  background: #4f46e5;
}