/* ==============================
  パンくずリスト
============================== */
.breadcrumb {
  background: #f8f9fa;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb-item {
  display: inline;
}

.breadcrumb-item a {
  color: #2E86C1;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.breadcrumb-item a:hover {
  color: #1a5f8a;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 600;
}

.breadcrumb-separator {
  color: #adb5bd;
  font-size: 12px;
  line-height: 1;
}

@media (max-width: 640px) {
  .breadcrumb {
    padding: 10px 0;
    font-size: 13px;
  }
  
  .breadcrumb-list {
    gap: 6px;
  }
}

/* ==============================
  チャットボット
============================== */
.chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Noto Sans JP', sans-serif;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2E86C1 0%, #1a5f8a 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(46, 134, 193, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
  position: relative;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(46, 134, 193, 0.5);
}

.chatbot-toggle.active {
  background: linear-gradient(135deg, #1a5f8a 0%, #144a6e 100%);
  transform: scale(0.95);
}

.chatbot-toggle.active i::before {
  content: "\f00d";
}

.chatbot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FF6B6B;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: min(680px, calc(100vh - 140px));
  max-height: calc(100vh - 140px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
}

.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  background: linear-gradient(135deg, #2E86C1 0%, #1a5f8a 100%);
  color: white;
  padding: 20px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-header-info i {
  font-size: 28px;
}

.chatbot-header-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.chatbot-status {
  font-size: 11px;
  opacity: 0.9;
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}

.chatbot-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.chatbot-reset {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-reset:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(180deg);
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}

.chatbot-message {
  display: flex;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2E86C1 0%, #1a5f8a 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
}

.message-content p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #333;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content a {
  color: #2E86C1;
  text-decoration: underline;
  font-weight: 600;
}

.message-content a:hover {
  color: #1a5f8a;
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-content {
  background: linear-gradient(135deg, #2E86C1 0%, #1a5f8a 100%);
  color: white;
}

.user-message .message-content p {
  color: white;
}

.detail-page-link {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e9ecef;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  color: #2E86C1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.detail-link:hover {
  background: #2E86C1;
  color: white;
  border-color: #2E86C1;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(46, 134, 193, 0.3);
}

.detail-link i:first-child {
  font-size: 12px;
}

.detail-link i:last-child {
  font-size: 10px;
  margin-left: 2px;
}

.related-questions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.related-questions-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.related-questions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.related-question-btn {
  padding: 6px 12px;
  background: #f0f7ff;
  border: 1px solid #b3d9ff;
  border-radius: 16px;
  font-size: 12px;
  color: #2E86C1;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
}

.related-question-btn:hover {
  background: #2E86C1;
  color: white;
  border-color: #2E86C1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(46, 134, 193, 0.2);
}

.related-question-btn:active {
  transform: translateY(0);
}

.chatbot-menu {
  padding: 16px;
  background: white;
  border-top: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 180px;
  overflow-y: auto;
  flex-shrink: 0;
}

.chatbot-menu-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatbot-menu-category-title {
  font-size: 13px;
  font-weight: 700;
  color: #2E86C1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #e9ecef;
}

.chatbot-menu-category-title i {
  font-size: 14px;
}

.chatbot-menu-category-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.chatbot-menu-btn {
  padding: 8px 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  color: #333;
  font-weight: 500;
}

.chatbot-menu-btn:hover {
  background: #2E86C1;
  color: white;
  border-color: #2E86C1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(46, 134, 193, 0.2);
}

.chatbot-input-wrapper {
  position: relative;
  background: white;
  border-radius: 0 0 16px 16px;
}

.chatbot-suggestions {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f8f9fa;
  font-size: 14px;
  color: #333;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f0f7ff;
  color: #2E86C1;
  font-weight: 600;
}

.chatbot-input-area {
  padding: 16px;
  background: white;
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 16px 16px;
  display: flex;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e9ecef;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  font-family: 'Noto Sans JP', sans-serif;
}

.chatbot-input:focus {
  border-color: #2E86C1;
  box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.1);
}

.chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2E86C1 0%, #1a5f8a 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.chatbot-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(46, 134, 193, 0.3);
}

.chatbot-send:active {
  transform: scale(0.95);
}

/* 低解像度ディスプレイ対応（高さが低い画面） */
@media (max-height: 768px) {
  .chatbot-window {
    height: min(540px, calc(100vh - 120px));
    max-height: calc(100vh - 120px);
  }
  
  .chatbot-menu {
    max-height: 140px;
  }
  
  .chatbot-messages {
    min-height: 150px;
    padding: 16px;
  }
  
  .chatbot-header {
    padding: 16px;
  }
}

@media (max-height: 600px) {
  .chatbot-window {
    height: min(450px, calc(100vh - 100px));
    max-height: calc(100vh - 100px);
    bottom: 80px;
  }
  
  .chatbot-menu {
    max-height: 120px;
    padding: 12px;
    gap: 12px;
  }
  
  .chatbot-messages {
    min-height: 120px;
    padding: 12px;
    gap: 12px;
  }
  
  .chatbot-header {
    padding: 12px 16px;
  }
  
  .chatbot-menu-btn {
    padding: 6px 8px;
    font-size: 12px;
  }
}

/* スマホ対応 */
@media (max-width: 640px) {
  .chatbot-container {
    bottom: 16px;
    right: 16px;
  }
  
  .chatbot-toggle {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  
  .chatbot-window {
    bottom: 88px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    height: min(560px, calc(100vh - 120px));
    max-height: calc(100vh - 120px);
  }
  
  .chatbot-menu {
    max-height: 160px;
  }
  
  .chatbot-menu-category-title {
    font-size: 12px;
  }
  
  .chatbot-menu-category-items {
    grid-template-columns: 1fr;
  }
  
  .chatbot-menu-btn {
    font-size: 13px;
    padding: 10px 12px;
  }
  
  .chatbot-messages {
    padding: 16px;
    min-height: 180px;
  }
  
  .chatbot-header-actions {
    gap: 6px;
  }
  
  .chatbot-reset,
  .chatbot-close {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .chatbot-suggestions {
    max-height: 150px;
  }
  
  .suggestion-item {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .detail-link {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .chatbot-header-info h3 {
    font-size: 14px;
  }
  
  .chatbot-status {
    font-size: 10px;
  }
}

/* スマホ + 低解像度ディスプレイ */
@media (max-width: 640px) and (max-height: 600px) {
  .chatbot-window {
    height: calc(100vh - 100px);
    bottom: 80px;
  }
  
  .chatbot-menu {
    max-height: 100px;
    padding: 10px;
    gap: 10px;
  }
  
  .chatbot-messages {
    min-height: 100px;
    padding: 12px;
    gap: 10px;
  }
  
  .chatbot-header {
    padding: 10px 12px;
  }
}

