/**
 * BookingCast プラグイン - フロントエンドスタイル
 *
 * @package BookingCast
 */

/* 料金表示セクションのスタイル */
.booking-cast-price-section {
  margin-top: 28px;
  margin-bottom: 28px;
  padding: 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.booking-cast-price-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
}

.booking-cast-price-info {
  font-size: 16px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.booking-cast-rank {
  margin-bottom: 16px;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(45deg, #ffd700, #ffed4a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.star-rank {
  color: #ffc107;
  font-weight: bold;
  margin-left: 8px;
  font-size: 1.3em;
  filter: drop-shadow(0 1px 2px rgba(255,193,7,0.5));
  animation: sparkle 2s infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.booking-cast-total-price {
  margin: 24px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px 24px;
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.price-title {
  margin-right: 12px;
  font-weight: 500;
  opacity: 0.9;
}

.price-value {
  font-weight: 800;
  color: #fff;
  font-size: 32px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  animation: glow 3s infinite;
}

@keyframes glow {
  0%, 100% { text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
  50% { text-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 0 20px rgba(255,255,255,0.5); }
}

.booking-cast-price-breakdown {
  font-size: 16px;
  color: #495057;
  text-align: center;
  margin: 16px auto 8px;
  background: rgba(255,255,255,0.7);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  backdrop-filter: blur(5px);
}

.booking-cast-free-notice {
  color: #28a745;
  font-weight: 700;
  font-size: 26px;
  text-align: center;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  padding: 16px;
  border-radius: 12px;
  border: 2px solid #b8dacc;
  animation: bounce 2s infinite;
}

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

.booking-cast-price-notice {
  color: #6c757d;
  font-style: italic;
  margin-top: 12px;
  font-size: 14px;
}

/* クーポン関連のスタイル */
.applied-coupon-info {
  background: linear-gradient(135deg, #e8f4ff 0%, #cce7ff 100%);
  border: 2px dashed #66b3ff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(102, 179, 255, 0.2);
}

.applied-coupon-info::before {
  content: '🎫';
  margin-right: 8px;
  font-size: 16px;
}

/* 浮動価格表示のスタイル */
.booking-cast-floating-price {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 16px 20px;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.booking-cast-floating-price.show {
  transform: translateY(0);
}

.floating-price-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

.floating-price-content {
  flex: 1;
  min-height: 60px;
  display: flex;
  align-items: center;
}

/* 選択前の状態 */
.floating-price-selection {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selection-message {
  color: #666;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  border: 2px dashed #dee2e6;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-width: 240px;
}

.selection-message::before {
  content: '📋';
  margin-right: 8px;
  font-size: 18px;
}

/* 価格表示 */
.floating-price-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
}

.floating-price-left {
  flex: 1;
  min-width: 0;
}

.floating-price-name {
  font-size: 16px;
  color: #333;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-price-name::before {
  content: '👑';
  margin-right: 8px;
  font-size: 14px;
  flex-shrink: 0;
}

.floating-price-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.total-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.total-amount {
  font-size: 24px;
  font-weight: 800;
  color: #e74c3c;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.floating-price-right {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.floating-price-breakdown {
  font-size: 12px;
  color: #555;
  background: rgba(52, 152, 219, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(52, 152, 219, 0.15);
  line-height: 1.3;
  max-width: 280px;
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.floating-price-button {
  background: linear-gradient(145deg, #3498db 0%, #2980b9 100%);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 160px;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.floating-price-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.floating-price-button:hover:not(.disabled) {
  background: linear-gradient(145deg, #2980b9 0%, #1f4e79 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.floating-price-button:hover:not(.disabled)::before {
  left: 100%;
}

.floating-price-button:active:not(.disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.floating-price-button.disabled {
  background: linear-gradient(145deg, #bdc3c7 0%, #95a5a6 100%);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.floating-price-button.disabled::before {
  display: none;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .booking-cast-price-section {
    padding: 16px;
    margin: 16px 0;
  }

  .booking-cast-price {
    font-size: 18px;
  }

  .total-price {
    font-size: 20px;
  }

  .booking-cast-floating-price {
    padding: 12px 16px;
  }

  .floating-price-inner {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .floating-price-content {
    min-height: auto;
  }

  .floating-price-main {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .floating-price-left,
  .floating-price-right {
    flex: none;
    width: 100%;
  }

  .floating-price-right {
    text-align: center;
  }

  .floating-price-name {
    justify-content: center;
    font-size: 15px;
  }

  .floating-price-total {
    justify-content: center;
    font-size: 18px;
  }

  .total-amount {
    font-size: 20px;
  }

  .floating-price-breakdown {
    max-width: 100%;
    margin: 0 auto;
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }

  .floating-price-button {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    min-width: unset;
  }

  .selection-message {
    font-size: 14px;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .booking-cast-floating-price {
    padding: 10px 12px;
  }

  .floating-price-inner {
    gap: 10px;
  }

  .floating-price-main {
    gap: 8px;
  }

  .floating-price-name {
    font-size: 14px;
  }

  .floating-price-total {
    font-size: 16px;
  }

  .total-amount {
    font-size: 18px;
  }

  .floating-price-breakdown {
    font-size: 11px;
    padding: 6px 8px;
  }

  .floating-price-button {
    padding: 12px 16px;
    font-size: 14px;
  }

  .selection-message {
    font-size: 13px;
    padding: 8px 12px;
  }
}
