@import "../../node_modules/@patternfly/react-styles/css/components/Alert/alert.css";
@import "../lib/page.scss";
@import "../../node_modules/@patternfly/patternfly/components/Button/button.scss";
@import "../lib/table.css";

#accounts-list {
    --ct-account-pic-size: 3rem;
    display: grid;
    align-items: stretch;
    grid-gap: 0.5rem;
    margin: 2rem 0 0;
    grid-template-columns: repeat(auto-fit, minmax(calc(8rem + var(--ct-account-pic-size)), 1fr));
}

@media (max-width: 640px) {
    #accounts-list {
        --ct-account-pic-size: 0rem;
    }
}

.cockpit-account {
    align-content: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-areas: "pic name"
                         "pic account";
    grid-template-columns: var(--ct-account-pic-size) 1fr;
    grid-gap: 0 0.25rem;
    min-height: 4rem;
    padding: 0.5rem;
}

.cockpit-account:hover,
.cockpit-account:focus-within {
    background-color: var(--color-link-hover-bg);
    cursor: pointer;
}

.cockpit-account > .cockpit-account-pic {
    font-size: var(--ct-account-pic-size);
    color: #bebebe;
    grid-area: pic;
}

.cockpit-account > .cockpit-account-real-name {
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    grid-area: name;
}

.cockpit-account > .cockpit-account-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    grid-area: account;
    /* We're using an underline on focus and focus-within above for focus indication */
    outline: none;
}

.account-details .info-table-ct th,
.account-details .info-table-ct td {
    overflow: visible;
    vertical-align: top;
}

#account-details div.checkbox:first-child {
	margin-top: 0px;
}

#account-details div.checkbox:last-child {
	margin-bottom: 0px;
}

#dashboard_setup_address_discovered li:hover {
    background-color: var(--color-link-hover-bg);
}

#account-pic {
    background: #d3d7cf;
    border-radius: 5px;
    cursor: pointer;
}

#account-authorized-keys-list > .list-group-item {
    display: flex;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    align-items: center;
}

#account-authorized-keys-list .comment {
    flex: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

#account-authorized-keys-list .fingerprint {
    width: calc(100% - 30px - 260px);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

#authorized-key-add {
    min-width: 28px;
    min-height: 28px;
}

#authorized-keys-text {
    height: 200px;
    resize: none;
    margin-bottom: 10px;
}

.align-top {
    vertical-align: top;
}

.password-strength-meter {
    height: 5px;
    margin-top: 5px;
    margin-bottom: 0;
}

.password-strength-meter div {
    width: 25%;
    border-right: 3px solid var(--color-bg);
    background-color: transparent;
}

.password-strength-meter div:last-child {
    border-right: none;
}

.password-strength-meter.weak div:first-child {
    background-color: #C00;
}

.password-strength-meter.okay div:nth-child(-n+2) {
    background-color: #EC7A08;
}

.password-strength-meter.good div:nth-child(-n+3) {
    background-color: var(--color-alert-success-text);
}

.password-strength-meter.excellent div:nth-child(-n+4) {
    background-color: var(--color-alert-success-text);
}

.size-text-ct {
    display: inline;
    width: 8em;
    text-align: left;
    margin: 2px;
}

@media (min-width: 500px) {
    .modal-sm-ct {
        width: 32rem;
    }
}

.account-column-one {
    min-width: 270px;
    display: inline-block;
}

.expiration-modal .form-table-ct td:first-child {
    text-align: left;
}

.expiration-modal label input[type=text] {
    position: relative;
    top: -5px;
}
