/* --- Search Results --- */
table.search-results ul {
    list-style: none;
    padding-left: 0;
}
table.search-results li strong {
    background: var(--ds-background-selected, #ebf2f9);
    color: var(--ds-text, #000);
    font-weight: bold;
}

.application-icon {
    vertical-align: text-bottom;
    margin-right: 3px;
    width: 16px;
    height: 16px;
}
h2 > .application-icon {
    padding-bottom: 3px;
}
.selected-groups {
    padding-top: 5px;
}
#applicationsTable td {
    vertical-align: middle;
}

pre.default-font {
    font-family: inherit;
}

/* Profile page */
.account-settings {
    max-width: 800px;
}

.avatar-panel {
    border-left: 1px solid var(--ds-border, #CCC);
    width: 148px;
}

#stacktrace {
    white-space:pre;
}

#test-connection-spinner,
#test-group-search-spinner,
#test-user-search-spinner {
    display: inline-block;
    padding-left: 15px;
    padding-bottom: 5px;
}

#cancel-edit-password {
    margin-left: 0px;
}

.aui-message .aui-message-wrapped-body {
    word-wrap: break-word;
}

table#directoriesTable td {
    vertical-align: middle;
}

/* Cluster info page */
table#cluster-information-table .actions {
    display: none;
}

/* AUI overrides */

.aui-page-panel .aui-page-panel-nav {
  background: var(--ds-surface, white) !important;
}

/* Override AUI sidebar styles for dark mode */
.aui-navgroup-vertical {
  background: var(--ds-surface, #f4f5f7) !important;
}

.aui-navgroup-vertical .aui-nav {
  background: var(--ds-surface, #f4f5f7) !important;
}

.aui-navgroup-vertical .aui-nav > li {
  background: var(--ds-surface, #f4f5f7) !important;
}

.aui-navgroup-vertical .aui-nav > li > a {
  background: var(--ds-surface, #f4f5f7) !important;
  color: var(--ds-text, #333) !important;
}

/* Hover state for navigation items */
.aui-navgroup-vertical .aui-nav > li > a:hover {
  background: var(--ds-background-neutral-hovered, #f4f5f7) !important;
}

/* Selected/active state for navigation items */
/* Keep text color and weight the same, only change background for subtle highlight */
.aui-navgroup-vertical .aui-nav > li.aui-nav-selected > a {
  background: var(--ds-background-selected, #deebff) !important;
}

/* Focus state for navigation items - ensure outline is fully visible */
.aui-navgroup-vertical .aui-nav > li > a:focus {
  position: relative;
  z-index: 10;
  outline: 2px solid var(--ds-border-focused, #4c9aff) !important;
  outline-offset: -2px;
}

/* Override AUI button styles for dark mode - exclude button-link and button-subtle */
.aui-button:not(.aui-button-link):not(.aui-button-subtle) {
  background: var(--ds-background-brand, #0052cc) !important;
  color: var(--ds-text-inverse, #fff) !important;
  border-color: var(--ds-border-brand, #0052cc) !important;
}

.aui-button:not(.aui-button-link):not(.aui-button-subtle):hover {
  background: var(--ds-background-brand-hovered, #0065ff) !important;
  color: var(--ds-text-inverse, #fff) !important;
  border-color: var(--ds-border-brand-hovered, #0065ff) !important;
}

.aui-button:not(.aui-button-link):not(.aui-button-subtle):focus {
  background: var(--ds-background-brand-pressed, #0747a6) !important;
  color: var(--ds-text-inverse, #fff) !important;
  border-color: var(--ds-border-brand-pressed, #0747a6) !important;
}

/* Subtle button styling - minimal appearance for icons and secondary actions */
.aui-button-subtle {
  background: transparent !important;
  color: var(--ds-text, #172b4d) !important;
  border: none !important;
}

.aui-button-subtle:hover {
  background: var(--ds-background-neutral-hovered, #f4f5f7) !important;
  color: var(--ds-text, #172b4d) !important;
}

.aui-button-subtle:focus {
  background: var(--ds-background-neutral-hovered, #f4f5f7) !important;
  color: var(--ds-text, #172b4d) !important;
  outline: 2px solid var(--ds-border-focused, #4c9aff) !important;
  outline-offset: 2px !important;
}

/* Subtle button icons */
.aui-button-subtle .aui-icon {
  color: var(--ds-icon, #42526e) !important;
}

/* UPM notifications icon */
.aui-button-subtle .aui-icon.upm-notifications-icon,
.aui-button-subtle .aui-icon.aui-iconfont-info-filled {
  color: var(--ds-text-link, #0052cc) !important;
}

.aui-tabs.horizontal-tabs > .tabs-pane {
    padding-top: 20px;
}

form.aui .buttons-container {
    padding-top: 20px;
}

form.aui h3 {
    margin-bottom: 10px;
}

.aui-navgroup-vertical .aui-nav>li>a, .aui-nav-vertical>li>a {
    padding: 11px 10px;
}

.aui-progress-tracker-step > a,
.aui-progress-tracker-step > span {
    padding-top: 0;
    margin-top: 25px;
}

.aui-progress-tracker-step > a::before,
.aui-progress-tracker-step > span::before,
.aui-progress-tracker-step + .aui-progress-tracker-step > a::after,
.aui-progress-tracker-step + .aui-progress-tracker-step > span::after {
    top: -19px;
}

.aui-progress-tracker-step > a:focus {
    outline: 2px solid var(--ds-border-focus, #0052cc);
    border-radius: 3px;
}

/* User profile menu in navbar */
ul.user-profile-nav {
    height: 40px;
}

ul.user-profile-nav li.user-dropdown, ul.user-profile-nav li.user-dropdown a.aui-dropdown2-trigger {
    height: 100%;
}

ul.user-profile-nav li.user-dropdown a.aui-dropdown2-trigger {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.banner {
    padding-bottom: 10px;
    padding-top: 10px;
}

.banner::after {
    top: 10px;
}

form.aui.multi-tab-form .buttons-container {
    padding-left: 155px;
}

.aui-icon-small.starttls-warning-icon {
    height: 23px;
    width: 23px;
    color: var(--ds-text-warning, #FFC400);
}

.aui-icon-small.starttls-warning-icon::before {
    font-size: 23px;
}

.aui-message img.notification-icon {
    margin-right: -4px;
}

/* Hidden styles for the drag and drop trigger */

.versions-table__drag-trigger {
    position: absolute;
    inset: 0;
    width: 100%;
    left: 0;
    top: 0;
}

.m-sortable-table .aui-restfultable-order {
    position: relative;
}

.m-sortable-table .aui-restfultable-draghandle {
    position: relative;
    z-index: 2;
}

/* Crowd logo basic styling */
.aui-header .aui-header-logo-crowd .aui-header-logo-device {
    background-image: url('./images/logo/crowd-light.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    display: inline-block !important;
    width: 88px !important;
    height: 32px !important;
}

/* Dark theme logo */
html[data-color-mode="dark"] .aui-header .aui-header-logo-crowd .aui-header-logo-device,
html[data-theme="dark"] .aui-header .aui-header-logo-crowd .aui-header-logo-device,
html[data-theme="legacy-dark"] .aui-header .aui-header-logo-crowd .aui-header-logo-device {
    background-image: url('./images/logo/crowd-dark.svg') !important;
}

#footer-logo > a {
    background-image: url("./images/logo/atlassian-logo-neutral.svg")
}

#footer-logo > a:hover {
    background-image: url("./images/logo/atlassian-logo.svg")
}

#footer-logo a {
    display:block;
    height:26px;
    margin:0 auto;
    text-align:left;
    text-indent:-9999em;
    width:127px;
    background-size: contain;
    background-repeat: no-repeat;
}

#footer-logo {
    position: relative;
    bottom: -21px;
}

#entity-details .search-result-name {
    vertical-align: middle;
}

form.aui:not(.aui-legacy-forms) .checkbox input.checkbox-overridden-globally:checked + .aui-form-glyph::before {
    background: var(--aui-form-glyph-disabled-fill-color);
    border-color: var(--aui-form-glyph-disabled-fill-color);
    color: var(--aui-form-glyph-disabled-icon-color);
}

form.aui:not(.aui-legacy-forms) .checkbox input.checkbox-overridden-globally:not(:checked) + .aui-form-glyph::before {
    background: var(--aui-form-glyph-disabled-fill-color);
    border-color: var(--aui-form-glyph-disabled-fill-color);
    color: var(--aui-form-glyph-disabled-icon-color);
}

form.aui:not(.aui-legacy-forms) .checkbox input.checkbox-overridden-globally ~ label {
    color: var(--aui-form-disabled-field-label-color);
}

/* Input fields - stable selectors, design tokens */
.aui-field input,
.aui-field-text input,
.aui-form input {
  background-color: var(--ds-background-input, #EBECF0) !important;
  color: var(--ds-text) !important;
  border: 1px solid var(--ds-border) !important;
}

/* Dark mode specific overrides */
[data-color-mode="dark"] .aui-field input,
[data-color-mode="dark"] .aui-field-text input,
[data-color-mode="dark"] .aui-form input {
  background-color: var(--ds-background-input, #22272B) !important;
  border-color: var(--ds-border-input, #738496) !important;
}

/* Remove shadow to match original Crowd */
div[role="menu"] {
  box-shadow: none !important;
}

/* Remove borders/shadows between search and checkbox areas */
.search-input-container {
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Theme Switcher - User Dropdown Integration */
.theme-section-header strong {
    padding: 8px 12px;
    display: block;
    color: var(--ds-text-subtle);
}

/* Theme option items */
.theme-option-item a {
    padding-left: 32px;
}

/* Theme section separator */
.theme-section-separator {
    border-bottom: 1px solid var(--ds-border);
    margin-bottom: 8px;
    margin-top: 8px;
}

/* Input focus states for AUI */
.aui-field input:focus,
.aui-field-text input:focus,
.aui-form input:focus {
  border-color: var(--ds-border-focused) !important;
  box-shadow: 0 0 0 2px var(--ds-border-focused) !important;
}

