@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Poppins:wght@500&display=swap');

:root {
    --grey-UPV-light: #5C6368;
    --grey-UPV: #424A50;
    --grey-UPV-dark: #3F4444;
    --grey-dark: #5B5B5B;
    --grey-medium: #CFCFCF;
    --grey-light: #F1F1F1;
    --black: #111111;
    --white: #FFFFFF;
    --red: #E5554F;
    --red-dark: #D73333;
    --red-darkest: #A40E0E;
    --yellow: #FFD100;
    --yellow-dark: #FAA500;
    --yellow-darkest: #92540C;

    --color-light: var(--grey-light);
    --color-dark: var(--red-dark);
    --color-shadow: var(--grey-UPV-dark);
    --color-highlight: var(--red);
    --focus-outline: 2px solid var(--grey-UPV-light);
    --focus-outline-visible: 5px solid var(--color-highlight);
}

html {
    margin: 0px 0px 0px 0px;
    padding: 0px;
}

body {
    font-family: "Inter", sans-serif;
    margin: 0px 0px 0px 0px;
    padding: 0px;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "header" "main" "footer";
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Poppins', sans-serif;
}

h1 {
    font-size: 70px;
}

h2 {
    font-size: 50px;
}

h3 {
    font-size: 34px;
}

p,input,select,button,a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: var(--black);
    zoom: 80%;
}

main {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

main:has(form.login-form) {
    display: grid;
    place-items: center;
}

/* Cabecera */
header {
    display: flex;
    flex-direction: column;
}

header > .header-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 2px;
}

header > .header-title i.logo {
    display: block;
    width: 170px;
    height: 52px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-image: url(https://www.upv.es/imagenes/svg/logo-upv.svg);
}

header > .header-title i.logo-mobile {
    display: none;
}

header > .header-title > h1 {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--black);
}

header > .header-title > div.slash {
    display: block;
    width: 2px;
    height: 60px;
    background-color: var(--grey-medium);
    transform: rotate(30deg);
    margin-left: 30px;
    margin-right: 30px;
}

nav.lang-selector {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: var(--grey-UPV-dark);
    padding: 4px;
}

nav.lang-selector > a {
    font-size: 1.2em;
    text-decoration: none;
    color: #D9D9D9;
    transition: all 200ms ease-in-out;
    text-transform: uppercase;
    font-size: 0.7em;
}

header > a {
    margin: 20px;
}

header > nav.breadcrumbs {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 4px;
    background-color: var(--grey-medium);
}

/* Formulario Login */
.login-form {
    display: grid;
    place-items: center;
    width: 500px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 50px;
    border: none;
    box-shadow: 0 2px 8px 0 rgba(7, 18, 37, 0.2);
}

.login-form h2 {
    color: var(--black);
    font-size: 20px;
    text-align: center;
    margin: 10px;
}

.login-form h3 {
    color: var(--black);
    font-size: 1.2em;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    margin: 6px;
}

.login-form h3 hr {
    flex-grow: 1;
    height: 1px;
    border: 0px;
    background-color: var(--grey-medium);
}

.login-form h4 {
    color: var(--black);
    font-size: 14px;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}

.login-form form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%
}

#login-form-controls {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
}

#heroimg {
    width: 100%;
}

.login-form .login-input {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    background-color: white;
    width: 100%;
    border-radius: 6px;
    padding: 0px 0px 0px 10px;
    box-sizing: border-box;
    box-shadow: 0px 0px 3px 0px var(--color-shadow);
    transition: all 200ms ease-in-out;
    position: relative;
    margin-top: 5px;
}

.login-input .input-label {
    position: absolute;
    /* top: 13px;
    left: 44px; */
    font-size: 0.8em;
    top: -7px;
    left: 8px;
    padding: 0 5px;
    background-color: white;
    pointer-events: none;
    transition: all 150ms ease-in-out;    
}

.login-input .input-label:has( ~ label input:not(:focus):invalid:not(:autofill)  ) {    
    top: 13px;
    left: 44px;
    font-size: 14px;
}

/* .login-input .input-label:has( ~ label input:focus),
.login-input .input-label:has( ~ label input:not(:invalid)),
.login-input .input-label:has( ~ label input:autofill) {
    font-size: 0.8em;
    top: -7px;
    left: 8px;
} */

.login-form .login-input label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    width: 100%;
}
.login-form .login-input button {
    margin: 0;
    padding: 0;
}

.login-form fieldset {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 0px;
    width: 100%;
    gap: 10px;
    margin: 0;
    padding: 0;
}

a {
    font-size: 14px;
    color: var(--grey-UPV-dark);
    transition: all 50ms ease-in-out;
}

a:hover {
    cursor: pointer;
    transform: scale(1.02);
}

.login-form fieldset a {
    text-decoration: none;
    transition: all 200ms ease-in-out;
    text-wrap: nowrap;
    text-decoration: underline;
}

/* .login-form form button, */
.login-form button {
    cursor: pointer;
    width: 100%;
    min-height: 54px;
    padding: 5px 10px 5px 10px;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5em;
    /* border-radius: 10px; */
    border-radius: 0;
    border: 0;
    background-color: var(--color-dark);
    color: white;
    stroke: white;
    box-shadow: 0px 0px 3px 0px var(--color-shadow);
    transition: all 100ms ease-in-out;
}

/* .login-form form button:hover, */
.login-form button:hover {
    transform: scale(1.01);
    background-color: var(--red-darkest);
}

/* .login-form form button:active, */
.login-form button:active {
    transform: scale(0.99);
}

/* .login-form form button:focus,
.login-form button:focus {
    outline: var(--focus-outline);
} */

/* .login-form form button:focus-visible, */
.login-form button:focus-visible {
    /* outline: var(--focus-outline-visible); */
    outline: 2px dashed var(--grey-UPV-dark);  
    outline-offset: 2px;
}


.login-form button.btn-secondary {
    background-color: var(--white);        
    color: var(--color-dark);
    box-shadow: 0px 0px 3px 0px var(--color-dark);
    stroke: var(--color-dark);
}
.login-form button.btn-secondary:hover {
    background-color: var(--color-dark);        
    color: var(--white);
    box-shadow: 0px 0px 3px 0px var(--color-shadow);
    stroke: var(--white);
}

.login-form button.btn-secondary:focus-visible {    
    outline: 2px dashed var(--grey-UPV-dark);  
    outline-offset: 2px;
}

.login-form form button > svg,
.login-form button > svg {
    width: 30px;
    box-sizing: border-box;
    /* stroke: white; */
    stroke: inherit;
}

.login-form .login-input > button,
.login-form .login-input > a.button {
    cursor: pointer;
    background: var(--grey-UPV-dark);
    border-radius: 0px 6px 6px 0px;
    border: 0;
    transition: all 150ms linear;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    margin: 0px;
    padding: 0;
}

.login-form .login-input > button:hover {
    background: var(--red-dark);
}

.login-form .login-input > button:active {
    background: var(--red);
}

.login-form .login-input > button:focus-visible,
.login-form .login-input > a.button:focus-visible {
    outline: var(--focus-outline-visible);
    outline-offset: 2px;
}

.login-form .login-input > button svg {
    /* stroke: white; */
    stroke: inherit;
    width: 50%;
}

.login-form .login-input:has(input:focus-visible,select:focus-visible) {
    outline: var(--focus-outline-visible);
}

.login-form #authnSourceSection label > select {
    width: 200px;
}

.login-form label > input,select {
    margin-right: 10px;
    background: transparent;
    border: 0;
    color: var(--grey-UPV-light);
    flex-grow: 1;
    min-height: 44px;
}

.login-form label > input:focus,select:focus {
    outline: 0;
}

.login-form label > svg {
    width: 30px;
    stroke: var(--grey-UPV-dark);
}

.login-form article {
    color: var(--grey-dark);
    font-size: 14px;
    text-align: justify;
    margin-top: 5px;
    width: 90%;
}


/* Formulario M2F:gauth */
.login-gauth {
    width: 750px;
}

.login-gauth p {
    color: var(--grey-dark);
    font-size: 14px;
}
.login-gauth .account-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.login-gauth .account-info img {
    border-radius: 10px;
    box-shadow: 0px 0px 3px 0px var(--color-shadow);
}


.login-gauth #seckeypanel {
    margin-top: .5rem;
    margin-bottom: .5rem;
}

.login-gauth #seckeypanel pre {
    text-align: center;
    gap: 5px;
    background-color: white;
    width: 100%;
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0px 0px 3px 0px var(--color-shadow);
    color: var(--color-dark);
}

.login-gauth .codes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.login-gauth .codes .chip {
    text-align: center;
    background-color: white;
    border-radius: 6px;
    padding: 2px;
    box-sizing: border-box;
    box-shadow: 0px 0px 3px 0px var(--color-shadow);
    color: var(--color-dark);
}
.login-gauth .codes .chip span {
    font-size: 0.75rem;
    margin: 0 2px;
    vertical-align: middle;
}

.button-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0;
}

.button-bar button {
    cursor: pointer;
    /* width: 100%; */
    padding: 5px 10px 5px 10px;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    border-radius: 0;
    border: 0;
    background-color: var(--color-dark);
    color: white;
    stroke: white;
    box-shadow: 0px 0px 3px 0px var(--color-shadow);
    transition: all 100ms ease-in-out;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    /* text-transform: uppercase; */
    min-width: 150px;
}
.button-bar button svg {
    width: 32px;
    height: 32px;
    /* stroke: white; */
    stroke: inherit;
}

.button-bar button:hover {
    transform: scale(1.01);
}

.button-bar button:active {
    transform: scale(0.99);
}

.button-bar button:focus-visible {
    /* outline: var(--focus-outline-visible); */
    outline: 2px dashed var(--grey-UPV-dark);  
    outline-offset: 2px;

}

#sidebar {
    display: flex;
    justify-content: space-around;
    flex-direction: column;
}

.login-info {
    /* color: var(--red-darkest) !important; */
    background: var(--white);
    border: none;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    text-align: center;
    border-radius: 7px;
    margin: 0px;
}

.login-error {
    color: var(--red-darkest);
    background: var(--white);
    border: 2px solid var(--red-darkest);
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    text-align: center;
    border-radius: 7px;
    margin: 0px;
    opacity: 0;
    pointer-events: none;
    margin-top: -51px;
    transition: all 100ms ease-out;
}

.login-error.visible {
    opacity: 1;
    margin-top: 0px;
    animation: shake;
    --animation-amplitude: 5px;
    --animation-scale: 1.1;
    animation-duration: 400ms;
}

@keyframes shake {
    0% { transform: translateX(0) scale(var(--animation-scale)); }
    20% { transform: translateX(calc(-1 * var(--animation-amplitude)))  scale(var(--animation-scale)); }
    40% { transform: translateX(var(--animation-amplitude))  scale(var(--animation-scale)); }
    60% { transform: translateX(calc(-1 * var(--animation-amplitude)))  scale(var(--animation-scale)); }
    80% { transform: translateX(var(--animation-amplitude))  scale(var(--animation-scale)); }
    100% { transform: translateX(0) scale(1.0); }
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--grey-UPV-dark);
}

footer > .logo {
    display: block;
    width: 210px;
    margin-top: 20px;
    margin-bottom: 10px;
}

footer a,
footer p,
footer h1,
footer h2,
footer h3,
footer h4,
footer h5 {
    color: white;
}

footer i > svg {
    stroke: var(--red-dark);
    width: 22px
}

footer section {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

footer section > span {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--white);
}

@media (max-width: 750px) {
    main:has(.login-gauth){
        width: 100%;
        background-color: var(--color-light);
        margin: 0;
    }

    .login-gauth {
        width: 100%;
        border-radius: 0px;
    }
    .login-gauth .account-info {
        flex-direction: column;
    }

    .button-bar {
        flex-direction: column;
        width: 75%;
    }
}
@media (max-width: 600px) {
    header > .header-title i.logo {
        display: none;
    }

    header > .header-title i.logo-mobile {
        display: block;
        width: 100px;
    }

    header > .header-title > div.slash {
        display: none;
    }

    main {
        width: 100%;
        background-color: var(--color-light);
        margin: 0;
    }

    
    section.login-form {
        width: 100%;
        border-radius: 0px;
    }
    
    form {
        width: 80%;
    }

    .login-form fieldset {
        flex-direction: column;
        gap: 10px;
    }

    header > .header-title > h1 {
        font-size: 14px;
    }

    footer section {
        flex-direction: column;
        gap: 0px;
    }
    footer section > span {
        font-size: 10px;
        gap: 2px;
    }

    footer section > span > i > svg {
        width: 15px;
    }

    /* hr {
        display: none;
    } */
}




.alert-danger {
    color: var(--red-darkest);
    background: var(--white);
    border: 2px solid var(--grey-UPV-dark);
    box-sizing: border-box;
    padding: 10px;
    text-align: center;
    border-radius: 7px;
    margin: 0px;
    opacity: 0;
    pointer-events: none;
    margin-top: -51px;
    transition: all 100ms ease-out;
    opacity: 1;
    margin-top: 0px;
}

.alert-danger > h2 {
    color: var(--red-darkest);
}

.alert-danger > p {
    color: var(--grey-UPV-light);
}



/* */
/* Formulario */
.success-view {
    display: grid;
    max-width: 80%;
    padding: 40px;
    background-color: var(--color-light);
    border-radius: 10px;
    margin-bottom: 50px;
}

.success-view h2 {
    color: var(--black);
    font-size: 22px;
    text-align: center;
}

.success-view p {
    color: var(--black);
    font-size: 17px;
}

.w-full {
    width: 100%;
}

@media print
{    
    .no-print, .no-print *
    {
        display: none !important;
    }
}


dialog::backdrop {
    background-color: #a4a4a4;
    opacity: 0.75;
}

dialog {
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
    padding: 10px;
    max-width:560px;
}


dialog h1 {
    font-size: 1.5em;
    margin: 0;
}

dialog p {
    text-align: justify;
    margin: 10px 20px;
}

/* var(--grey-dark); */

input:autofill,input:-webkit-autofill
{
    -webkit-text-fill-color: var(--grey-UPV-dark) !important;
    box-shadow: inset 0 0 20px 20px ghostwhite;
    /* font-size: 20px; */
    /* -webkit-background-clip: text; */
}

p.MFA_reg_title {
    font-size: 18px;
    color: darkslategray;
}

button:disabled,
button[disabled]{
  background-color: #cccccc;
}


.eidp-list {
    display: flex;
    flex-direction: column;
    gap: 2px;    
    width: 100%;
}

.eidp-button {
    height: 54px;
}


/* Tooltip */
.tooltip {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
  
    /* Position the tooltip text */
    position: absolute;
    z-index: 1;
    bottom: 125%;
    /* left: 50%;
    margin-left: -60px; */
  
    /* Fade in tooltip */
    opacity: 0;
    transition: opacity 0.3s;
}


/* Tooltip container */
.tooltip-container {
    position: relative;
    display: inline-block;    
    width:100%;
}

/* Tooltip text */
.tooltip-container .tooltip {
    visibility: hidden;
    width: 80%;
    min-width: 300px;
    background-color: var(--grey-UPV-dark);
    border: var(--grey-UPV-light) solid 1px;
    color: var(--grey-light);
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
  
    /* Position the tooltip text */
    position: absolute;
    z-index: 1;
    bottom: 125%;
    /* left: 50%;
    margin-left: -60px; */
  
    /* Fade in tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    transition-delay: 1s;
}

/* Tooltip arrow */
.tooltip-container .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--grey-UPV-light) transparent transparent transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

#x509Login {
    margin-top: 10px;
}

#sidebar > .separator {
    margin-bottom: 10px;
}

.need-help {
    text-align: center;
    margin: 5px 0 5px 0;

    & > a {
        font-size: 17px;
    }
}

.separator {
    height: 2px;
    background-color: var(--grey-UPV-dark);
    border-radius: 1px;
    margin: 20px -20px 15px -20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

label#expirationField {
    max-width: 50px;
}