/* PWA通知システム スタイル */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2196F3;
  --primary-dark: #1976D2;
  --secondary-color: #FF9800;
  --success-color: #4CAF50;
  --error-color: #F44336;
  --warning-color: #FF9800;
  --background-color: #f5f5f5;
  --surface-color: #ffffff;
  --text-primary: #212121;
  --text-secondary: #757575;
  --border-color: #e0e0e0;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* ヘッダー */
header {
  text-align: center;
  padding: 30px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

header .subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

/* セクション */
section {
  margin-bottom: 30px;
}

.card {
  background: var(--surface-color);
  border-radius: 10px;
  padding: 25px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.card-header h2 {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ステータスカード */
.status-card {
  display: grid;
  gap: 15px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--background-color);
  border-radius: 5px;
}

.status-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.status-value {
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-value.success {
  background-color: var(--success-color);
  color: white;
}

.status-value.error {
  background-color: var(--error-color);
  color: white;
}

.status-value.info {
  background-color: var(--primary-color);
  color: white;
}

/* 入力グループ */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-primary);
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.input-group small {
  display: block;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ボタン */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: var(--text-secondary);
  color: white;
}

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

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
  background-color: var(--error-color);
  color: white;
}

.btn-small:hover {
  background-color: #D32F2F;
}

/* メッセージ */
.message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 5px;
  font-size: 0.9rem;
}

.message.success {
  background-color: #E8F5E9;
  color: #2E7D32;
  border: 1px solid var(--success-color);
}

.message.error {
  background-color: #FFEBEE;
  color: #C62828;
  border: 1px solid var(--error-color);
}

.message.info {
  background-color: #E3F2FD;
  color: #1565C0;
  border: 1px solid var(--primary-color);
}

/* 通知履歴 */
.notification-list {
  max-height: 500px;
  overflow-y: auto;
}

.empty-message {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-style: italic;
}

.notification-item {
  padding: 15px;
  margin-bottom: 10px;
  background: var(--background-color);
  border-radius: 5px;
  border-left: 4px solid var(--primary-color);
  transition: transform 0.2s ease;
}

.notification-item:hover {
  transform: translateX(5px);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}

.notification-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
  flex: 1;
}

.notification-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.notification-body {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 通知削除ボタン */
.btn-delete-notification {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  opacity: 0.6;
}

.btn-delete-notification:hover {
  background: var(--error-color);
  color: white;
  opacity: 1;
  transform: scale(1.1);
}

.btn-delete-notification:active {
  transform: scale(0.95);
}

/* 通知アイテムにホバー時に削除ボタンを強調 */
.notification-item:hover .btn-delete-notification {
  opacity: 1;
}

/* トースト */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* フッター */
footer {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 15px;
  }

  .notification-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .notification-time {
    margin-top: 5px;
  }
}

/* スクロールバー */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-primary);
}
