/* @AUDITION STEP4：保存・自動入力カードの表示専用CSS。
   保存・復元・削除のロジック、CF7・GA4・STEP2/3には影響しない。 */
.ata-profile-storage {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 28px;
  padding: 19px 17px 16px;
  border: 1px solid #a7d77f;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(32, 89, 46, .09);
  color: #202820;
  font-size: 14px;
  line-height: 1.6;
}
.ata-profile-storage *, .ata-profile-storage *::before, .ata-profile-storage *::after { box-sizing: border-box; }
.ata-profile-storage__heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: #202820;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}
/* シンプルな書類アイコン（画像ファイル・外部ライブラリ不要） */
.ata-profile-storage__heading::before {
  content: '';
  display: block;
  flex: 0 0 23px;
  width: 23px;
  height: 27px;
  border: 2px solid #329b26;
  border-radius: 4px;
  background: linear-gradient(#329b26,#329b26) 5px 10px / 11px 2px no-repeat,
              linear-gradient(#329b26,#329b26) 5px 16px / 9px 2px no-repeat;
}
.ata-profile-storage__status {
  position: relative;
  margin: 0 0 15px;
  padding: 12px 12px 12px 43px;
  border-radius: 10px;
  background: #edf9e9;
  color: #246528;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.ata-profile-storage__status:empty { display: none; }
.ata-profile-storage__status::before {
  content: '✓';
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #35aa2b;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.ata-profile-storage__label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
  color: #232823;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}
.ata-profile-storage__label-text { flex: 1 1 auto; min-width: 0; }
/* 本物のチェックボックスは残し、外観だけスイッチに変更 */
.ata-profile-storage__toggle {
  position: absolute;
  right: 0;
  top: 50%;
  width: 47px;
  height: 28px;
  margin: -14px 0 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.ata-profile-storage__switch {
  position: relative;
  display: block;
  flex: 0 0 47px;
  width: 47px;
  height: 28px;
  border-radius: 99px;
  background: #cbd0cc;
  transition: background .15s ease;
}
.ata-profile-storage__switch::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.ata-profile-storage__toggle:checked + .ata-profile-storage__switch { background: #339b27; }
.ata-profile-storage__toggle:checked + .ata-profile-storage__switch::before { transform: translateX(19px); }
.ata-profile-storage__toggle:focus-visible + .ata-profile-storage__switch { outline: 3px solid #1c69b5; outline-offset: 3px; }
.ata-profile-storage__note {
  margin: 12px 0 0;
  padding: 11px 0 0 25px;
  border-top: 1px solid #e1e6df;
  color: #5b615c;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  position: relative;
}
.ata-profile-storage__note::before {
  content: 'i';
  position: absolute;
  top: 13px;
  left: 1px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #929b93;
  border-radius: 50%;
  font: 700 11px/1 Arial, sans-serif;
  color: #68746a;
}
.ata-profile-storage__actions { margin-top: 15px; }
.ata-profile-storage__actions:has(.ata-profile-storage__delete[hidden]) { display: none; }
.ata-profile-storage__delete {
  display: flex;
  width: 100%;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: #edf8e9;
  color: #247d24;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ata-profile-storage__delete::before { content: '▤'; font-size: 18px; text-decoration: none; }
.ata-profile-storage__delete:hover { background: #e0f2d9; }
.ata-profile-storage__delete:focus-visible { outline: 3px solid #1c69b5; outline-offset: 2px; }
.ata-profile-storage__delete[hidden] { display: none !important; }
@media (max-width: 600px) {
  .ata-profile-storage { margin-bottom: 24px; padding: 16px 14px 14px; border-radius: 14px; }
  .ata-profile-storage__heading { font-size: 16px; margin-bottom: 14px; }
  .ata-profile-storage__label { font-size: 13px; }
  .ata-profile-storage__note { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ata-profile-storage__switch, .ata-profile-storage__switch::before { transition: none; }
}

/* 削除ボタンを画面から非表示にする。
   DOM要素とJavaScript側のイベント処理は変更せず、保存OFFによる削除を利用する。 */
.ata-profile-storage .ata-profile-storage__actions { display: none !important; }
