/* ==================== ストアテーブルコンポーネント ==================== */

/* 基本テーブルスタイル */
.store-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: var(--spacing-md);
  background-color: #ffffff;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}

.store-table thead {
  background-color: #e8e8e8;
  color: #3e3e3e;
  position: sticky;
  top: 0;
  z-index: var(--z-index-sticky);
}

.store-table thead th {
  padding: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.store-table thead th:last-child {
  border-right: none;
}

.store-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-speed-fast) var(--transition-easing);
}

.store-table tbody tr:nth-child(even) {
  background-color: rgba(26, 77, 122, 0.02);
}

.store-table tbody tr:hover {
  background: linear-gradient(to right,
    rgba(199, 102, 26, 0.03),
    rgba(199, 102, 26, 0.08),
    rgba(199, 102, 26, 0.03)
  );
  transform: scale(1.005);
  box-shadow: var(--shadow-sm);
}

.store-table tbody tr.clickable-row {
  cursor: pointer;
}

.store-table tbody tr.clickable-row:hover {
  background-color: rgba(199, 102, 26, 0.1);
}

.store-table tbody tr:last-child {
  border-bottom: none;
}

.store-table tbody td {
  padding: 18px 24px;
  color: #3e3e3e;
  font-size: 14px;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid var(--color-gray-100);
}

.store-table tbody td:last-child {
  border-right: none;
}

.table-type.pacer {
  color: #e89a5f;
}

.table-type.signage {
  color: #5a7a9e;
}

.table-type.cart {
  color: #9b59b6;
}

/* ==================== マトリックステーブル ==================== */
.store-table-matrix thead th {
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

.store-table-matrix thead th:last-child {
  border-right: none;
}

.store-table-matrix .device-type-header {
  text-align: center;
  min-width: 140px;
  font-weight: 700;
  font-size: 15px;
  padding: 18px 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.store-table-matrix tbody td {
  text-align: center;
  vertical-align: middle;
  padding: 20px 16px;
  border-right: 1px solid #f0f0f0;
}

.store-table-matrix tbody td:last-child {
  border-right: none;
}

.store-table-matrix tbody td.clickable-cell {
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.store-table-matrix tbody td.clickable-cell:hover {
  background: linear-gradient(135deg, rgba(199, 102, 26, 0.08) 0%, rgba(199, 102, 26, 0.12) 100%);
  box-shadow: inset 0 0 0 2px rgba(199, 102, 26, 0.4);
  transform: scale(1.02);
}

.store-table-matrix tbody td.clickable-cell:active {
  transform: scale(0.98);
}

.store-name-cell {
  font-weight: 600;
  color: var(--color-text-dark);
}

/* ==================== レスポンシブデザイン ==================== */

@media (max-width: 1024px) {
  .store-table {
    font-size: var(--font-size-sm);
  }

  .store-table thead th,
  .store-table tbody td {
    padding: var(--spacing-sm);
  }
}

@media (max-width: 768px) {
  .store-table {
    font-size: 0.8em;
  }

  .store-table thead th,
  .store-table tbody td {
    padding: 6px;
  }

  .store-table {
    min-width: 600px;
  }
}

/* タッチデバイス専用のホバー防止 */
@media (hover: none) {
  .store-table tbody tr:hover {
    transform: none;
  }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .store-table {
    border: 2px solid currentColor;
  }
}
