@tailwind base;
@tailwind components;
@tailwind utilities;

/* MovBot利用不可時の表示スタイル - 既存のcard系スタイルと統一 */
.unavailable-status-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.3s ease-out;
}

.status-icon-section {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 3rem;
  line-height: 1;
}

.status-message-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.status-message-section .status-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.status-message-section .status-description {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.wait-time-info {
  background-color: rgba(var(--color-success-rgb), 0.08);
  border: 1px solid rgba(var(--color-success-rgb), 0.2);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.wait-time-text {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 1.125rem;
}

.action-buttons-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.action-btn.primary {
  background-color: var(--color-primary);
  color: var(--color-btn-primary-text);
}

.action-btn.primary:hover {
  background-color: var(--color-primary-hover);
}

.action-btn.primary:active {
  background-color: var(--color-primary-active);
}

.action-btn.secondary {
  background-color: var(--color-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.action-btn.secondary:hover {
  background-color: var(--color-secondary-hover);
  border-color: var(--color-primary);
}

.action-btn.emergency {
  background-color: rgba(var(--color-error-rgb), 0.1);
  color: var(--color-error);
  border: 1px solid rgba(var(--color-error-rgb), 0.3);
}

.action-btn.emergency:hover {
  background-color: rgba(var(--color-error-rgb), 0.15);
  border-color: var(--color-error);
}

.action-btn:active {
  transform: translateY(1px);
}

/* アニメーション */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
  .unavailable-status-card {
    margin: 0 1rem 1.5rem 1rem;
    padding: 1rem;
  }
  
  .status-icon-section {
    font-size: 2.5rem;
  }
  
  .status-message-section .status-title {
    font-size: 1.125rem;
  }
  
  .action-btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
}

/* Pagy pagination styles */
.pagy {
    display: flex;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: rgb(107 114 128);
}

.pagy > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0.25rem;
}

.pagy a:not(.gap) {
    display: block;
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: rgb(229 231 235);
}

.pagy a:not(.gap):hover {
    background-color: rgb(209 213 219);
}

.pagy a:not(.gap):not([href]) {
    color: rgb(209 213 219);
    background-color: rgb(243 244 246);
    cursor: default;
}

.pagy a:not(.gap).current {
    color: rgb(255 255 255);
    background-color: rgb(37 99 235);
}

.pagy .gap {
    padding: 0.25rem 0.375rem;
}

.pagy label {
    display: inline-block;
    white-space: nowrap;
    background-color: rgb(229 231 235);
    border-radius: 0.5rem;
    padding: 0.125rem 0.75rem;
}

.pagy label input {
    background-color: rgb(243 244 246);
    border: none;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
}

/* 共通ダイアログスタイル */
.dialog-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
}

.dialog-container.dialog-container--visible {
  display: block;
}

.dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dialog--visible {
  opacity: 1;
}

.dialog--closing {
  opacity: 0;
}

.dialog__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dialog__content {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 28rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.dialog--visible .dialog__content {
  transform: scale(1);
}

.dialog__header {
  display: flex;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.dialog__icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

.dialog__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.dialog__body {
  padding: 1rem 1.5rem;
}

.dialog__message {
  color: #374151;
  line-height: 1.6;
  margin: 0;
}

.dialog__content-custom {
  /* カスタムコンテンツ用のスタイル */
}

.dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.dialog__button {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 4rem;
}

.dialog__button--primary {
  background-color: #2563eb;
  color: white;
}

.dialog__button--primary:hover {
  background-color: #1d4ed8;
}

.dialog__button--secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.dialog__button--secondary:hover {
  background-color: #e5e7eb;
}

/* 緊急連絡ダイアログ専用スタイル */
.emergency-contact-content .emergency-message {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #374151;
  font-size: 1rem;
}


.emergency-contact-info {
  text-align: center;
  padding: 1.5rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.emergency-contact-info .contact-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.emergency-contact-info .contact-number-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.emergency-contact-info .facility-name {
  font-size: 0.875rem;
  color: #64748b;
}

/* 位置選択ダイアログ専用スタイル */
.location-dialog-content .recent-section {
  margin-bottom: 1.5rem;
}

.location-dialog-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
}

.recent-location-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recent-location-tag {
  background-color: #dbeafe;
  color: #1d4ed8;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 0.875rem;
}

.recent-location-tag:hover {
  background-color: #bfdbfe;
}

.location-list {
  max-height: 20rem;
  overflow-y: auto;
}

.location-category-header {
  font-weight: 600;
  color: #374151;
  margin: 1rem 0 0.5rem 0;
  font-size: 0.875rem;
}

.floor-group {
  margin-bottom: 1rem;
}

.floor-header {
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  padding-left: 0.5rem;
}

.location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 0.25rem;
}

.location-item:hover {
  background-color: #f3f4f6;
}

.location-name {
  font-weight: 500;
  color: #111827;
}

.location-identifier {
  font-size: 0.75rem;
  color: #6b7280;
  background-color: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.location-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 1rem 0;
}

/* 即座に呼び出すダイアログ専用スタイル */
.quick-call-content {
  text-align: center;
}

.route-display {
  margin-bottom: 1.5rem;
}

.route-point {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
}

.route-icon {
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

.route-text {
  font-weight: 500;
  color: #111827;
}

.route-arrow {
  font-size: 1.5rem;
  color: #6b7280;
  margin: 0.5rem 0;
}

.confirmation-message {
  color: #374151;
  margin: 0;
  font-size: 1rem;
}