/**
 * action-buttons.css
 * チェックイン・行きたいボタンコンポーネント
 * 仕様書: docs/place-detail-specs/04-action-promotion.md
 */

/* チェックイン・行きたいセクション */
.action-section {
  padding: 20px 0;
  background: white;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
}

.action-section__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* アクションボタングループ */
.action-buttons-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 576px) {
  .action-buttons-group {
    flex-direction: column;
    gap: 8px;
  }
}

/* チェックインボタン */
.check-in-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient-primary, linear-gradient(135deg, #ff6b35 0%, #f7c331 100%));
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-xl, 24px);
  cursor: pointer;
  transition: all var(--transition-bounce, 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55));
  box-shadow:
    0 4px 20px rgba(255, 107, 53, 0.3),
    0 0 0 0 rgba(255, 107, 53, 0.5);
  flex: 1;
  animation: subtle-pulse 3s ease-in-out infinite;
}

.check-in-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 8px 32px rgba(255, 107, 53, 0.5),
    0 0 0 4px rgba(255, 107, 53, 0.1);
}

.check-in-btn:active:not(:disabled) {
  transform: translateY(0);
}

.check-in-btn:disabled {
  background: #e0e0e0;
  color: #9e9e9e;
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
}

.check-in-btn--checked {
  background: var(--gradient-success, linear-gradient(135deg, #4caf50 0%, #8bc34a 100%));
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  animation: none;
}

.check-in-btn--checked:hover {
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

.check-in-btn__icon {
  font-size: 20px;
  transition: transform var(--transition-bounce, 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55));
}

.check-in-btn:hover:not(:disabled) .check-in-btn__icon {
  animation: bounce 0.6s ease-in-out;
}

/* 行きたいボタン */
.want-to-go-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  color: #ff6b35;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #ff6b35;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.want-to-go-btn:hover:not(:disabled) {
  background: #fff5f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.want-to-go-btn:active:not(:disabled) {
  transform: translateY(0);
}

.want-to-go-btn:disabled {
  border-color: #e0e0e0;
  color: #9e9e9e;
  cursor: not-allowed;
}

.want-to-go-btn--active {
  background: #ff6b35;
  color: white;
}

.want-to-go-btn--active:hover:not(:disabled) {
  background: #e55a2b;
}

.want-to-go-btn__icon {
  font-size: 18px;
}

.want-to-go-btn__count {
  font-size: 14px;
  opacity: 0.8;
}

/* チェックイン情報 */
.check-in-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text-light, #757575);
}

.check-in-info__icon {
  font-size: 18px;
  color: #ff6b35;
}

.check-in-info__count {
  font-weight: 600;
  color: var(--color-text, #212121);
}

/* チェックイン完了状態 */
.check-in-complete {
  padding: 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 12px;
  margin-bottom: 16px;
}

.check-in-complete__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.check-in-complete__icon {
  font-size: 24px;
  color: #4caf50;
}

.check-in-complete__title {
  font-size: 16px;
  font-weight: 600;
  color: #2e7d32;
  margin: 0;
}

.check-in-complete__date {
  font-size: 13px;
  color: #558b2f;
  margin-left: auto;
}

.check-in-complete__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.check-in-complete__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  color: #4caf50;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #4caf50;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.check-in-complete__action-btn:hover {
  background: #e8f5e9;
}

/* 獲得ポイント表示 */
.points-earned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 16px;
  margin-left: 8px;
}

.points-earned__icon {
  font-size: 14px;
}

/* 行きたい追加モーダル */
.want-to-go-modal {
  padding: 20px;
}

.want-to-go-modal__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text, #212121);
  margin: 0 0 16px 0;
}

.want-to-go-modal__title-icon {
  color: #ff6b35;
}

.want-to-go-modal__question {
  font-size: 15px;
  color: var(--color-text-light, #757575);
  margin-bottom: 12px;
}

.want-to-go-modal__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.want-to-go-modal__option {
  padding: 10px 16px;
  background: #f5f5f5;
  color: var(--color-text, #212121);
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.want-to-go-modal__option:hover {
  background: #e0e0e0;
}

.want-to-go-modal__option--active {
  background: #ff6b35;
  color: white;
}

.want-to-go-modal__reminder-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: white;
  color: #ff6b35;
  font-size: 14px;
  font-weight: 500;
  border: 1px dashed #ff6b35;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.want-to-go-modal__reminder-btn:hover {
  background: #fff5f0;
}

/* 訪問履歴セクション */
.visit-history {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-top: 16px;
}

.visit-history__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.visit-history__icon {
  font-size: 18px;
  color: #ff6b35;
}

.visit-history__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text, #212121);
  margin: 0;
}

.visit-history__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.visit-history__stat {
  text-align: center;
  padding: 8px;
  background: white;
  border-radius: 8px;
}

.visit-history__stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #ff6b35;
}

.visit-history__stat-label {
  font-size: 12px;
  color: var(--color-text-light, #757575);
}

.visit-history__list {
  max-height: 200px;
  overflow-y: auto;
}

.visit-history__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
}

.visit-history__item:last-child {
  margin-bottom: 0;
}

.visit-history__item-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text, #212121);
}

.visit-history__item-icons {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.visit-history__item-icon {
  font-size: 14px;
  color: var(--color-text-light, #757575);
}

/* レスポンシブ */
@media (max-width: 576px) {
  .check-in-btn,
  .want-to-go-btn {
    padding: 14px 20px;
    font-size: 15px;
  }

  .visit-history__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .visit-history__stat-value {
    font-size: 16px;
  }
}

/* ==========================================================================
   ダークモード対応
   ========================================================================== */

[data-theme='dark'] .action-section {
  background: var(--color-surface, #1e1e1e);
  border-bottom-color: var(--color-border, #333333);
}

[data-theme='dark'] .check-in-btn:disabled {
  background: var(--color-border, #333333);
  color: var(--color-text-secondary, #757575);
}

[data-theme='dark'] .want-to-go-btn {
  background: var(--color-surface, #1e1e1e);
  color: #ff6b35;
  border-color: #ff6b35;
}

[data-theme='dark'] .want-to-go-btn:hover:not(:disabled) {
  background: rgba(255, 107, 53, 0.1);
}

[data-theme='dark'] .want-to-go-btn:disabled {
  border-color: var(--color-border, #333333);
  color: var(--color-text-secondary, #757575);
}

[data-theme='dark'] .want-to-go-btn--active {
  background: #ff6b35;
  color: white;
}

[data-theme='dark'] .check-in-info {
  background: var(--color-surface-light, #2c2c2c);
  color: var(--color-text-secondary, #b3b3b3);
}

[data-theme='dark'] .check-in-info__count {
  color: var(--color-text, #ffffff);
}

[data-theme='dark'] .check-in-complete {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.1) 100%);
}

[data-theme='dark'] .check-in-complete__icon {
  color: #66bb6a;
}

[data-theme='dark'] .check-in-complete__title {
  color: #81c784;
}

[data-theme='dark'] .check-in-complete__date {
  color: #a5d6a7;
}

[data-theme='dark'] .check-in-complete__action-btn {
  background: var(--color-surface, #1e1e1e);
  color: #66bb6a;
  border-color: #66bb6a;
}

[data-theme='dark'] .check-in-complete__action-btn:hover {
  background: rgba(76, 175, 80, 0.1);
}

[data-theme='dark'] .want-to-go-modal__option {
  background: var(--color-surface-light, #2c2c2c);
  color: var(--color-text, #ffffff);
}

[data-theme='dark'] .want-to-go-modal__option:hover {
  background: var(--color-border, #333333);
}

[data-theme='dark'] .want-to-go-modal__option--active {
  background: #ff6b35;
  color: white;
}

[data-theme='dark'] .want-to-go-modal__reminder-btn {
  background: var(--color-surface, #1e1e1e);
  color: #ff6b35;
  border-color: #ff6b35;
}

[data-theme='dark'] .want-to-go-modal__reminder-btn:hover {
  background: rgba(255, 107, 53, 0.1);
}

[data-theme='dark'] .visit-history {
  background: var(--color-surface-light, #2c2c2c);
}

[data-theme='dark'] .visit-history__title {
  color: var(--color-text, #ffffff);
}

[data-theme='dark'] .visit-history__stat {
  background: var(--color-surface, #1e1e1e);
}

[data-theme='dark'] .visit-history__item {
  background: var(--color-surface, #1e1e1e);
}

[data-theme='dark'] .visit-history__item-date {
  color: var(--color-text, #ffffff);
}

/* ==========================================================================
   チェックインモーダル
   ========================================================================== */

.checkin-modal {
  background: white;
}

.checkin-modal__header {
  border-bottom: 1px solid #e9ecef;
}

.checkin-modal__header h2 {
  color: var(--color-text, #212121);
}

.checkin-modal__close {
  color: var(--color-text, #212121);
}

.checkin-modal .form-label {
  color: var(--color-text, #212121);
}

.checkin-modal__input {
  border: 1px solid #ced4da;
}

.checkin-modal__hint {
  color: #6c757d;
}

.checkin-modal__points-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.checkin-modal__footer {
  border-top: 1px solid #e9ecef;
}

.checkin-modal__btn-cancel {
  background: #6c757d;
  color: white;
}

.checkin-modal__btn-cancel:hover {
  background: #5a6268;
}

.checkin-modal__btn-submit {
  background: #ff6b35;
  color: white;
}

.checkin-modal__btn-submit:hover:not(:disabled) {
  background: #e55a2b;
}

/* チェックインモーダル ダークモード */
[data-theme='dark'] .checkin-modal {
  background: var(--color-surface, #1e1e1e);
}

[data-theme='dark'] .checkin-modal__header {
  border-bottom-color: var(--color-border, #333333);
}

[data-theme='dark'] .checkin-modal__header h2 {
  color: var(--color-text, #ffffff);
}

[data-theme='dark'] .checkin-modal__close {
  color: var(--color-text-secondary, #b3b3b3);
}

[data-theme='dark'] .checkin-modal .form-label {
  color: var(--color-text, #ffffff);
}

[data-theme='dark'] .checkin-modal__input {
  background: var(--color-surface-light, #2c2c2c);
  border-color: var(--color-border, #333333);
  color: var(--color-text, #ffffff);
}

[data-theme='dark'] .checkin-modal__hint {
  color: var(--color-text-secondary, #b3b3b3);
}

[data-theme='dark'] .checkin-modal__points-info {
  background: rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
  color: #90caf9;
}

[data-theme='dark'] .checkin-modal__footer {
  border-top-color: var(--color-border, #333333);
}

[data-theme='dark'] .checkin-modal__btn-cancel {
  background: var(--color-surface-light, #2c2c2c);
  color: var(--color-text-secondary, #b3b3b3);
}

[data-theme='dark'] .checkin-modal__btn-cancel:hover {
  background: var(--color-border, #333333);
}

/* チェックインボタン アニメーション */
@keyframes subtle-pulse {
  0%,
  100% {
    box-shadow:
      0 4px 20px rgba(255, 107, 53, 0.3),
      0 0 0 0 rgba(255, 107, 53, 0.5);
  }
  50% {
    box-shadow:
      0 4px 20px rgba(255, 107, 53, 0.4),
      0 0 0 8px rgba(255, 107, 53, 0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-3deg);
  }
  75% {
    transform: rotate(3deg);
  }
}
