.gadget {
    margin: 0;
    padding: 0;
    position: absolute;
    z-index: 1;
}

.propagation-blocker div.gadget {
    z-index: 2;
}

.gadget.dragging {
    z-index: 3;
}

.gadget.dropdown-active {
    z-index: 5 !important;
}

.gadget .gadget-container {
    position: relative;
    border: 1px solid rgba(9, 30, 66, 0.04);
    border-radius: 4px;
}

.gadget .gadget-container .submit.loading {
    background: transparent url("/s/uajp63/11030007/1owio8b/10.0.11/_/download/resources/com.atlassian.gadgets.dashboard:dashboard/css/images/wait.gif") 100% center no-repeat;
}

.gadget.dropdown-active .gadget-menu {
    z-index: 8;
}

.gadget .dashboard-item-header {
    background: var(--ds-surface-raised, #eee);
    -moz-border-radius-topleft: 3px;
    border-top-left-radius: 3px;
    -moz-border-radius-topright: 3px;
    border-top-right-radius: 3px;
    margin: 0;
    min-height: 24px;
    padding: 0;
    position: relative;
}

.gadget .dashboard-item-title {
    color: var(--ds-text, #333);
}

.gadget .dashboard-item-header > .dashboard-item-title {
    /* h5 size from ADG typography */
    background: transparent;
    font-size: 12px;
    letter-spacing: -.006em;
    font-weight: bold;
    line-height: 1.666666666667;
    margin: 0;
    padding: 4px 64px 4px 10px;
}

.gadget .dashboard-item-header > .gadget-menu {
    bottom: 0;
    position: absolute;
    margin-right: 12px;
    right: 0;
    top: 0;
    vertical-align: middle;
}

.dashboard.draggable .gadget .dashboard-item-title {
    cursor: move;
}

.dashboard.initializing div.gadget {
    visibility: hidden;
}

/* gadget menus */
.gadget .gadget-menu .aui-icon {
    border: none;
    display: block;
    padding: 0 3px;
    text-align: left;
    text-indent: -999em;
    opacity: 0.5;
    color: var(--ds-icon-inverse, #FFF);
    height: 16px;
    width: 16px;
}

html[data-color-mode="dark"] .gadget .gadget-menu .aui-icon {
    color: var(--ds-icon, #FFF);
}

.gadget .gadget-menu button.js-sortable-trigger svg.aui-icon {
    opacity: 0.5;
}

.gadget .gadget-menu .aui-icon:hover {
    opacity: 1;
}

.gadget .gadget-menu .aui-icon.move {
    cursor: move;
}

.gadget .gadget-menu > ul {
    float: right;
    margin: 6px 0 0 0;
    padding: 0;
    width: auto;
}

.gadget .gadget-menu > ul > li {
    float: left;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

/* We're using buttons now, but preserve the legacy for others */
.gadget .gadget-menu > ul > li > a:hover {
    text-decoration: none;
}

.gadget .gadget-menu > ul > li > a > span {
    display: block;
    padding: 0;
}

/* gadget colours menu items */
.gadget .gadget-colors div {
    display: flex;
    flex-wrap: nowrap;
    padding: 3px;
}

.gadget .gadget-colors a {
    background: transparent;
    border: 0;
    box-sizing: border-box;
    display: block;
    height: 16px;
    outline-offset: 1px;
    padding: 0;
    text-align: left;
    text-indent: -999em;
    width: 16px;
}

.gadget .gadget-colors a:hover,
.gadget .gadget-colors a:focus,
.gadget .gadget-colors a:active {
    outline: 1px solid var(--ds-border-focused, #333);
}

/* gadget content container styles -- basically the wrapper for the gadget iframe */
.gadget .dashboard-item-content {
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    background: var(--ds-surface, #fff);
    box-shadow: var(--ds-shadow-raised, 0 2px 2px 0 rgba(9, 30, 66, 0.13));
}

.gadget .dashboard-item-content.minimization {
    display: none;
    left: -9999px;
    position: absolute;
    width: 100%;
}

.defaultHeight {
    min-height: 250px;
}

/* Jira's LnF system is getting in the way of our brilliant hack to use a link as a button */
.gadget-dashboard-chrome-menu a {
    color: var(--ds-text, #000) !important;
}
