/**
 * Interview Booking プラグイン スタイル
 * MYoACT カラーテーマ（ダーク背景 / #005BFF・#00FF9D グラデーション）
 */

/* ===== WordPress サイト背景・テキスト ===== */
body {
  background-color: #000;
}

/* ページタイトル（テーマ共通セレクター）— myoact.com「基本機能」と同スタイル */
.entry-title,
.page-title,
.wp-block-post-title,
h1.title,
h1.page-title {
  text-align: center;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(267.48deg, #00ff9d 20%, #005bff 140%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== コンテナ ===== */
.ib-booking-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
  background: transparent;
  border-radius: 12px;
  color: #fff;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.6;
}

/* ===== キャンペーン・お問い合わせ案内 ===== */
.ib-campaign-notice {
  margin-bottom: 28px;
  padding: 20px 24px;
  background: rgba(0, 91, 255, 0.12);
  border: 1px solid rgba(0, 255, 157, 0.25);
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
}

.ib-campaign-notice p {
  margin: 0 0 10px 0;
}

.ib-campaign-notice p:last-child {
  margin-bottom: 0;
}

.ib-campaign-link-wrap {
  margin-bottom: 12px !important;
  text-align: center;
}

.ib-campaign-link {
  color: #00ff9d;
  font-weight: 600;
  text-decoration: none;
}

.ib-campaign-link:hover {
  text-decoration: underline;
}

/* スマホでキャンペーン見出しを1行に収める */
@media (max-width: 600px) {
  .ib-campaign-notice {
    margin-bottom: 20px;
    padding: 14px 12px;
  }
  .ib-campaign-link-wrap {
    text-align: center;
  }
  .ib-campaign-notice p {
    margin-bottom: 8px;
  }
  .ib-campaign-link {
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  .ib-campaign-desc,
  .ib-contact-note {
    text-align: left;
  }
}

.ib-campaign-desc,
.ib-contact-note {
  color: rgba(255, 255, 255, 0.9);
}

.ib-contact-note a {
  color: #00ff9d;
  text-decoration: none;
}

.ib-contact-note a:hover {
  text-decoration: underline;
}

/* ===== ステップインジケーター ===== */
.ib-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.ib-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 200px;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.ib-step.active {
  opacity: 1;
}

/* 完了済みステップは、未選択のステップと同じく目立たない表示（①の時の②的な見た目） */
.ib-step.done {
  opacity: 0.5;
}

.ib-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: #333;
  z-index: 0;
}

.ib-step.done:not(:last-child)::after {
  background: #333;
}

.ib-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  position: relative;
  z-index: 1;
  transition: background 0.3s;
}

.ib-step.active .ib-step-number {
  background: #005bff;
}

.ib-step.done .ib-step-number {
  background: #333;
}

.ib-step-label {
  margin-top: 6px;
  font-size: 12px;
  color: #999;
  text-align: center;
}

.ib-step.active .ib-step-label {
  color: #005bff;
  font-weight: bold;
}

/* ===== エラーメッセージ ===== */
.ib-error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid #f44336;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #ff6b6b;
  font-size: 14px;
}

/* ===== セクションタイトル ===== */
.ib-step-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 20px;
}

.ib-selected-label {
  font-size: 15px;
  color: #00ff9d;
  font-weight: 500;
  margin: 0 0 16px;
}

.ib-hint {
  font-size: 12px;
  color: #555;
  margin-top: 12px;
}

/* ===== スケジュールレイアウト ===== */
.ib-schedule-wrap {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* ===== ミニカレンダー ===== */
.ib-mini-cal {
  flex: 0 0 240px;
  border: 1px solid #222;
  border-radius: 8px;
  overflow: visible;
  background: #111;
}

.ib-mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #1a2a3a;
  color: #fff;
  border-radius: 8px 8px 0 0;
  border: 1px solid #222;
}

.ib-mini-cal-header .ib-month-label {
  font-size: 14px;
  font-weight: 600;
}

.ib-mini-cal-header .ib-nav-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
  padding: 0;
}

.ib-mini-cal-header .ib-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ib-mini-cal-header .ib-nav-btn:disabled,
.ib-mini-cal-header .ib-nav-btn.disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
  pointer-events: none;
}

.ib-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #1a1a1a;
  border-bottom: 1px solid #222;
}

.ib-calendar-weekdays span {
  text-align: center;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

.ib-calendar-weekdays span:first-child {
  color: #ff6b6b;
}
.ib-calendar-weekdays span:last-child {
  color: #5b9aff;
}

.ib-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 6px;
  gap: 2px;
}

.ib-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
  border: none;
  background: transparent;
  color: #ccc;
  line-height: 1;
  box-sizing: border-box;
  padding: 0;
}

.ib-calendar-day.selectable {
  color: #fff;
  font-weight: 500;
}

.ib-calendar-day.selectable:hover {
  background: #1a2a4a;
  color: #5b9aff;
}

.ib-calendar-day.today {
  font-weight: 700;
}

.ib-calendar-day.today:not(.selected) {
  border: 1.5px solid #2f74ff;
  background: rgba(47, 116, 255, 0.16);
  color: #8db6ff;
}

.ib-calendar-day.today.past,
.ib-calendar-day.today.disabled {
  color: #8db6ff;
}

.ib-calendar-day.in-week {
  background: #0d1e3a;
}

.ib-calendar-day.disabled,
.ib-calendar-day.past {
  color: #333;
  cursor: not-allowed;
}

/* 30日超の日（ツールチップ付き） */
.ib-calendar-day.over-max-date {
  position: relative;
}

.ib-calendar-day.over-max-date::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
}

.ib-calendar-day.over-max-date:hover::after {
  opacity: 1;
}

/* 予約枠なし（空き枠ゼロ）の日 */
.ib-calendar-day.no-slots {
  color: #555;
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.7;
}

.ib-calendar-day.other-month {
  color: #333;
}
.ib-calendar-day.sunday {
  color: #ff6b6b;
}
.ib-calendar-day.saturday {
  color: #5b9aff;
}

/* ===== 週次ビュー ===== */
.ib-week-view {
  --ib-week-nav-btn-width: 42px;
  flex: 1;
  border: 1px solid #222;
  border-radius: 8px;
  background: #111;
  overflow: hidden;
  min-width: 0;
}

.ib-week-nav {
  display: grid;
  grid-template-columns: var(--ib-week-nav-btn-width) minmax(0, 1fr) var(
      --ib-week-nav-btn-width
    );
  align-items: stretch;
  background: #1a1a1a;
  border-bottom: 1px solid #222;
}

.ib-week-nav-btn {
  background: transparent;
  border: none;
  padding: 0;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  color: #666;
  transition: color 0.2s;
  flex-shrink: 0;
  line-height: 1;
  min-height: 72px;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
}

.ib-week-nav-btn:hover:not(:disabled) {
  color: #005bff;
}

.ib-week-nav-btn:focus,
.ib-week-nav-btn:focus-visible,
.ib-week-nav-btn:active {
  outline: none;
  box-shadow: none;
}

.ib-week-nav-btn:disabled,
.ib-week-nav-btn.disabled {
  color: #333;
  cursor: not-allowed;
}

.ib-week-header {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
  box-sizing: border-box;
  will-change: transform, opacity;
}

.ib-week-header-day {
  text-align: center;
  padding: 10px 2px;
  border-right: 1px solid #222;
  min-width: 0;
}

.ib-week-header-day:last-child {
  border-right: none;
}

.ib-week-dow {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
}

.ib-week-date-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 14px;
  font-weight: 500;
  color: #ccc;
  transition:
    background 0.2s,
    color 0.2s;
  line-height: 1;
  box-sizing: border-box;
  padding: 0;
}

.ib-week-header-day.today .ib-week-date-num {
  background: #005bff;
  color: #fff;
}

.ib-week-header-day.past .ib-week-dow,
.ib-week-header-day.past .ib-week-date-num {
  color: #333;
}

.ib-week-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-height: 420px;
  min-height: 120px;
  overflow-y: auto;
  padding: 0 var(--ib-week-nav-btn-width);
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
  will-change: transform, opacity;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.ib-week-slots::-webkit-scrollbar {
  display: none;
}

.ib-week-empty-note {
  margin: 0;
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
  color: #8db6ff;
  background: rgba(47, 116, 255, 0.08);
  border-bottom: 1px solid #1f2f45;
}

.ib-week-col {
  border-right: 1px solid #1a1a1a;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 120px;
  min-width: 0;
}

.ib-week-col:last-child {
  border-right: none;
}

.ib-week-animating {
  pointer-events: none;
}

.ib-week-swipe-out-left {
  animation: ib-week-swipe-out-left 0.18s ease forwards;
}

.ib-week-swipe-out-right {
  animation: ib-week-swipe-out-right 0.18s ease forwards;
}

.ib-week-swipe-in-left {
  animation: ib-week-swipe-in-left 0.22s ease forwards;
}

.ib-week-swipe-in-right {
  animation: ib-week-swipe-in-right 0.22s ease forwards;
}

@keyframes ib-week-swipe-out-left {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-18px);
    opacity: 0.25;
  }
}

@keyframes ib-week-swipe-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(18px);
    opacity: 0.25;
  }
}

@keyframes ib-week-swipe-in-left {
  from {
    transform: translateX(-18px);
    opacity: 0.25;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes ib-week-swipe-in-right {
  from {
    transform: translateX(18px);
    opacity: 0.25;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.ib-slot-pill {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1.5px solid #2f74ff;
  border-radius: 10px;
  background: #1f5ff0;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  transition:
    transform 0.14s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  box-sizing: border-box;
  box-shadow: 0 0 0 0 rgba(0, 91, 255, 0);
}

.ib-slot-pill.selected {
  background: #0f4fe0;
  border-color: #4d8aff;
  box-shadow: 0 0 0 2px rgba(77, 138, 255, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .ib-slot-pill:hover {
    background: #2a6bff;
    border-color: #5d94ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 91, 255, 0.35);
  }
}

.ib-slot-pill:active {
  transform: scale(0.98);
}

.ib-slot-empty {
  text-align: center;
  color: #333;
  font-size: 20px;
  padding: 16px 0;
}

.ib-col-loading {
  text-align: center;
  padding: 20px 0;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.ib-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #333;
  border-top-color: #005bff;
  border-radius: 50%;
  animation: ib-spin 0.7s linear infinite;
}

@keyframes ib-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== フォーム ===== */
.ib-form {
  margin-top: 8px;
}

.ib-form-group {
  margin-bottom: 20px;
}

.ib-form-group label {
  display: block;
  font-size: 14px;
  line-height: 1.4 !important;
  font-weight: 600;
  color: #ccc;
  margin-top: 0 !important;
  margin-bottom: 6px !important;
  padding: 0 !important;
  height: auto !important;
}

.ib-required {
  color: #ff6b6b;
  margin-left: 2px;
}

.ib-form-group input[type="text"],
.ib-form-group input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s;
  outline: none;
  background: #1a1a1a;
  color: #fff;
  margin-top: 0 !important;
}

.ib-form-group input::placeholder {
  color: #555;
}

.ib-form-group input:focus {
  border-color: #005bff;
  box-shadow: 0 0 0 2px rgba(0, 91, 255, 0.3);
}

.ib-field-error {
  display: block;
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

/* ===== ボタン ===== */
.ib-form-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.ib-form-actions .ib-back-btn {
  flex: none;
  margin-bottom: 0;
  padding: 14px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}

.ib-form-actions .ib-submit-btn {
  flex: none;
  width: auto;
}

.ib-form-actions .ib-back-btn,
.ib-form-actions .ib-submit-btn {
  min-height: 52px;
  line-height: 1;
}

.ib-form-actions .ib-back-to-date-btn {
  margin-top: 0;
  order: 2;
}

.ib-form-actions .ib-submit-btn {
  order: 1;
}

.ib-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(267.48deg, #00ff9d 20%, #005bff 140%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  position: relative;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.ib-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 8px 18px rgba(0, 91, 255, 0.28);
}

.ib-submit-btn:active:not(:disabled) {
  transform: scale(0.99);
  box-shadow: 0 2px 8px rgba(0, 91, 255, 0.2);
}

.ib-submit-btn:disabled {
  background: #333;
  cursor: not-allowed;
}

.ib-back-btn {
  background: transparent;
  border: none;
  color: #5b9aff;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline;
}

.ib-back-btn:hover {
  color: #005bff;
}

#ib-cancel-booking.is-loading {
  text-decoration: none;
  color: #a8afbb;
  cursor: default;
}

#ib-step-cancelled .ib-complete-note {
  margin-bottom: 24px;
}

#ib-step-cancelled #ib-new-booking {
  margin-top: 8px;
}

.ib-back-to-date-btn {
  margin-top: 12px;
  margin-bottom: 0;
  width: 100%;
  justify-content: center;
  padding: 14px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(180deg, #3a3f48 0%, #2e333b 100%);
  color: #e2e7f0;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    background-color 0.2s,
    color 0.2s;
}

.ib-back-to-date-btn:hover {
  color: #ffffff;
  background: linear-gradient(180deg, #444b56 0%, #363c46 100%);
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.ib-back-to-date-btn:active {
  transform: scale(0.99);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ib-back-to-date-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

/* ===== 完了画面 ===== */
.ib-complete {
  text-align: center;
  padding: 32px 16px;
}

.ib-complete-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.ib-meet-link-wrap a {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(267.48deg, #00ff9d 20%, #005bff 140%);
  color: #fff !important;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: opacity 0.2s;
}

.ib-meet-link-wrap a:hover {
  opacity: 0.85;
}

.ib-complete-note {
  color: #999;
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.8;
}

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  .ib-schedule-wrap {
    flex-direction: column;
    width: 100%;
  }
  .ib-mini-cal,
  .ib-week-view {
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .ib-week-view {
    --ib-week-nav-btn-width: 34px;
  }
  .ib-week-slots {
    max-height: 300px;
    padding-left: var(--ib-week-nav-btn-width);
    padding-right: var(--ib-week-nav-btn-width);
  }
  .ib-week-nav-btn {
    min-height: 64px;
    font-size: 20px;
  }
  .ib-week-dow {
    font-size: 10px;
  }
  .ib-week-date-num {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .ib-booking-wrap {
    padding: 14px 8px;
  }
  .ib-step-label {
    font-size: 10px;
  }
  .ib-step-title {
    font-size: 16px;
  }
  .ib-slot-pill {
    font-size: 11px;
    min-height: 44px;
    padding: 7px 8px;
  }
}

/* reCAPTCHAバッジ非表示（フォーム内に規約テキストを表示しているため） */
.grecaptcha-badge {
  visibility: hidden;
}

.ib-recaptcha-notice {
  font-size: 11px;
  color: #666;
  margin: 12px 0 0;
  line-height: 1.6;
  text-align: center;
}

.ib-recaptcha-notice a {
  color: #5b9aff;
  text-decoration: none;
}

.ib-recaptcha-notice a:hover {
  text-decoration: underline;
}
