/* Quoka is currently a private, presentation-only workspace shell. */
.platform-card-quoka {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.016);
  box-shadow: none;
}

[data-open-workspace="quoka"][hidden] {
  display: none !important;
}

.platform-card-quoka .platform-logo {
  border-color: rgba(255, 139, 37, 0.78);
  background: rgba(255, 139, 37, 0.1);
  color: var(--text);
}

.panel-shell.is-quoka-workspace .content-grid {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.panel-shell:not(.is-quoka-workspace) .quoka-right-panel {
  display: none;
}

.panel-shell.is-quoka-workspace .quoka-right-panel {
  display: flex;
}

.quoka-right-panel .workspace-side-menu {
  display: block;
  width: 100%;
}

.quoka-right-panel .workspace-tab-button.is-active {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.quoka-right-panel .workspace-tab-icon {
  border: 0;
  color: var(--text);
}

.quoka-workspace-panel .wallapop-category-grid .category-option:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.quoka-account-modal-card {
  width: min(620px, calc(100vw - 36px));
  max-height: min(760px, calc(100dvh - 36px));
  overflow-y: auto;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

.quoka-account-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.quoka-account-method {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.quoka-account-method:hover,
.quoka-account-method.is-active {
  border-color: var(--line-strong);
  background: var(--surface-3);
  color: var(--text);
}

.quoka-account-method > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.quoka-account-method strong {
  color: currentColor;
  font-size: 13px;
}

.quoka-account-method small {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.35;
}

.quoka-account-pane[hidden] {
  display: none;
}

.quoka-credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
}

.quoka-credentials-grid .form-field {
  min-width: 0;
}

.quoka-credentials-grid .form-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quoka-optional-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
}

.quoka-workspace-panel .accounts-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}

.quoka-workspace-panel .accounts-table th:nth-child(1) { width: 44px; }
.quoka-workspace-panel .accounts-table th:nth-child(2) { width: 54px; }
.quoka-workspace-panel .accounts-table th:nth-child(3) { width: 160px; }
.quoka-workspace-panel .accounts-table th:nth-child(4) { width: 118px; }
.quoka-workspace-panel .accounts-table th:nth-child(5) { width: 225px; }
.quoka-workspace-panel .accounts-table th:nth-child(6) { width: 165px; }
.quoka-workspace-panel .accounts-table th:nth-child(7) { width: 135px; }
.quoka-workspace-panel .accounts-table th:nth-child(8) { width: 92px; }

.quoka-account-name-cell {
  display: grid;
  min-width: 0;
  gap: 4px;
  overflow: hidden;
}

.quoka-account-name-cell strong,
.quoka-account-name-cell small {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quoka-account-name-cell small {
  color: var(--muted-2);
  font-size: 11px;
}

.quoka-account-select {
  width: 100%;
  min-width: 0;
}

.quoka-binding-button {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.quoka-binding-account-name {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.quoka-binding-choice-list {
  display: grid;
  max-height: min(390px, 48vh);
  gap: 8px;
  margin-top: 18px;
  overflow-y: auto;
  padding-right: 4px;
}

.quoka-binding-choice-list.account-status-options {
  display: block;
  margin-top: 18px;
  overflow: visible;
  padding: 0;
}

.quoka-binding-choice-list.proxy-choice-list {
  margin-top: 0;
}

.quoka-modal-choice {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  font: inherit;
  text-align: left;
}

.quoka-modal-choice small {
  grid-column: 1;
}

.quoka-account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.quoka-credentials-view-card {
  width: min(620px, calc(100vw - 36px));
}

.quoka-credentials-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quoka-credentials-view-grid .form-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .panel-shell.is-quoka-workspace .content-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: none;
    gap: 8px;
  }

  .panel-shell.is-quoka-workspace .content-grid > .tab-panel:not(.is-active),
  .panel-shell.is-quoka-workspace .workspace-content > .workspace-section:not(.is-active) {
    display: none;
  }

  .panel-shell.is-quoka-workspace .content-grid > .tab-panel.is-active,
  .panel-shell.is-quoka-workspace .workspace-content > .workspace-section.is-active {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .panel-shell.is-quoka-workspace .content-grid > .quoka-right-panel {
    display: flex;
    order: -1;
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
  }

  .panel-shell.is-quoka-workspace .workspace-side-menu {
    display: block;
    width: 100%;
    height: auto;
    padding: 12px;
  }

  .panel-shell.is-quoka-workspace .workspace-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .quoka-workspace-panel .wallapop-category-grid .category-option:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .quoka-account-methods,
  .quoka-credentials-grid,
  .quoka-credentials-view-grid {
    grid-template-columns: 1fr;
  }

  .panel-shell.is-quoka-workspace .workspace-tab-button {
    width: 100%;
    min-height: 44px;
    padding: 9px;
    font-size: 12px;
  }
}
