/* Patternfly CSS places a "bg-login.jpg" as the background on this ".login-pf" class.
   This clashes with the "keycloak-bg.png' background defined on the body below.
   Therefore the Patternfly background must be set to none. */

/* For Z-ID Customize original is Keycloak theme */
.login-pf {
    background: none;
}

/*** Z-ID用背景設定 start ***/
.login-pf body {
    background: none;
    font-family: "Hiragino Kaku Gothic Pro", "Hiragino Kaku Gothic Pro W3", Osaka, Arial, Helvetica, sans-serif;

    background-color: #f0f3f8;

    background-size: cover;
    height: 100%;
}
/*** Z-ID用背景設定 end ***/

textarea.pf-c-form-control {
	height: auto;
}

/*** 部品の角を丸くする start ***/
/* アラート、インフォ等の表示領域角丸設定 */
div.pf-c-alert {
    border-radius: 4px;
    border-top: 0;
    margin-bottom: 10px;
}

/* 入力領域角丸設定 */
input.pf-c-form-control {
    border-radius: 6px;
    border-color: rgb(138, 141, 144);
    border-width: 1px;
    height: auto;

    /* プレースホルダーのための記載 */
    --pf-c-form-control--placeholder--Color: rgb(168, 171, 175);
    font-size: auto;
}

/* 入力エラー時の太下線表示を取消 */
.pf-c-form-control[aria-invalid=true] {
    border-bottom-width: 1px;
}

/* パスワード入力項目は右にボタン配置されるため右はradius 0にする */
/* input.pf-c-form-controlの角丸を上書きのため、後に設定する必要がある */
#password,
#password-confirm,
#password-new {
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
}

/* パスワード項目用の表示非表示ボタン角設定、左角角、右丸角 */
.pf-c-button.pf-m-control {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border: 1px solid rgb(138, 141, 144);
    padding-bottom: 4px;

    /* 元設定の取り消し */
    --pf-c-button--after--Border: 0px;
    --pf-c-button--after--BorderColor: transparent;
}

.pf-c-input-group {
    background-color: transparent;
}
/*** 部品の角を丸くする end ***/

.pf-c-alert__title {
    font-size: var(--pf-global--FontSize--xs);
}

p.instruction {
    margin: 5px 0;
}

/*** Formのテキスト start ***/

.pf-c-form__label-text {
    font-size: 14px;
}

.pf-c-form__helper-text {
    margin-left: 5px;
    color: #043491;
}

.zk-help-context-wrapper {
    text-align: end;
}

.zk-c-form__helper-bold-part {
    font-weight: bold;
}

h1#kc-page-title {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 18px;
    color: navy;
}
/*** Formのテキスト end ***/

#kc-locale ul {
    background-color: var(--pf-global--BackgroundColor--100);
    display: none;
    top: 20px;
    min-width: 100px;
    padding: 0;
}

#kc-locale-dropdown{
    display: inline-block;
}

#kc-locale-dropdown:hover ul {
    display:block;
}

#kc-locale-dropdown a {
    color: var(--pf-global--Color--200);
    text-align: right;
    font-size: var(--pf-global--FontSize--sm);
}

#kc-locale-dropdown button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--pf-global--Color--200);
    text-align: right;
    font-size: var(--pf-global--FontSize--sm);
}

button#kc-current-locale-link::after {
    content: "\2c5";
    margin-left: var(--pf-global--spacer--xs)
}

.login-pf .container {
    padding-top: 40px;
}

.login-pf a:hover {
    color: #0099d3;
}

#kc-logo {
    width: 100%;
}

/* いらないのでは
div.kc-logo-text {
    background-image: url(../img/keycloak-logo-text.png);
    background-repeat: no-repeat;
    height: 63px;
    width: 300px;
    margin: 0 auto;
}

div.kc-logo-text span {
    display: none;
}
*/

/*** Z-IDでは不要になったため隠す start ***/
#kc-header {
    color: #ededed;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 20px;
}

#kc-header-wrapper {
    visibility: hidden;
    font-size: 29px;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2em;
    padding: 62px 10px 0px;
    white-space: normal;
}
/*** Z-IDでは不要になったため隠す end ***/

#kc-content {
    width: 100%;
}

#kc-attempted-username {
    font-size: 20px;
    font-family: inherit;
    font-weight: normal;
    padding-right: 10px;
    padding-top: 20px;
    /*** 折り返し設定 ***/
    overflow-wrap: break-word;
}

#kc-username {
    text-align: center;
    margin-bottom:-10px;
}

#kc-webauthn-settings-form {
    padding-top: 8px;
}

#kc-form-webauthn .select-auth-box-parent {
    pointer-events: none;
}

#kc-form-webauthn .select-auth-box-desc {
    color: var(--pf-global--palette--black-600);
}

#kc-form-webauthn .select-auth-box-headline {
    color: var(--pf-global--Color--300);
}

#kc-form-webauthn .select-auth-box-icon {
    flex: 0 0 3em;
}

#kc-form-webauthn .select-auth-box-icon-properties {
    margin-top: 10px;
    font-size: 1.8em;
}

#kc-form-webauthn .select-auth-box-icon-properties.unknown-transport-class {
    margin-top: 3px;
}

#kc-form-webauthn .pf-l-stack__item {
    margin: -1px 0;
}

#kc-content-wrapper {
    margin-top: 20px;
}

#kc-form-wrapper {
    margin-top: 10px;
}

#kc-info {
    margin: 20px -40px -30px;
}

#kc-info-wrapper {
    font-size: 17px;
    color: #030303;
    margin: 10px;
    padding: 20px 30px 15px 30px;
    border-top: #b2c3da 1px solid;
    background-color: transparent
}

#kc-form-options span {
    display: block;
}

#kc-form-options .checkbox {
    margin-top: 0;
    color: #72767b;
}

#kc-terms-text {
    margin-bottom: 20px;
}

#kc-registration-terms-text {
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 5px;
}

#kc-registration {
    margin-bottom: 0;
}

/* TOTP */

.subtitle {
    text-align: right;
    padding-right: 0px;
    margin-top: 20px;
    color: #909090;
}

.required {
    color: var(--pf-global--danger-color--200);
}

ol#kc-totp-settings {
    margin: 0;
    padding-left: 20px;
}

ul#kc-totp-supported-apps {
    margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
    max-width:150px;
    max-height:150px;
}

#kc-totp-secret-key {
    background-color: #fff;
    color: #333333;
    font-size: 16px;
    padding: 10px 0;
}

/* OAuth */
/*** RP側の同意画面表示調整 start ***/
#kc-oauth h3 {
    margin-top: 0;
}

#kc-oauth ul {
    list-style: inside;
    padding: 0;
    margin: 0;
}

#kc-oauth ul li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    padding: 5px 0;
}

#kc-oauth ul li:first-of-type {
    border-top: 0;
}

#kc-oauth .kc-role {
    display: inline-block;
    width: 50%;
}
/*** RP側の同意画面表示調整 end ***/

/* Code */
#kc-code textarea {
    width: 100%;
    height: 8em;
}

/* Social */
.kc-social-links {
    margin-top: 20px;
}

.kc-social-links li {
    width: 100%;
}

.kc-social-provider-logo {
    font-size: 23px;
    width: 30px;
    height: 25px;
    float: left;
}

.kc-social-gray {
    color: var(--pf-global--Color--200);
}

.kc-social-gray h2 {
    font-size: 1em;
}

.kc-social-item {
    margin-bottom: var(--pf-global--spacer--sm);
    font-size: 15px;
    text-align: center;
}

.kc-social-provider-name {
    position: relative;
}

.kc-social-icon-text {
    left: -15px;
}

.kc-social-grid {
    display:grid;
    grid-column-gap: 10px;
    grid-row-gap: 5px;
    grid-column-end: span 6;
    --pf-l-grid__item--GridColumnEnd: span 6;
}

.kc-social-grid .kc-social-icon-text {
    left: -10px;
}

.kc-login-tooltip {
    position: relative;
    display: inline-block;
}

.kc-social-section {
    text-align: center;
}

.kc-social-section hr{
    margin-bottom: 10px
}

.kc-login-tooltip .kc-tooltip-text{
    top:-3px;
    left:160%;
    background-color: black;
    visibility: hidden;
    color: #fff;

    min-width:130px;
    text-align: center;
    border-radius: 2px;
    box-shadow:0 1px 8px rgba(0,0,0,0.6);
    padding: 5px;

    position: absolute;
    opacity:0;
    transition:opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
    visibility: visible;
    opacity:0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
    content: " ";
    position: absolute;
    top: 15px;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent black transparent transparent;
}

@media (min-width: 768px) {
    #kc-container-wrapper {
        position: absolute;
        width: 100%;
    }

    .login-pf .container {
        padding-right: 80px;
    }

    #kc-locale {
        position: relative;
        text-align: right;
        z-index: 9999;
    }

    /*** スマホ用に調整 start ***/
    .login-pf-page {
        padding-top: 0px;
    }

    .login-pf-page .card-pf {
        padding-top: 0px;
    }

    .login-pf-page .login-pf-header {
        margin-bottom: 0;
    }

    .form-group {
        margin-bottom: 5px;
    }
    /*** スマホ用に調整 end ***/
}

@media (max-width: 767px) {

    #kc-header {
        padding-left: 15px;
        padding-right: 15px;
        float: none;
        text-align: left;
    }

    /*** Z-ID用に調整 start ***/
    #kc-header-wrapper {
        display: none;
    }

    div.kc-logo-text {
        margin: 0;
        width: 150px;
        height: 32px;
        background-size: 80%;
    }

    div.kc-logo-text span {
        display: none;
    }
    /*** Z-ID用に調整 end ***/

    #kc-form {
        float: none;
    }

    #kc-info-wrapper {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background-color: transparent;
    }

    .login-pf .container {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    #kc-locale {
        position: absolute;
        width: 200px;
        top: 20px;
        right: 20px;
        text-align: right;
        z-index: 9999;
    }
}

@media (min-height: 646px) {
    #kc-container-wrapper {
        bottom: 12%;
    }
}

@media (max-height: 645px) {
    #kc-container-wrapper {
        padding-top: 50px;
        top: 20%;
    }
}

.card-pf form.form-actions .btn {
    float: right;
    margin-left: 10px;
}

#kc-form-buttons {
    margin-top: 20px;
    margin-bottom: 10px; /*** Z-ID追加 ***/
}

.login-pf-page .login-pf-brand {
    margin-top: 20px;
    max-width: 360px;
    width: 40%;
}

.select-auth-box-arrow{
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

.select-auth-box-icon{
    display: flex;
    flex: 0 0 2em;
    justify-content: center;
    margin-right: 1rem;
    margin-left: 3rem;
}

.select-auth-box-parent{
    border-top: 1px solid var(--pf-global--palette--black-200);
    padding-top: 1rem;
    padding-bottom: 1rem;
    cursor: pointer;
    text-align: left;
    align-items: unset;
    background-color: unset;
    border-right: unset;
    border-bottom: unset;
    border-left: unset;
}

.select-auth-box-parent:hover{
    background-color: #f7f8f8;
}

.select-auth-container {
    padding-bottom: 0px !important;
}

.select-auth-box-headline {
    font-size: var(--pf-global--FontSize--md);
    color: var(--pf-global--primary-color--100);
    font-weight: bold;
}

.select-auth-box-desc {
    font-size: var(--pf-global--FontSize--sm);
}

.select-auth-box-paragraph {
    text-align: center;
    font-size: var(--pf-global--FontSize--md);
    margin-bottom: 5px;
}

/*** カード表示 start ***/
.card-pf {
    margin: 0 auto;

    box-shadow: var(--pf-global--BoxShadow--sm);
    padding: 0 20px;
    max-width: 500px;
    border: 0px;
    border-radius: 12px;

    background-color: #ffffff;
}
/*** カード表示 end ***/

/*phone*/
@media (max-width: 767px) {
    .login-pf-page .card-pf {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-top: 0;
        border-top: 0;
        box-shadow: 0 0;
        /* モバイル時のフォーム角設定 */
        border-radius: 0;
    }

    .kc-social-grid {
        grid-column-end: 12;
        --pf-l-grid__item--GridColumnEnd: span 12;
    }

    .kc-social-grid .kc-social-icon-text {
        left: -15px;
    }
    /*** ***/
    .zk-info-reset-password {
        padding-left: 5px;
        font-size: 15px;
    }

    .zk-footer-group {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
    /*** ***/
}

.login-pf-page .login-pf-signup {
    font-size: 15px;
    color: #72767b;
}
#kc-content-wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.login-pf-page.login-pf-page-accounts {
    margin-left: auto;
    margin-right: auto;
}

.login-pf-page .btn-primary {
    margin-top: 0;
}

.login-pf-page .list-view-pf .list-group-item {
    border-bottom: 1px solid #ededed;
}

.login-pf-page .list-view-pf-description {
    width: 100%;
}

#kc-form-login div.form-group:last-of-type,
#kc-register-form div.form-group:last-of-type,
#kc-update-profile-form div.form-group:last-of-type,
#kc-update-email-form div.form-group:last-of-type{
    margin-bottom: 0px;
}

.no-bottom-margin {
    margin-bottom: 0;
}

#kc-back {
    margin-top: 5px;
}

/* Recovery codes */
.kc-recovery-codes-warning {
    margin-bottom: 32px;
}
.kc-recovery-codes-warning .pf-c-alert__description p {
    font-size: 0.875rem;
}
.kc-recovery-codes-list {
    list-style: none;
    columns: 2;
    margin: 16px 0;
    padding: 16px 16px 8px 16px;
    border: 1px solid #D2D2D2;
}
.kc-recovery-codes-list li {
    margin-bottom: 8px;
    font-size: 11px;
}
.kc-recovery-codes-list li span {
    color: #6A6E73;
    width: 16px;
    text-align: right;
    display: inline-block;
    margin-right: 1px;
}

.kc-recovery-codes-actions {
    margin-bottom: 24px;
}
.kc-recovery-codes-actions button {
    padding-left: 0;
}
.kc-recovery-codes-actions button i {
    margin-right: 8px;
}

.kc-recovery-codes-confirmation {
    align-items: baseline;
    margin-bottom: 16px;
}

#certificate_subjectDN {
    overflow-wrap: break-word
}


/*** 右三角アイコン start ***/
.arrow {
    position: relative;
    display: inline-block;
    padding: 0 0 0 16px;
    vertical-align: middle;
    text-decoration: none;
    font-size: 15px;
}

.arrow::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1px;
    margin: auto;
    content: "";
    vertical-align: middle;

    box-sizing: border-box;
    width: 20px;
    height: 6px;
    border: 8px solid transparent;
    border-left: 10px solid #4f84C3;
}
/*** 右三角アイコン end ***/

/*** Z-ID用追加設定 end ***/
/* ログ位置 */
.zk-logo-wrapper {
    margin-top: 20px;
    text-align: center;
}

/* formの中のActionボタン領域用設定 */
form.form-actions {
    display: flex;
    justify-content: center;
}

div.form-actions {
    display: flex;
    justify-content: center;
}

/* Z-ID用追加スタイル */
.zk-primary-button {
    background-color: #043491;
    color: #ffffff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
}

.zk-default-button {
    border-radius: 30px;
    font-size: 16px;
}

.zk-small-button {
    width: 120px;
    padding-left: 10px;
    padding-right: 10px;
}

.zk-url-list-content {
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 16px;
}

.zk-oauth-accept {
    font-size: 14px;
    padding: 10px 0px 20px 30px;
}

.zk-info-reset-password {
    padding-left: 5px;
    padding-right: 5px;
}

.zk-confirm-text {
    margin-bottom: 20px;
}

.zk-check_label {
    margin-top: 4px;
    font-size: 14px;
}

.zk-info {
    font-size: 14px;
    text-align: left;
}

.control-label-notice {
    color: rgb(114, 118, 123);
    font-weight: normal;
}

#kc-page-title p {
    color: navy;
}

.zk-c-title {
    font-size: small;
    padding: 0px 10px;
    margin: 2px 5px;
    max-width: 90%;
    border: solid lightgray 1px;
    border-radius: 5px;
}

.zk-c-tile_title {
    padding: 5px;
    line-break: anywhere;
    text-align: left;
}

.zk-login-otp-form-group {
    padding: 10px 0;
}

.zk-input-error {
    text-align: center;
    font-size: larger;
    padding-bottom: 20px;
}

.zk-logo-wrapper {
    margin-top: 20px;
    text-align: center;
}

.link-icon {
    margin-right: 2px;
}

.right-arrow-icon {
    margin-right: 2px;
    transform: rotate(90deg);
}

/** password visibility button **/
.visibility-button {
    border: solid rgb(138, 141, 144) 1px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    background-color: white;
}

/** eye icon **/
.visibility-eye-icon-link {
    padding: 10px 30px 15px 0;
    background-color: transparent;
    background-position: center;
    background-size: 25px;
    background-repeat: no-repeat;

    &.on {
        background-image: url("../img/pw-on.svg");
    }

    &.off {
        background-image: url("../img/pw-off.svg");
    }
}
/*** Z-ID用追加設定 end ***/

/*** Footer表示 start ***/
.zk-footer-group {
    max-width: 500px;
    margin: 5px auto;
    text-align: right;
    font-size: 13px;
}

.zk-footer-content {
    margin-right: 15px;

    a {
        text-decoration: none;
    }
}
/*** Footer表示 end ***/

/* End Recovery codes */
