/* ========================================
   Product Additional Information - Vertical List Design
   Version: 1.2.3 - Optimized for 440px width
   ======================================== */

/* 강력한 CSS 리셋 */
.custom-attributes-container,
.custom-attributes-container * {
  box-sizing: border-box !important;
}

.custom-attributes-container .core-info-item,
.custom-attributes-container .core-info-icon,
.custom-attributes-container .core-info-text,
.custom-attributes-container .core-info-label,
.custom-attributes-container .core-info-value {
  float: none !important;
  clear: none !important;
  position: relative !important;
}

/* 메인 컨테이너 - 차분한 디자인 */
.custom-attributes-container {
  margin: 24px 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 440px;
}

/* 핵심 정보 표시 영역 - 단순한 배경 */
.core-info-display {
  background: #ffffff;
  border-radius: 8px 8px 0 0;
  padding: 0;
  margin: 0;
}

/* 개별 정보 항목 - 차분한 스타일 (강화된 선택자) */
.custom-attributes-container .core-info-item {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  transition: all 0.2s ease;
  position: relative;
  width: 100% !important;
  box-sizing: border-box !important;
}

.custom-attributes-container .core-info-item > * {
  flex-shrink: 0 !important;
}

.custom-attributes-container .core-info-item:hover {
  background: #f8fafc;
  padding-left: 20px;
}

.custom-attributes-container .core-info-item:last-child {
  border-bottom: none;
}

.custom-attributes-container .core-info-item:first-child {
  border-radius: 8px 8px 0 0;
}

/* 아이콘 스타일 - 차분한 색상 (강화된 선택자) */
.custom-attributes-container .core-info-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 14px;
  color: #ffffff;
  box-shadow: none;
  flex-shrink: 0;
}

/* 텍스트 영역 - 한 줄 표시 (강화된 선택자) */
.custom-attributes-container .core-info-text {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* 라벨 스타일 - 한 줄용 (강화된 선택자) */
.custom-attributes-container .core-info-label {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
  display: inline !important;
}

/* 값 스타일 - 한 줄용 (강화된 선택자) */
.custom-attributes-container .core-info-value {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
  word-break: break-word;
  display: inline !important;
}

/* 더보기/닫기 버튼 - 작고 차분하게 */
.toggle-attributes-btn {
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  background: #f1f5f9;
  border: none;
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toggle-attributes-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.toggle-attributes-btn:hover::before {
  left: 100%;
}

.toggle-attributes-btn:hover {
  background: #e2e8f0;
  color: #475569;
  transform: translateY(-1px);
}

.toggle-attributes-btn:active {
  transform: translateY(0);
}

/* 전체 정보 테이블 영역 */
.full-attributes-table {
  display: none;
  margin: 0;
  padding: 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  animation: slideDown 0.3s ease-out;
}

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

/* WooCommerce 기본 테이블 스타일 개선 */
.full-attributes-table table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.full-attributes-table th,
.full-attributes-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.full-attributes-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.full-attributes-table td {
  color: #334155;
  font-size: 14px;
}

.full-attributes-table tr:last-child th,
.full-attributes-table tr:last-child td {
  border-bottom: none;
}

/* 반응형 디자인 - 440px 기준 */
@media (max-width: 480px) {
  .custom-attributes-container {
    margin: 16px 0;
    border-radius: 6px;
    max-width: 100%;
  }

  .core-info-item {
    padding: 10px 12px;
  }

  .core-info-item:hover {
    padding-left: 16px;
  }

  .core-info-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    font-size: 12px;
  }

  .core-info-label {
    font-size: 11px;
  }

  .core-info-value {
    font-size: 13px;
  }

  .toggle-attributes-btn {
    padding: 8px 12px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    min-height: 30px; /* 버튼의 최소 높이를 지정하여 레이아웃 깨짐 방지 */
  }

  .full-attributes-table {
    padding: 12px;
  }
}

/* 접근성 개선 */
.toggle-attributes-btn:focus {
  outline: 2px solid #64748b;
  outline-offset: 2px;
}

/* 다크 모드 비활성화 - 라이트 모드 고정 */
/* 다크 모드 설정이 있어도 항상 라이트 모드로 표시 */

/* 세로 리스트용 추가 애니메이션 - 차분한 색상 */
.core-info-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #64748b;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.core-info-item:hover::before {
  transform: scaleY(1);
}
