body{
    margin: 0px !important;
}

/* visually-hidden-focusable class should by default be hidden, on first tab hit from address bar it should get focused */
.visually-hidden-focusable {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/**
 * Primary Local Tasks (Drupal 11)
 */

#block-ibh-v1-primary-local-tasks {
  margin: 1rem 0;
}

#block-ibh-v1-primary-local-tasks > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#block-ibh-v1-primary-local-tasks > ul > li {
  margin: 0;
}

#block-ibh-v1-primary-local-tasks > ul > li > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.625rem 1.25rem;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #ffffff;
  color: #222222;
  text-decoration: none;
  font-weight: 600;
  transition: all .25s ease;
}

#block-ibh-v1-primary-local-tasks > ul > li > a:hover,
#block-ibh-v1-primary-local-tasks > ul > li > a:focus {
  background: #511550;
  color: #fff;
  border-color: #511550;
}

#block-ibh-v1-primary-local-tasks > ul > li > a.is-active,
#block-ibh-v1-primary-local-tasks > ul > li > a[aria-current="page"] {
  background: var(--theme-color, #511550);
  border-color: var(--theme-color, #511550);
  color: #fff;
}

/* Tablet */

@media (max-width: 991px) {

  #block-ibh-v1-primary-local-tasks > ul {
    gap: 0.5rem;
  }

  #block-ibh-v1-primary-local-tasks > ul > li > a {
    padding: 0.55rem 1rem;
    font-size: 15px;
  }

}

/* Mobile */

@media (max-width: 767px) {

  #block-ibh-v1-primary-local-tasks > ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  #block-ibh-v1-primary-local-tasks > ul > li {
    width: 100%;
  }

  #block-ibh-v1-primary-local-tasks > ul > li > a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

}

/**
 * Layout Builder Help Block
 */

#block-ibh-v1-help {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--theme-color, #511550);
  background-color: #f8f9fa;
  border-radius: 6px;
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

#block-ibh-v1-help p {
  margin: 0 0 1rem;
}

#block-ibh-v1-help p:last-child {
  margin-bottom: 0;
}

#block-ibh-v1-help a {
  color: var(--theme-color, #511550);
  font-weight: 600;
  text-decoration: none;
  transition: color .3s ease;
}

#block-ibh-v1-help a:hover,
#block-ibh-v1-help a:focus {
  color: #000;
  text-decoration: underline;
}

/* Tablet */
@media (max-width: 991px) {
  #block-ibh-v1-help {
    padding: 1rem;
    font-size: 14px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  #block-ibh-v1-help {
    margin: 1rem 0;
    padding: 0.875rem;
    font-size: 14px;
    line-height: 1.6;
  }
}

/**
 * Drupal Status Messages
 */

[data-drupal-messages] {
  margin: 1rem 0 1.5rem;
}

[data-drupal-messages] > div {
  position: relative;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  border-left: 4px solid #f39c12;
  background-color: #fff8e5;
  color: #7a5b00;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Success */

[data-drupal-messages] [aria-label="Status message"] {
  background: #edf9f0;
  border-left-color: #28a745;
  color: #155724;
}

/* Warning */

[data-drupal-messages] [aria-label="Warning message"] {
  background: #fff8e5;
  border-left-color: #f39c12;
  color: #856404;
}

/* Error */

[data-drupal-messages] [aria-label="Error message"] {
  background: #fdecec;
  border-left-color: #dc3545;
  color: #721c24;
}

/* Links */

[data-drupal-messages] a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

[data-drupal-messages] a:hover,
[data-drupal-messages] a:focus {
  text-decoration: none;
}

/* Hide duplicate heading while keeping it accessible */

[data-drupal-messages] .visually-hidden {
  position: absolute !important;
}

/* Mobile */

@media (max-width: 767px) {
  [data-drupal-messages] > div {
    padding: 0.875rem 1rem;
    font-size: 14px;
  }
}

/**
 * Drupal 11 Layout Builder Form
 */

/* ------------------------------------------------------------------
 * Layout Builder Form
 * ------------------------------------------------------------------ */

.node-layout-builder-form {
    max-width: 100%;
    margin: 0 auto;
}

/* ------------------------------------------------------------------
 * Top Action Bar
 * ------------------------------------------------------------------ */

.node-layout-builder-form #edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 25px;
    padding: 15px 20px;
    background: #f8f8f8;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
}

/* ------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------ */

.node-layout-builder-form #edit-actions .button {
    min-height: 44px;
    padding: 0 22px;
    border: 2px solid #511550;
    border-radius: 5px;
    background: #511550;
    color: #ffffff;
    cursor: pointer;
    transition: all .3s ease;
    font-weight: 600;
}

.node-layout-builder-form #edit-actions .button:hover,
.node-layout-builder-form #edit-actions .button:focus {
    background: #ffffff;
    color: #511550;
    border-color: #511550;
}

.node-layout-builder-form #edit-actions .button--primary {
    background: #511550;
    color: #ffffff;
    border-color: #511550;
}

.node-layout-builder-form #edit-actions .button--primary:hover,
.node-layout-builder-form #edit-actions .button--primary:focus {
    background: #ffffff;
    color: #511550;
    border-color: #511550;
}

/* ------------------------------------------------------------------
 * Preview Toggle
 * ------------------------------------------------------------------ */

#edit-preview-toggle {
    margin-left: auto;
}

#edit-preview-toggle .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

#edit-preview-toggle label {
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}

/* ------------------------------------------------------------------
 * Layout Builder Message
 * ------------------------------------------------------------------ */

.layout-builder__message {
    margin-bottom: 20px;
}

/* ------------------------------------------------------------------
 * Revision Panel
 * ------------------------------------------------------------------ */

#edit-revision-information {
    margin-top: 30px;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fff;
}

#edit-revision-information summary {
    padding: 15px 20px;
    font-weight: 700;
    cursor: pointer;
    background: #f7f7f7;
}

#edit-revision-information .form-item {
    margin: 20px;
}

#edit-revision-information textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    resize: vertical;
}

/* ------------------------------------------------------------------
 * Hide Vertical Tabs
 * ------------------------------------------------------------------ */

.vertical-tabs,
.vertical-tabs__menu,
.vertical-tabs__panes,
.vertical-tabs__active-tab {
    display: none !important;
}

/* ------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 991px) {

    .node-layout-builder-form #edit-actions {
        gap: 10px;
    }

    #edit-preview-toggle {
        width: 100%;
        margin-left: 0;
    }

}

@media (max-width: 767px) {

    .node-layout-builder-form #edit-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .node-layout-builder-form #edit-actions .button {
        width: 100%;
    }

    #edit-preview-toggle {
        width: 100%;
    }

    #edit-preview-toggle .form-item {
        justify-content: center;
    }

}

/**
 * Drupal Toolbar Fix
 */

/* Toolbar */
#toolbar-bar,
.toolbar-bar {
    z-index: 999998 !important;
}

/* Administration menu */
.toolbar-menu-administration,
.toolbar-menu {
    z-index: 999999 !important;
}

/* Dropdown menus */
.toolbar-menu-administration .toolbar-menu,
.toolbar-menu-administration ul,
.toolbar-menu-administration li,
.toolbar-menu-administration .toolbar-box,
.toolbar-menu-administration .toolbar-tray {
    z-index: 999999 !important;
}

/* Toolbar trays */
.toolbar-tray,
.toolbar-tray-horizontal,
.toolbar-tray-vertical {
    z-index: 999999 !important;
}

/* Contextual links */
.contextual,
.contextual-links {
    z-index: 999997 !important;
}