/**
 * Mikotan - カスタムスタイル
 * 
 * Apple系サービスに親和性のあるクリーンでモダンなデザイン
 * 信頼感・安心感・個人情報保護を重視
 */

/* ================================
   Base Styles
   ================================ */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================
   Selection
   ================================ */

::selection {
  background-color: rgba(0, 122, 255, 0.2);
  color: inherit;
}

/* ================================
   Focus States (Accessibility)
   ================================ */

*:focus-visible {
  outline: 2px solid #007AFF;
  outline-offset: 2px;
}

/* ================================
   Custom Scrollbar
   ================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ================================
   Form Input Styles
   ================================ */

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
textarea,
select {
  font-size: 16px; /* Prevents zoom on iOS */
}

/* Date picker styling */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Checkbox custom styling */
input[type="checkbox"] {
  accent-color: #007AFF;
}

input[type="checkbox"]:focus {
  outline: 2px solid rgba(0, 122, 255, 0.3);
  outline-offset: 2px;
}

/* Radio button custom styling */
input[type="radio"] {
  accent-color: #007AFF;
}

/* ================================
   Button Styles
   ================================ */

button {
  transition: all 0.2s ease;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ================================
   Link Styles
   ================================ */

a {
  transition: color 0.2s ease;
}

/* ================================
   Card Hover Effects
   ================================ */

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ================================
   Loading Spinner
   ================================ */

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ================================
   Fade In Animation
   ================================ */

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

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* ================================
   Timeline Styles
   ================================ */

.timeline-line {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #007AFF 0%, #e5e7eb 50%);
}

/* ================================
   Status Badge Animation
   ================================ */

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.pulse-badge::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: pulse-ring 1.5s ease-out infinite;
}

/* ================================
   Mobile Menu Animation
   ================================ */

#mobileMenu {
  transition: all 0.3s ease;
}

#mobileMenu.hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

#mobileMenu:not(.hidden) {
  opacity: 1;
  max-height: 500px;
}

/* ================================
   FAQ Accordion
   ================================ */

.faq-answer {
  transition: all 0.3s ease;
}

.faq-question i {
  transition: transform 0.3s ease;
}

/* ================================
   Form Validation Styles
   ================================ */

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #22c55e;
}

/* ================================
   Toast Notification
   ================================ */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: slideInUp 0.3s ease;
}

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

/* ================================
   Responsive Utilities
   ================================ */

/* Hide scrollbar but keep functionality */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ================================
   Print Styles
   ================================ */

@media print {
  header,
  footer,
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  main {
    padding: 0 !important;
  }
}

/* ================================
   Reduced Motion
   ================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================
   Dark Mode Support (Optional)
   ================================ */

@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  body {
    background-color: #1D1D1F;
    color: #F5F5F7;
  }
  */
}
