.excel-plugin .form-group{margin-bottom:1.5rem}.excel-plugin .search-form{display:flex;gap:1rem}.excel-plugin .table-responsive{overflow-x:visible}.excel-plugin .table-autofit th,.excel-plugin .table-autofit td,.excel-plugin [class*=table-cell-expand],.excel-plugin [class*=table-cell-minw]{max-width:none;min-width:0;white-space:normal}.excel-plugin .excel-results{margin:1.5rem auto;max-width:100%;padding:0;width:100%}.excel-plugin .excel-results tbody tr.excel-row-clickable{cursor:pointer;transition:background-color 0.15s ease}.excel-plugin .page{animation:excel-plugin-slide-in 0.5s ease-out;margin:2.5rem auto;max-width:1000px;padding:0 1.5rem}.excel-plugin .item-list{display:grid;gap:1rem;grid-template-columns:repeat(3,minmax(0,300px));justify-content:center;margin-top:1rem}.excel-plugin .item input[type=checkbox]{cursor:pointer;height:18px;margin-inline-end:0.75rem;width:18px}.excel-plugin #portlet_container{margin:0 auto;max-width:1200px}.excel-plugin .keys-grid{display:grid;gap:1rem;grid-template-columns:repeat(2,1 fr)}.excel-plugin .key-item:last-child:nth-child(odd){grid-column:1/-1;margin:0 auto;width:50%}.excel-plugin .key-name{font-weight:500}.excel-plugin .button-row{display:flex;gap:1rem;justify-content:flex-end;margin-top:2rem}.excel-plugin .button-row .btn-primary:not(.close):not(.btn-unstyled):not(.btn-monospaced):hover{filter:brightness(1.1);transform:translateY(-1px)}@keyframes excel-plugin-slide-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (max-width:992px){.excel-plugin .item-list{grid-template-columns:repeat(2,minmax(0,300px))}}@media (max-width:768px){.excel-plugin .form-container{padding:1.5rem}.excel-plugin .page{padding:0 1rem}.excel-plugin #contentContainer,.excel-plugin #tableInputContainer,.excel-plugin #xqueryInputContainer,.excel-plugin .keys-wrapper{padding:1.5rem}.excel-plugin .keys-grid{grid-template-columns:1 fr}.excel-plugin .key-item:last-child:nth-child(odd){width:100%}}@media (max-width:576px){.excel-plugin .item-list{grid-template-columns:minmax(0,300px)}.excel-plugin .button-row{flex-direction:column}.excel-plugin .button-row .btn:not(.close):not(.btn-unstyled):not(.btn-monospaced){text-align:center;width:100%}}@media (max-width:767px){.excel-plugin .search-form{flex-direction:column}.excel-plugin .excel-results .table-responsive{overflow-x:visible}.excel-plugin .excel-results table{border:0;display:block}.excel-plugin .excel-results thead{display:none}.excel-plugin .excel-results tbody,.excel-plugin .excel-results tr,.excel-plugin .excel-results td{display:block;width:100%}.excel-plugin .excel-results td:last-child{border-bottom:0}.excel-plugin .excel-details-dialog{max-width:100%;width:100%}}/**
 * Loaded page-wide by "header-portlet-css": keep everything nested inside
 * ".excel-plugin" (see main.scss for details).
 *
 * Previously this file declared body, table, th, td, tr:hover, select and
 * .btn / .btn-primary / .btn-secondary at the top level, which restyled the
 * whole portal (native select arrows disappeared and Clay icon buttons such as
 * the modal close "x" were overridden). All of that is scoped now.
 */
.excel-plugin {
  --primary-color: #0b5fff;
  --primary-light: #e9ecff;
  --success-color: #28a745;
  --border-color: #e9ecef;
  --text-primary: #272833;
  --text-secondary: #6b6c7e;
  --background-light: #f8f9fa;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  color: var(--text-primary);
  line-height: 1.5;
  /* ---------- Result tables ---------- */
  /*
   * Liferay wraps the search container table in .table-responsive, which adds
   * overflow-x: auto and produces a horizontal scrollbar as soon as the
   * columns are wider than the container. Inside our portlet we let the table
   * use the full available width and wrap long values instead of scrolling.
   */
  /* Clay list views force nowrap on their cells; allow wrapping here. */
  /* Results wrapper: full width, no fixed 1000px cap. */
  /* ---------- Page layout ---------- */
  /* ---------- Column selection area ---------- */
  /* ---------- Select dropdown styling ---------- */
  /* ---------- Content container ---------- */
  /* ---------- Table input container ---------- */
  /* ---------- XQuery input container ---------- */
  /* ---------- Keys section ---------- */
  /* ---------- Button row ---------- */
}
.excel-plugin .form-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 2rem auto;
  max-width: 800px;
  padding: 2rem;
}
.excel-plugin .view-main-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 2rem auto;
  max-width: 1000px;
  padding: 2rem;
}
.excel-plugin .form-group {
  margin-bottom: 1.5rem;
}
.excel-plugin .search-form {
  display: flex;
  gap: 1rem;
}
.excel-plugin .search-input {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  flex: 1;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: var(--transition);
}
.excel-plugin .search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.1);
  outline: none;
}
.excel-plugin .table-responsive {
  overflow-x: visible;
}
.excel-plugin table {
  border: 1px solid var(--border-color);
  border-collapse: collapse;
  max-width: 100%;
  table-layout: auto;
  width: 100%;
}
.excel-plugin th,
.excel-plugin td {
  border-bottom: 1px solid var(--border-color);
  overflow-wrap: anywhere;
  padding: 0.5rem 0.625rem;
  text-align: start;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}
.excel-plugin .table-autofit th,
.excel-plugin .table-autofit td,
.excel-plugin [class*=table-cell-expand],
.excel-plugin [class*=table-cell-minw] {
  max-width: none;
  min-width: 0;
  white-space: normal;
}
.excel-plugin .excel-results {
  margin: 1.5rem auto;
  max-width: 100%;
  padding: 0;
  width: 100%;
  /* Whole row opens the details popup (class added by view.jsp). */
}
.excel-plugin .excel-results .excel-results-hint {
  background-color: var(--primary-light);
  border-inline-start: 3px solid var(--primary-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  padding: 0.625rem 0.875rem;
}
.excel-plugin .excel-results tbody tr.excel-row-clickable {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.excel-plugin .excel-results tbody tr.excel-row-clickable:hover {
  background-color: var(--primary-light);
}
.excel-plugin .excel-results tbody tr.excel-row-clickable:focus-visible {
  background-color: var(--primary-light);
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}
.excel-plugin th {
  background-color: var(--background-light);
  color: var(--text-primary);
  font-weight: 600;
}
.excel-plugin tbody tr:hover {
  background-color: var(--background-light);
}
.excel-plugin .page {
  animation: excel-plugin-slide-in 0.5s ease-out;
  margin: 2.5rem auto;
  max-width: 1000px;
  padding: 0 1.5rem;
}
.excel-plugin .column-selection,
.excel-plugin .show-details-selection {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  padding: 1.5rem;
  transition: var(--transition);
}
.excel-plugin .column-selection:hover,
.excel-plugin .show-details-selection:hover {
  box-shadow: var(--shadow-md);
}
.excel-plugin .item-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: center;
  margin-top: 1rem;
}
.excel-plugin .item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  transition: var(--transition);
}
.excel-plugin .item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.excel-plugin .item label {
  align-items: center;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  font-size: 0.95rem;
}
.excel-plugin .item input[type=checkbox] {
  cursor: pointer;
  height: 18px;
  margin-inline-end: 0.75rem;
  width: 18px;
}
.excel-plugin select {
  background-color: #fff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  max-width: 300px;
  padding: 0.75rem;
  transition: var(--transition);
  width: 100%;
}
.excel-plugin select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.1);
  outline: none;
}
.excel-plugin #portlet_container {
  margin: 0 auto;
  max-width: 1200px;
}
.excel-plugin #contentContainer {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
  padding: 2rem;
}
.excel-plugin #tableInputContainer {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  padding: 2rem;
  transition: var(--transition);
}
.excel-plugin #tableInputContainer:hover {
  box-shadow: var(--shadow-sm);
}
.excel-plugin #tableInputContainer input[type=number] {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  max-width: 200px;
  padding: 0.875rem;
  transition: var(--transition);
  width: 100%;
}
.excel-plugin #tableInputContainer input[type=number]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.1);
  outline: none;
}
.excel-plugin #xqueryInputContainer {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  padding: 2rem;
  transition: var(--transition);
}
.excel-plugin #xqueryInputContainer:hover {
  box-shadow: var(--shadow-sm);
}
.excel-plugin .editor-container {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition);
}
.excel-plugin .editor-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.1);
}
.excel-plugin .keys-wrapper {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 2rem;
  padding: 2rem;
}
.excel-plugin .keys-wrapper h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}
.excel-plugin .keys-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
.excel-plugin .key-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  display: flex;
  font-size: 0.95rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  transition: var(--transition);
}
.excel-plugin .key-item:last-child:nth-child(odd) {
  grid-column: 1/-1;
  margin: 0 auto;
  width: 50%;
}
.excel-plugin .key-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}
.excel-plugin .key-name {
  font-weight: 500;
}
.excel-plugin .key-value {
  color: var(--text-secondary);
}
.excel-plugin .button-row {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  /*
   * Only plain buttons inside our own button row are restyled. Clay icon
   * buttons (close "x", monospaced, unstyled) are excluded so portal
   * markup keeps its own look.
   */
}
.excel-plugin .button-row .btn:not(.close):not(.btn-unstyled):not(.btn-monospaced) {
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
}
.excel-plugin .button-row .btn-primary:not(.close):not(.btn-unstyled):not(.btn-monospaced) {
  background: var(--primary-color);
  border: none;
  color: #fff;
}
.excel-plugin .button-row .btn-primary:not(.close):not(.btn-unstyled):not(.btn-monospaced):hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.excel-plugin .button-row .btn-secondary:not(.close):not(.btn-unstyled):not(.btn-monospaced) {
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.excel-plugin .button-row .btn-secondary:not(.close):not(.btn-unstyled):not(.btn-monospaced):hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ---------- Animations ---------- */
@keyframes excel-plugin-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ---------- Responsive design ---------- */
@media (max-width: 992px) {
  .excel-plugin .item-list {
    grid-template-columns: repeat(2, minmax(0, 300px));
  }
}
@media (max-width: 768px) {
  .excel-plugin .form-container {
    padding: 1.5rem;
  }
  .excel-plugin .page {
    padding: 0 1rem;
  }
  .excel-plugin #contentContainer,
  .excel-plugin #tableInputContainer,
  .excel-plugin #xqueryInputContainer,
  .excel-plugin .keys-wrapper {
    padding: 1.5rem;
  }
  .excel-plugin .keys-grid {
    grid-template-columns: 1fr;
  }
  .excel-plugin .key-item:last-child:nth-child(odd) {
    width: 100%;
  }
}
@media (max-width: 576px) {
  .excel-plugin .item-list {
    grid-template-columns: minmax(0, 300px);
  }
  .excel-plugin .button-row {
    flex-direction: column;
  }
  .excel-plugin .button-row .btn:not(.close):not(.btn-unstyled):not(.btn-monospaced) {
    text-align: center;
    width: 100%;
  }
}
/* ---------- Mobile results table ---------- */
/*
 * On phones a wide results table cannot be shown as a grid without either
 * squashing the columns or forcing a horizontal scroll, so each row becomes a
 * stacked card. view.jsp copies the column headings into data-label on every
 * cell, and the ::before below renders them as the field name.
 */
@media (max-width: 767px) {
  .excel-plugin .search-form {
    flex-direction: column;
  }
  .excel-plugin .excel-results .table-responsive {
    overflow-x: visible;
  }
  .excel-plugin .excel-results table {
    border: 0;
    display: block;
  }
  .excel-plugin .excel-results thead {
    display: none;
  }
  .excel-plugin .excel-results tbody,
  .excel-plugin .excel-results tr,
  .excel-plugin .excel-results td {
    display: block;
    width: 100%;
  }
  .excel-plugin .excel-results tbody tr {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.875rem;
  }
  .excel-plugin .excel-results td {
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.5rem 0;
    text-align: start;
  }
  .excel-plugin .excel-results td:last-child {
    border-bottom: 0;
  }
  .excel-plugin .excel-results td::before {
    color: var(--text-secondary);
    content: attr(data-label);
    flex: 0 0 40%;
    font-size: 0.8rem;
    font-weight: 600;
  }
  .excel-plugin .excel-details-dialog {
    max-width: 100%;
    width: 100%;
  }
}