/* css/product-notes.css */

/* ===============================
   Base / Reset
================================ */
.product-notes,
.product-notes * {
  box-sizing: border-box;
  font-family: inherit;
}

.product-notes {
  margin-top: 1.5rem;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* ===============================
   Header
================================ */
.product-notes__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-notes__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0d6efd;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.product-notes__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.product-notes__label {
  font-size: 0.85rem;
  color: #6c757d;
}

/* ===============================
   Buttons
================================ */
.btn--sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

.btn--success {
  background: #198754;
  color: #fff;
  border-color: #198754;
}

.btn--success:hover {
  background: #157347;
  border-color: #146c43;
}

.btn--outline {
  background: transparent;
}

.btn--primary {
  color: #0d6efd;
  border-color: #0d6efd;
}

.btn--primary:hover {
  background: #0d6efd;
  color: #fff;
}

/* ===============================
   Tabs
================================ */
.tabs {
  margin-top: 16px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #dee2e6;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tabs__tab {
  appearance: none;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #495057;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex: 0 0 auto;
}

.tabs__tab:hover {
  color: #0d6efd;
}

.tabs__tab.is-active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
  font-weight: 600;
}

/* ===============================
   Badge
================================ */
.badge {
  display: inline-block;
  min-width: 20px;
  padding: 2px 6px;
  font-size: 0.7rem;
  border-radius: 10px;
  text-align: center;
  background: #adb5bd;
  color: #fff;
}

/* ===============================
   Panels
================================ */
.tabs__panels {
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tabs__panel {
  display: none;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tabs__panel.is-active {
  display: block;
}

/* ===============================
   Table
================================ */
.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  vertical-align: middle;
}

.col-id {
  width: 70px;
}

.col-type {
  width: 140px;
}

.col-date {
  width: 170px;
}

.col-actions {
  width: 180px;
  text-align: end;
}

/* ===============================
   Tablet
================================ */
@media (max-width: 768px) {
  .product-notes {
    border-radius: 8px;
  }

  .product-notes__header {
    flex-direction: column;
    align-items: stretch;
  }

  .product-notes__toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .tabs__panel {
    padding: 10px;
  }

  .table-wrap table {
    min-width: 620px;
  }

  .col-type {
    width: 120px;
  }

  .col-date {
    width: 150px;
  }

  .col-actions {
    width: 140px;
  }
}

/* ===============================
   Mobile
================================ */
@media (max-width: 480px) {
  .product-notes__title {
    font-size: 0.95rem;
  }

  .product-notes__label {
    font-size: 0.8rem;
  }

  .btn--sm {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .tabs {
    gap: 2px;
  }

  .tabs__tab {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .tabs__panel {
    padding: 8px;
  }

  .table-wrap table {
    min-width: 560px;
  }

  .col-id {
    width: 56px;
  }

  .col-type {
    width: 100px;
  }

  .col-date {
    width: 130px;
  }

  .col-actions {
    width: 120px;
  }
}