:root {
  --gty-admin-dark: #1D2327;
  --gty-admin-light: #9CA2A7;
  --gty-admin-almost-white: #F0F0F1;
  --gty-admin-accent: #2271b1;
}

/* Base TableView Styles */
.table-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* State Messages */
.table-view__state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.table-view__state--loading {
  /* Loading specific styles if needed */
}

.table-view__state--empty {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.table-view__message {
  color: #6b7280;
}

/* Table Wrapper */
.table-view__wrapper {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Table */
.table-view__table {
  width: 100%;
  border-collapse: collapse;
}

/* Table Head */
.table-view__thead {
  background-color: #f9fafb;
}

/* Table Header Cell */
.table-view__th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Header Content */
.table-view__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-view__header--sortable {
  cursor: pointer;
  user-select: none;
}

.table-view__header--sortable:hover {
  color: #374151;
}

/* Sort Icon */
.table-view__sort-icon {
  color: #9ca3af;
}

/* Table Body */
.table-view__tbody {
  background-color: #ffffff;
}

/* Table Row */
.table-view__row {
  border-top: 1px solid #e5e7eb;
}

.table-view__row--body:hover {
  background-color: #f9fafb;
}

/* Table Data Cell */
.table-view__td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: #111827;
  max-width: 28rem;
}

/* Cell Content */
.table-view__cell-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagination Container */
.table-view__pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Pagination Controls */
.table-view__pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Pagination Button */
.table-view__btn {
  padding: 0.25rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: #ffffff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.table-view__btn:hover:not(:disabled) {
  background-color: #f9fafb;
}

.table-view__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.table-view__btn--pagination {
  /* Specific styles for pagination buttons if needed */
}

/* Row Count */
.table-view__row-count {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Page Size Container */
.table-view__page-size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Page Info */
.table-view__page-info {
  font-size: 0.875rem;
  color: #374151;
}

/* Select Dropdown */
.table-view__select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
}

.table-view__select:focus {
  outline: none;
  ring: 1px;
  ring-color: #3b82f6;
}

/* Grid Component Styles */
.grid {

}

/* Grid Actions */
.grid__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Grid Buttons */
.grid__btn {
  padding: 0.25rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.grid__btn--delete {
  background-color: transparent;
}

.grid__btn--cancel {
  color: #374151;
  background-color: #f3f4f6;
}

.grid__btn--cancel:hover {
  background-color: #e5e7eb;
}

.grid__btn--confirm {
  color: #ffffff;
  background-color: #dc2626;
}

.grid__btn--confirm:hover {
  background-color: #b91c1c;
}

.grid__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Error State */
.grid__error {
  padding: 1rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
}

.grid__error-title {
  color: #991b1b;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.grid__error-message {
  color: #b91c1c;
}

/* Loading State */
.grid__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.grid__loading-message {
  color: #6b7280;
}

/* Modal */
.grid__modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
}

.grid__modal {
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 28rem;
  width: 100%;
  margin: 1rem;
  padding: 1.5rem;
}

.grid__modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.grid__modal-message {
  color: #4b5563;
  margin-bottom: 1.5rem;
}

.grid__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Filter styles. */

.filters {
  display: flex;
  gap: 1rem;
}

.filters--row {
  flex-direction: row;
  align-items: end;
}

.filters--stack {
  flex-direction: column;
  align-items: flex-start;
}

/* List View Styles */
.list-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* State Messages */
.list-view__state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.list-view__state--loading {
  /* Loading specific styles if needed */
}

.list-view__state--empty {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.list-view__message {
  color: #6b7280;
}

/* List Container */
.list-view__container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* List Item */
.list-view__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.list-view__item:hover {
  background-color: #f9fafb;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

/* Item Content */
.list-view__item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.list-view__item-title {
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}

.list-view__item-description {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.25rem;
}

.list-view__item-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* Item Actions */
.list-view__item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer */
.list-view__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Cards View Styles */
.cards-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* State Messages */
.cards-view__state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.cards-view__state--loading {
  /* Loading specific styles if needed */
}

.cards-view__state--empty {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.cards-view__message {
  color: #6b7280;
}

/* Cards Grid */
.cards-view__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Card */
.cards-view__card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.cards-view__card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Card Header */
.cards-view__card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.cards-view__card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}

/* Card Body */
.cards-view__card-body {
  flex: 1;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cards-view__card-description {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cards-view__card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.cards-view__card-meta-item {
  font-size: 0.75rem;
  color: #9ca3af;
  padding: 0.25rem 0.5rem;
  background-color: #f9fafb;
  border-radius: 0.25rem;
}

/* Card Footer */
.cards-view__card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Footer */
.cards-view__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ViewSwitcher BEM styles */
.gateway-view-switcher {
  display: flex;
  align-items: center;
}

.view-switcher {
  position: relative;
}

.view-switcher__button {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  border: none;
  border-radius: 4px;
  background: #2271b1;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.view-switcher__button--active {
  background: var(--gty-admin-dark) !important;
}

.view-switcher__chevron {
  margin-left: 0.5em;
  font-size: 0.8em;
}

.view-switcher__dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 10;
  padding: 0.25em 0;
  list-style: none;
}

.view-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.5em;
  width: 100%;
  padding: 0.5em 1em;
  background: none;
  border: none;
  color: #2271b1;
  cursor: pointer;
  font-weight: normal;
  text-align: left;
  transition: background 0.15s;
}

.view-switcher__option:hover,
.view-switcher__option:focus {
  background: #f5f5f5;
}

.view-switcher__label--hover {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gty-admin-dark);
  color: var(--gty-admin-light);
  padding: 0.25em 0.75em;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.95em;
  margin-left: 0.5em;
  transition: opacity 0.2s;
  z-index: 20;
}

.view-switcher__button:hover .view-switcher__label--hover,
.view-switcher__button:focus .view-switcher__label--hover {
  opacity: 1;
  pointer-events: auto;
}

.view-switcher__active {
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.view-switcher__icon {
  padding: 0 !important;
  background: none !important;
  height: 48px;
  width: auto;
  display: flex;
  align-items: center;
}

/**
 * Filters 
 */
.gty-grid__filters {
  margin: 1rem 0;
  border: solid 1px #e5e7eb;
  color: var(--gty-admin-dark);
  border-radius: 0.5em;
  padding: 0.75em 1em;
}

.grid__toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 0.5rem 0;
}

.grid__search-input {
  flex: 1 1 240px;
  min-width: 240px;
  max-width: 320px;
  padding: 0.5rem 1rem !important;
  font-size: 1rem;
  font-weight: 500;
  background-color: transparent !important;
  color: var(--gty-admin-dark) !important;
  font-family: var(--font-lexend);
  border: solid 1px var(--gty-admin-dark) !important;
  border-radius: 0px !important;
  line-height: normal !important;
}

.gty-grid__filters-header {
  padding: 0.5em 0.5em 0.5em 0;
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 1em;
  margin: 0.5rem 0;
}

.gty-grid__filters-header svg {
  color: var(--gty-admin-light);
  fill: var(--gty-admin-light);
}

.gty-grid__filters-title {
  font-weight: 500;
  color: var(--gty-admin-dark);
  font-size: 1rem;
}

.gty-grid__filters-container {
  color: var(--gty-admin-light);
}

.grid__toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.grid__toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}