/* For page edges, borders and structures */

/* Page backgrounds - default */

.crm-container .crm-form-block { /* darkened page bg style */
  box-shadow: var(--crm-form-block-box-shadow);
  background-color: var(--crm-form-block-background);
  border-radius: var(--crm-form-block-border-radius);
  padding: var(--crm-form-block-padding);
  margin: 0;
}
.crm-container .ui-tabs-panel .crm-form-block {
  box-shadow: none;
}
/* Page backgrounds - potential for no padding */
.crm-container .crm-group-search-form-block,
.CRM_Contact_Form_Search_Advanced .crm-form-block,
.CRM_Contact_Form_Search_Basic .crm-form-block,
.CRM_Case_Form_Search .crm-form-block,
.CRM_Contribute_Form_Search .crm-form-block,
.CRM_Member_Form_Search .crm-form-block,
.CRM_Event_Form_Search .crm-form-block,
.CRM_Pledge_Form_Search .crm-form-block,
.CRM_Activity_Form_Search .crm-form-block,
.crm-container .crm-report-instanceList-form-block,
.CRM_Financial_Form_Search .crm-form-block,
.CRM_Event_Form_SearchEvent .crm-form-block {
  padding: var(--crm-padding-inset);
  /* box-shadow: none; */
}
/* Page backgrounds - potential for outset accordions */
.crm-container .crm-contribution-contributionpage-premium-form-block details,
.crm-container .crm-contribution-contributionpage-widget-form-block details,
.crm-container .crm-activity-form-block details,
.crm-container .crm-contactEmail-form-block details,
.crm-container .crm-contribution-form-block details,
.crm-container .crm-pledge-form-block details,
.crm-container .crm-payment-form-block details,
.crm-container .crm-import-preview-form-block details,
.crm-container .crm-event-manage-eventinfo-form-block details,
.crm-container .crm-wizard-step,
.crm-container .CRM_Admin_Form_MessageTemplates details,
.crm-container .crm-case-caseview-form-block details,
.crm-container .crm-case-activity-form-block details {
  margin: var(--crm-padding-inset) calc((-1 * var(--crm-form-block-padding)) + var(--crm-padding-inset));
}
/* Page backgrounds - reset of elements cought up in outset accordions (!) */
.crm-container .crm-payment-form-block details #payment_information {
  margin: 0 var(--crm-form-block-padding);
}
/* Reset elements for potential no padding */
.crm-group-search-form-block .crm-datatable-pager-top,
.crm-group-search-form-block .crm-datatable-pager-bottom {
  margin-inline: var(--crm-form-block-padding);
}
.crm-contribution-contributionpage-premium-form-block .messages {
  margin: calc(var(--crm-form-block-padding) - var(--crm-padding-inset));
}
.crm-contact-block > .help,
.CRM_Mailing_Form_Search .messages {
  margin: var(--crm-padding-reg) 0;
}
#crm-main-content-wrapper .newGroup {
  margin: var(--crm-form-block-padding) calc(var(--crm-form-block-padding) - var(--crm-padding-inset)) 0;
}

/* Pagination */

.crm-datatable-pager-top,
.crm-datatable-pager-bottom {
  display: flex;
  justify-content: space-between;
  font-size: var(--crm-m3);
  margin-inline: var(--crm-m);
}
.crm-datatable-pager-top {
  margin-block: var(--crm-r);
}
.crm-datatable-pager-bottom {
  margin-top: var(--crm-r);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--crm-c-secondary);
  color: var(--crm-c-secondary-text) !important;
  border: 0 solid transparent;
  padding: var(--crm-s);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--crm-c-secondary-hover);
}

/* Pagination quickforms */

.crm-pager {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  margin-block: 1rem;
}
.crm-pager .crm-pager-nav {
  margin: 0 auto;
}
.crm-container .crm-pager-nav a.crm-hover-button {
  background: var(--crm-c-secondary);
  color: var(--crm-c-secondary-text);
  padding: var(--crm-btn-padding-block) var(--crm-btn-padding-inline);
}
.crm-container .crm-pager-nav a.crm-hover-button:hover,
.crm-container .crm-pager-nav a.crm-hover-button:focus {
  background: var(--crm-c-secondary-hover);
}
.crm-search-results .form-item.float-right {
  margin-bottom: 1rem;
}

/*  Pagination - from BS3 */

.crm-container .pagination {
  display: inline-block;
  padding-left: 0;
  margin: var(--crm-padding-reg) 0;
  border-radius: var(--crm-roundness);
}
.crm-container .pagination > li {
  display: inline;
}
.crm-container .pagination > li > a,
.crm-container .pagination > li > span {
  position: relative;
  float: left;
  padding: var(--crm-s) var(--crm-m);
  margin-left: -1px;
  line-height: 1.4;
  color: var(--crm-c-link);
  text-decoration: none;
  background-color: var(--crm-c-page-background);
  border: var(--crm-c-divider);
}
.crm-container .pagination > li > a:hover,
.crm-container .pagination > li > a:focus,
.crm-container .pagination > li > span:hover,
.crm-container .pagination > li > span:focus {
  z-index: 2;
  color: var(--crm-c-link-hover);
  background-color: var(--crm-c-background);
  border-color: var(--crm-c-background4);
}
.crm-container .pagination > li:first-child > a,
.crm-container .pagination > li:first-child > span {
  margin-left: 0;
  border-top-left-radius: var(--crm-roundness);
  border-bottom-left-radius: var(--crm-roundness);
}
.crm-container .pagination > li:last-child > a,
.crm-container .pagination > li:last-child > span {
  border-top-right-radius: var(--crm-roundness);
  border-bottom-right-radius: var(--crm-roundness);
}
.crm-container .pagination > .active > a,
.crm-container .pagination > .active > a:hover,
.crm-container .pagination > .active > a:focus,
.crm-container .pagination > .active > span,
.crm-container .pagination > .active > span:hover,
.crm-container .pagination > .active > span:focus {
  z-index: 3;
  color: var(--crm-c-primary-text);
  cursor: default;
  background-color: var(--crm-c-primary);
  border: var(--crm-c-divider);
}
.crm-container .pagination > .disabled > span,
.crm-container .pagination > .disabled > span:hover,
.crm-container .pagination > .disabled > span:focus,
.crm-container .pagination > .disabled > a,
.crm-container .pagination > .disabled > a:hover,
.crm-container .pagination > .disabled > a:focus {
  color: var(--crm-c-inactive);
  cursor: not-allowed;
  background-color: transparent;
  border: var(--crm-c-divider);
}
.crm-container .pagination-lg > li > a,
.crm-container .pagination-lg > li > span {
  padding: var(--crm-m2) var(--crm-r);
  font-size: var(--crm-r1);
  line-height: 1.3;
}
.crm-container .pagination-lg > li:first-child > a,
.crm-container .pagination-lg > li:first-child > span {
  border-top-left-radius: calc(1.5 * var(--crm-roundness));
  border-bottom-left-radius: calc(1.5 * var(--crm-roundness));
}
.crm-container .pagination-lg > li:last-child > a,
.crm-container .pagination-lg > li:last-child > span {
  border-top-right-radius: calc(1.5 * var(--crm-roundness));
  border-bottom-right-radius: calc(1.5 * var(--crm-roundness));
}
.crm-container .pagination-sm > li > a,
.crm-container .pagination-sm > li > span {
  padding: var(--crm-padding-small);
  font-size: var(--crm-font-size-small);
  line-height: 1.5;
}
.crm-container .pagination-sm > li:first-child > a,
.crm-container .pagination-sm > li:first-child > span {
  border-top-left-radius: calc(0.75 * var(--crm-roundness));
  border-bottom-left-radius: calc(0.75 * var(--crm-roundness));
}
.crm-container .pagination-sm > li:last-child > a,
.crm-container .pagination-sm > li:last-child > span {
  border-top-right-radius: calc(0.75 * var(--crm-roundness));
  border-bottom-right-radius: calc(0.75 * var(--crm-roundness));
}
.crm-search-display-pager {
  padding-inline: var(--crm-padding-reg);
}
