/* ========================================
   料金比較グラフ（縦棒グラフ）
======================================== */

/* Chart.jsツールチップを最前面に */
#costIncreaseChart {
  position: relative !important;
  z-index: 1 !important;
}

/* Chart.jsツールチップの親要素 */
.chartjs-render-monitor {
  position: relative !important;
  z-index: 1 !important;
}

/* ツールチップ要素を最前面に */
div[role="tooltip"] {
  z-index: 99999 !important;
  position: absolute !important;
}

.price-comparison-note {
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 20px;
  font-weight: 500;
}

.price-comparison-chart-vertical {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-evenly;
  gap: 15px;
  padding: 10px 20px 15px 20px;
  max-width: 100%;
  margin: 0 auto;
  height: 380px;
  position: relative;
  box-sizing: border-box;
}

.price-chart-top-line {
  position: absolute;
  bottom: 364px;
  left: 20px;
  right: 20px;
  height: 0;
  border-top: 2px dashed #888888;
  z-index: 5;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  display: block;
}

.price-chart-bottom-line {
  display: none;
}

.price-chart-right-line {
  display: none;
}

.price-column-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 0;
  position: relative;
  min-width: 0;
  align-self: flex-end;
  padding-bottom: 0;
}

.price-column-item.price-column-highlight {
  position: relative;
}

.price-column-item.price-column-highlight .price-column-container {
  position: relative;
}

.price-column-highlight .price-column-container {
  position: relative;
}

/* MALINEアイテムの調整 */
.price-column-item.price-column-highlight {
  padding-top: 0;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.price-column-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-top: 10px;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-column-label-maline {
  font-size: 1rem;
  font-weight: 800;
  color: #4FA5E6;
  text-align: center;
  margin-top: 10px;
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 1.8rem;
}

.price-maline-logo {
  height: 1.2rem;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: bottom;
}

.price-badge-best-top {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translate(-50%, -10px);
  background: white;
  border: 3px solid #FFD700;
  color: #FFD700;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  white-space: nowrap;
  z-index: 9999;
}

.price-badge-amount {
  font-size: 1.5rem;
  font-weight: 900;
  display: inline-block;
}

.price-badge-tax {
  font-size: 0.6rem;
  font-weight: 600;
}

.price-badge-discount {
  font-size: 0.8rem;
  font-weight: 800;
  color: #FFA500;
  text-shadow: none;
}

.price-column-container {
  width: 140px;
  height: 310px;
  position: relative;
  background: transparent;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  overflow: visible;
}

.price-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 3px;
  gap: 2px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.price-column-gray {
  background: linear-gradient(180deg, #BDBDBD 0%, #9E9E9E 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.price-column-maline {
  background: linear-gradient(180deg, 
    #87CEEB 0%, #6BB6EA 25%, #5DADE2 50%, #6BB6EA 75%, #87CEEB 100%
  ) !important;
  box-shadow: 0 4px 16px rgba(79, 165, 230, 0.3) !important;
  animation: price-pulse 2s ease-in-out infinite;
}

@keyframes price-pulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(79, 165, 230, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(79, 165, 230, 0.5);
  }
}

.price-value-vertical {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  text-align: center;
  background: transparent !important;
  padding: 0 !important;
}

.price-value-tax-vertical {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  text-align: center;
  background: transparent !important;
  padding: 0 !important;
}

.price-value-maline-vertical {
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  text-align: center;
  background: transparent !important;
  padding: 0 !important;
  line-height: 1.2;
}

.price-value-tax-maline-vertical {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  text-align: center;
  background: transparent !important;
  padding: 0 !important;
  line-height: 1.2;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .price-comparison-chart-vertical {
    height: 350px;
  }
  
  .price-column-container {
    height: 280px;
  }
  
  .price-chart-top-line {
    bottom: 334px;
  }
}

@media (max-width: 768px) {
  .price-comparison-chart-vertical {
    gap: 10px;
    padding: 10px 12px 15px;
    min-height: 300px;
    overflow-x: hidden;
  }
  
  .price-column-container {
    max-width: 85px;
    width: 85px;
    height: 250px;
  }
  
  .price-column-label,
  .price-column-label-maline {
    font-size: 0.75rem;
  }
  
  .price-badge-best-top {
    font-size: 0.5rem;
    padding: 4px 7px;
    bottom: 12%;
    transform: translate(-50%, -10px) scale(0.85);
    white-space: normal;
    max-width: 75px;
    line-height: 1.25;
    border-width: 2px;
  }
  
  .price-badge-amount {
    font-size: 1rem;
  }
  
  .price-value-vertical,
  .price-value-maline-vertical {
    font-size: 0.8rem;
  }
  
  .price-value-tax-vertical,
  .price-value-tax-maline-vertical {
    font-size: 0.58rem;
  }
  
  .price-chart-top-line {
    bottom: calc(250px + 15px - 2px);
    left: 12px;
    right: 12px;
  }
  
  .price-column {
    padding-top: 3px;
  }
}

@media (max-width: 480px) {
  .price-comparison-chart-vertical {
    gap: 6px;
    padding: 5px 10px 80px;
    height: auto;
    min-height: 360px;
    overflow-x: hidden;
    overflow-y: visible;
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
  }
  
  .price-column-container {
    max-width: 60px;
    width: 60px;
    height: 220px;
  }
  
  .price-column-label,
  .price-column-label-maline {
    font-size: 0.65rem;
    margin-top: 8px;
    min-height: 2rem;
  }
  
  .price-badge-best-top {
    font-size: 0.5rem;
    padding: 5px 4px;
    bottom: 12%;
    transform: translate(-50%, -8px);
    white-space: normal;
    width: 60px;
    max-width: 60px;
    line-height: 1.2;
    border-width: 2px;
    box-sizing: border-box;
  }
  
  .price-badge-amount {
    font-size: 1.1rem;
  }
  
  .price-badge-tax {
    font-size: 0.45rem;
  }
  
  .price-badge-discount {
    font-size: 0.6rem;
  }
  
  .price-value-vertical,
  .price-value-maline-vertical {
    font-size: 0.65rem;
  }
  
  .price-value-tax-vertical,
  .price-value-tax-maline-vertical {
    font-size: 0.5rem;
  }
  
  .price-column {
    padding-top: 3px;
  }
  
  .price-maline-logo {
    height: 1.2rem;
  }
  
  .price-chart-top-line {
    bottom: calc(220px + 80px + 40px);
    left: 10px;
    right: 10px;
  }
}
