/* ByteChips 共有メール送信フォーム（アップロード/ダッシュボード共通） */
.bc-sharemail__flabel { font-size:12px; font-weight:700; color:#94a3b8; margin:12px 0 4px; }
.bc-sharemail__flabel:first-child { margin-top:4px; }

/* マイアドレス帳（タップで宛先に追加・×で削除） */
.bc-sharemail__abook-chips { display:flex; flex-wrap:wrap; gap:6px; }
.bc-sharemail__abook-chip { display:inline-flex; align-items:stretch; border:1px solid #cbd5e1; border-radius:999px; overflow:hidden; background:#fff; max-width:100%; }
.bc-sharemail__abook-pick {
  border:none; background:transparent; color:#334155; font-size:12px;
  padding:6px 4px 6px 12px; cursor:pointer; max-width:220px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.bc-sharemail__abook-pick:hover { color:#0ea5a4; }
.bc-sharemail__abook-del {
  border:none; background:transparent; color:#94a3b8; font-size:15px; line-height:1;
  padding:0 10px; cursor:pointer; border-left:1px solid #e2e8f0;
}
.bc-sharemail__abook-del:hover { color:#ef4444; background:#fef2f2; }
.bc-sharemail__list { display:flex; flex-direction:column; gap:8px; margin:4px 0; }
.bc-sharemail__row { display:flex; gap:8px; align-items:center; }
.bc-sharemail__input,
.bc-sharemail__textarea {
  flex:1; min-width:0; width:100%; box-sizing:border-box;
  padding:11px 13px; border:1px solid #cbd5e1; border-radius:11px;
  background:#fff; color:#0f172a; font-size:14px; line-height:1.5;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.bc-sharemail__input::placeholder,
.bc-sharemail__textarea::placeholder { color:#94a3b8; }
.bc-sharemail__input:focus,
.bc-sharemail__textarea:focus { outline:none; border-color:#0ea5a4; box-shadow:0 0 0 3px rgba(14,165,164,.18); }
.bc-sharemail__input.is-invalid { border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.15); }
.bc-sharemail__row-remove {
  flex:none; width:40px; height:40px; border:1px solid #cbd5e1; border-radius:10px;
  background:#fff; color:#94a3b8; cursor:pointer; font-size:18px; line-height:1;
  display:flex; align-items:center; justify-content:center; transition:.15s ease;
}
.bc-sharemail__row-remove:hover { color:#ef4444; border-color:#fca5a5; background:#fef2f2; }
.bc-sharemail__add {
  margin-top:4px; display:inline-flex; align-items:center; gap:6px;
  padding:9px 14px; border:1px dashed #94a3b8; border-radius:10px;
  background:transparent; color:#0ea5a4; cursor:pointer; font-size:13px; font-weight:700;
  transition:.15s ease;
}
.bc-sharemail__add:hover { border-color:#0ea5a4; background:rgba(14,165,164,.07); }
.bc-sharemail__add[disabled] { opacity:.45; cursor:not-allowed; }
.bc-sharemail__textarea { margin-top:10px; resize:vertical; min-height:140px; }
.bc-sharemail__hint { font-size:12px; color:#ef4444; margin:4px 0 0; min-height:1em; }
.bc-sharemail__actions { margin-top:14px; }
.bc-sharemail__btn {
  appearance:none; border:none; border-radius:11px; padding:12px 22px;
  font-size:14px; font-weight:800; cursor:pointer; transition:.15s ease;
}
.bc-sharemail__btn--primary { background:#0ea5a4; color:#fff; }
.bc-sharemail__btn--primary:hover { background:#0d9488; }
.bc-sharemail__btn--primary[disabled] { opacity:.6; cursor:default; }
.bc-sharemail__btn--ghost { background:transparent; color:#475569; border:1px solid #cbd5e1; }
.bc-sharemail__btn--ghost:hover { background:#f1f5f9; }

/* モーダル（プレビュー / 完了） */
.bc-sharemail-modal {
  position:fixed; inset:0; z-index:100000; display:flex; align-items:center; justify-content:center;
  padding:16px; background:rgba(15,23,42,.55); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
  animation:bcsm-fade .15s ease;
}
@keyframes bcsm-fade { from { opacity:0; } to { opacity:1; } }
.bc-sharemail-modal__card {
  width:100%; max-width:520px; max-height:88vh; overflow:auto;
  background:#fff; color:#0f172a; border-radius:18px; box-shadow:0 24px 64px rgba(2,6,23,.45);
  padding:24px; animation:bcsm-pop .18s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes bcsm-pop { from { transform:translateY(8px) scale(.98); opacity:.6; } to { transform:none; opacity:1; } }
.bc-sharemail-modal__h { margin:0 0 4px; font-size:19px; font-weight:800; }
.bc-sharemail-modal__sub { margin:0 0 16px; font-size:13px; color:#64748b; line-height:1.6; }
.bc-sharemail-preview { border:1px solid #e2e8f0; border-radius:14px; overflow:hidden; }
.bc-sharemail-preview__head { background:#f8fafc; border-bottom:1px solid #e2e8f0; padding:13px 15px; font-size:13px; color:#334155; }
.bc-sharemail-preview__head > div { margin:3px 0; }
.bc-sharemail-preview__head b { color:#0f172a; }
.bc-sharemail-preview__body { padding:16px 15px; }
.bc-sharemail-preview__msg { white-space:pre-wrap; border-left:3px solid #0ea5a4; background:#f1f5f9; padding:11px 13px; border-radius:9px; margin:0 0 14px; font-size:14px; line-height:1.7; }
.bc-sharemail-preview__cta { display:inline-block; padding:11px 18px; background:#0ea5a4; color:#fff !important; text-decoration:none; border-radius:9px; font-weight:800; font-size:14px; }
.bc-sharemail-preview__note { font-size:12px; color:#94a3b8; margin:13px 0 0; line-height:1.6; }
.bc-sharemail-modal__chips { display:inline-flex; flex-wrap:wrap; gap:6px; vertical-align:top; }
.bc-sharemail-chip { background:#ecfdf5; color:#0f766e; border:1px solid #a7f3d0; border-radius:999px; padding:3px 11px; font-size:12px; }
.bc-sharemail-modal__status { font-size:13px; color:#b91c1c; margin-top:12px; min-height:1em; }
.bc-sharemail-modal__foot { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; }
.bc-sharemail-success { text-align:center; }
.bc-sharemail-success__icon {
  width:60px; height:60px; border-radius:50%; background:#ecfdf5; color:#0f766e;
  display:flex; align-items:center; justify-content:center; font-size:30px; margin:4px auto 14px;
}
.bc-sharemail-success__next { margin:10px 0 0; color:#0f766e; font-size:13px; font-weight:700; text-align:center; }
@media (max-width:560px){
  .bc-sharemail-modal__card { padding:18px 16px; }
  .bc-sharemail-modal__foot { flex-direction:column-reverse; }
  .bc-sharemail-modal__foot .bc-sharemail__btn { width:100%; }
}

/* ============================================================
   ダーク: ダッシュボードのドロワー内インラインフォームのみ暗くする。
   （アップロードページ＝ライトはそのまま。中央モーダル .bc-sharemail-modal__* は対象外）
   ============================================================ */
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__flabel { color:#94a3b8; }
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__input,
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__textarea {
  background:#0f172a; color:#e2e8f0; border-color:#273244;
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__input::placeholder,
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__textarea::placeholder { color:#64748b; }
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__input:focus,
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__textarea:focus {
  border-color:#0ea5a4; box-shadow:0 0 0 3px rgba(14,165,164,.28);
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__input.is-invalid {
  border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.25);
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__row-remove {
  background:#111827; color:#94a3b8; border-color:#273244;
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__row-remove:hover {
  color:#fca5a5; border-color:rgba(239,68,68,.5); background:rgba(239,68,68,.14);
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__add {
  border-color:#3a4862; color:#5eead4;
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__add:hover {
  border-color:#0ea5a4; background:rgba(14,165,164,.12);
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__abook-chip {
  background:#0f172a; border-color:#273244;
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__abook-pick { color:#cbd5e1; }
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__abook-pick:hover { color:#5eead4; }
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__abook-del {
  color:#94a3b8; border-left-color:#273244;
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__abook-del:hover {
  color:#fca5a5; background:rgba(239,68,68,.14);
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__btn--ghost {
  background:transparent; color:#cbd5e1; border-color:#273244;
}
:root[data-bc-theme="dark"] .bytechips-dashboard .bc-sharemail__btn--ghost:hover {
  background:#182235;
}
