/* Cookie 同意バナー・モーダル */

.ts-cmp-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 12000;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0));
  background: color-mix(in srgb, var(--color-navy, #0a1a3a) 95%, white);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.ts-cmp-banner__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ts-cmp-banner__title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.ts-cmp-banner__body {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0.95;
}

.ts-cmp-banner__link {
  color: #a8c7ff;
  font-size: 0.8125rem;
  text-decoration: underline;
}

.ts-cmp-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.ts-cmp-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.ts-cmp-btn--primary {
  background: #fff;
  color: var(--color-navy, #0a1a3a);
}

.ts-cmp-btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 640px) {
  .ts-cmp-banner__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .ts-cmp-banner__text {
    flex: 1 1 220px;
    min-width: 200px;
  }

  .ts-cmp-banner__actions {
    flex: 0 0 auto;
    margin-top: 0;
    margin-left: auto;
  }
}

/* モーダル */
html.ts-cmp-modal-open,
body.ts-cmp-modal-open {
  overflow: hidden;
}

.ts-cmp-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(10, 26, 58, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ts-cmp-modal[hidden] {
  display: none;
}

.ts-cmp-modal__dialog {
  background: #fff;
  color: #0a1a3a;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  padding: 1.25rem 1.25rem 1rem;
}

.ts-cmp-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ts-cmp-modal__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  font-family: var(--font-heading, "Jost", "Inter", sans-serif);
}

.ts-cmp-modal__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #445;
  border-radius: 4px;
}

.ts-cmp-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.ts-cmp-modal__intro,
.ts-cmp-modal__hint {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
  color: #334;
}

.ts-cmp-modal__plink {
  display: inline-block;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  color: #1a56db;
}

.ts-cmp-categories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ts-cmp-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8ecf4;
}

.ts-cmp-category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ts-cmp-category__title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.ts-cmp-category__desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  margin: 0;
  color: #556;
}

.ts-cmp-toggle {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
}

.ts-cmp-toggle__input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.ts-cmp-toggle__input:disabled {
  cursor: not-allowed;
}

.ts-cmp-toggle__slider {
  position: absolute;
  inset: 0;
  background: #c5cdd9;
  border-radius: 12px;
  transition: background 0.2s;
}

.ts-cmp-toggle__slider::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ts-cmp-toggle__input:checked + .ts-cmp-toggle__slider {
  background: #1a56db;
}

.ts-cmp-toggle__input:checked + .ts-cmp-toggle__slider::after {
  transform: translateX(20px);
}

.ts-cmp-toggle__input:focus-visible + .ts-cmp-toggle__slider {
  outline: 2px solid #1a56db;
  outline-offset: 2px;
}

.ts-cmp-toggle__input:focus-visible:disabled + .ts-cmp-toggle__slider {
  outline-color: #8899aa;
}

.ts-cmp-toggle__input:disabled + .ts-cmp-toggle__slider {
  opacity: 0.6;
}

.ts-cmp-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid #e8ecf4;
}

.ts-cmp-modal__footer .ts-cmp-btn--primary {
  background: var(--color-navy, #0a1a3a);
  color: #fff;
}

.ts-cmp-modal__footer .ts-cmp-btn--secondary {
  border-color: #c5cdd9;
  color: #334;
}

#open-consent-settings {
  font-size: 0.8125rem;
  background: transparent;
  border: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* プライバシーポリシー本文内（フッター固定から移設） */
.static-page .container #open-consent-settings {
  margin-top: 0;
  text-align: start;
}
