/*
 * @file
 * These are random styles that are applicable throughout the entire theme.
 *
 * @todo Refactor this file out. This file was imported from Gin.
 */

/* cspell:ignore imageapi */
@import "../base/media-queries.pcss.css";
.gin-layer-wrapper {
  padding: var(--admin-space-s);

  & + .gin-layer-wrapper {
    margin-block-start: var(--admin-space-l);
  }

  & + h2,
  & + h3 {
    margin-block-start: var(--admin-space-xl);
  }

  .responsive-enabled {
    margin-block-start: 0;
  }

  @media (--admin-medium) {
    padding: var(--admin-space-l);
  }
}

.gin-layer-wrapper,
.gin-layer-wrapper-shadow,
.block-system > form,
.views-edit-view,
.views-preview-wrapper,
#views-entity-list,
.admin.my-workbench,
.media-library-views-form,
.user-admin-permissions,
.field-config-form {
  margin-block-start: 0;
  border-radius: var(--admin-radius-l);
  box-shadow: var(--admin-shadow-1);

  .gin--dark-mode & {
    box-shadow: 0 6px 16px var(--admin-color-border-soft);
  }

  .gin--high-contrast-mode & {
    box-shadow: none;
  }
}

.block-system > form .gin-layer-wrapper {
  padding: 0;
  padding-block-end: 1px; /* fix overflow issue in FF */
  border: 0 none;
  box-shadow: none;
}

.block-system > form .dataset-table-wrapper {
  padding: 0;
  border: 0 none;
  box-shadow: none;
}

.gin-layer-wrapper,
.block-system-main-block > form,
.views-edit-view,
.views-preview-wrapper,
#views-entity-list,
.admin.my-workbench,
.media-library-views-form,
.user-admin-permissions,
.field-config-form {
  box-sizing: border-box;
  width: 100%;
  padding: var(--admin-space-s);
  border: 1px solid var(--admin-color-border-soft);
  background: var(--admin-color-bg-surface);

  /* Remove extra spacing on top of form. */
  > .form-wrapper:first-of-type .form-item,
  .layout-region-node-main > .form-wrapper:first-of-type .form-item {
    margin-block-start: 0;
  }

  @media (--admin-small) {
    padding: var(--admin-space-l);
  }
}

.field-config-form > .form-item:first-child {
  margin-block-start: 0;
}

#system-clear-cache + #system-performance-settings,
.gin-layer-wrapper + .imageapi-optimize-default-pipeline {
  margin-block-start: var(--admin-space-l);
}

/* Unpublished node */
.node--unpublished {
  background-color: var(--admin-color-bg-unpublished);
}

/* Has table filter */
.block-system-main-block > form:has(.table-filter) {
  .table-filter {
    margin-block-end: var(--admin-space-l);
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;

    .form-type--search {
      margin-block: 0;
    }

    .winnow-input,
    .table-filter-text {
      width: 100%;
    }

    .table-filter-text {
      margin-block-start: 0;
      padding: var(--admin-space-m);
    }
  }
}
