/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Dialog コンポーネント - 高齢者向けUI */

.dialog-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
}

.dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  pointer-events: all;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.dialog--closing {
  opacity: 0;
  transform: scale(0.9);
}

.dialog__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dialog__content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.dialog__header {
  padding: 32px 32px 24px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.dialog__icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.dialog__title {
  font-size: 24px;
  font-weight: bold;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}

.dialog__body {
  padding: 24px 32px;
}

.dialog__message {
  font-size: 18px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
  text-align: center;
}

.dialog__footer {
  padding: 24px 32px 32px;
  display: flex;
  gap: 16px;
  justify-content: center;
}

.dialog__button {
  border: none;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  padding: 20px 32px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  min-height: 72px;
  outline: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dialog__button:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

.dialog__button--primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.dialog__button--primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.dialog__button--primary:active {
  transform: translateY(0);
}

.dialog__button--secondary {
  background: #f8fafc;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.dialog__button--secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.dialog__button--secondary:active {
  transform: translateY(0);
}

/* エラーダイアログのスタイル */
.dialog--error .dialog__icon {
  color: #ef4444;
}

.dialog--error .dialog__title {
  color: #dc2626;
}

/* 情報ダイアログのスタイル */
.dialog--info .dialog__icon {
  color: #3b82f6;
}

.dialog--info .dialog__title {
  color: #1d4ed8;
}

/* 確認ダイアログのスタイル */
.dialog--confirm .dialog__icon {
  color: #f59e0b;
}

.dialog--confirm .dialog__title {
  color: #d97706;
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
  .dialog__overlay {
    padding: 16px;
  }
  
  .dialog__content {
    max-width: none;
    margin: 0;
  }
  
  .dialog__header {
    padding: 24px 24px 20px;
  }
  
  .dialog__icon {
    font-size: 40px;
    margin-bottom: 12px;
  }
  
  .dialog__title {
    font-size: 20px;
  }
  
  .dialog__body {
    padding: 20px 24px;
  }
  
  .dialog__message {
    font-size: 16px;
  }
  
  .dialog__footer {
    padding: 20px 24px 24px;
    flex-direction: column;
  }
  
  .dialog__button {
    font-size: 18px;
    padding: 18px 24px;
    min-width: auto;
    min-height: 72px;
    width: 100%;
  }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .dialog {
    transition: none;
  }
}

/* 緊急連絡ダイアログのスタイル */
.dialog--emergency .dialog__icon {
  color: #ef4444;
}

.dialog--emergency .dialog__title {
  color: #dc2626;
}

/* カスタムコンテンツのスタイル */
.dialog__content-custom {
  width: 100%;
}

.emergency-contact-content {
  text-align: center;
}

.emergency-message {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #374151;
  text-align: center;
}

.emergency-contact-info {
  background-color: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.contact-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 12px;
  text-align: center;
}

.contact-number-display {
  font-size: 32px;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 8px;
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: 1px;
}

.facility-name {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

/* 緊急連絡ダイアログ専用のボタンスタイル */
.dialog--emergency .dialog__button--primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  font-size: 18px;
  padding: 16px 24px;
  border: 2px solid #3b82f6;
}

.dialog--emergency .dialog__button--primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.dialog--emergency .dialog__footer {
  gap: 12px;
  flex-direction: column;
}

/* レスポンシブ対応 */
@media (min-width: 480px) {
  .dialog--emergency .dialog__footer {
    flex-direction: row;
  }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .dialog__content {
    border: 2px solid #000;
  }
  
  .dialog__button--primary {
    background: #000;
    color: #fff;
  }
  
  .dialog__button--secondary {
    background: #fff;
    color: #000;
    border: 2px solid #000;
  }
  
  .emergency-contact-info {
    background: #fff;
    border: 2px solid #000;
  }
}