/* ----------------------------------------------------------------
   Educational UI clone of Google's sign-in page (static HTML/CSS).
   No backend / no credential capture — purely a frontend exercise.
------------------------------------------------------------------ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Google Sans", Roboto, Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f1f4f9;
    color: #202124;
}

/* ---- layout ---- */
.main_container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* card + footer travel together, centered as one group */
.page {
    width: 100%;
    max-width: 984px;
    display: flex;
    flex-direction: column;
}

.card {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 984px;
    border-radius: 24px;
    background: #fff;
    padding: 56px 56px 40px;
}

.card-left {
    flex: 0 0 52%;
    padding-right: 24px;
}

.card-right {
    flex: 1;
    padding-left: 24px;
}

/* ---- header (logo + titles) ---- */
.brand-link {
    display: inline-block;
    line-height: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    display: block;
}

.title {
    margin-top: 20px;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0;
}

.subtitle {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

/* ---- recovery screen text ---- */
.recovery-text {
    font-size: 14px;
    line-height: 1.5;
    color: #3c4043;
    margin-bottom: 16px;
}

.recovery-text:first-child {
    margin-top: 4px;
}

.inline-link {
    display: inline;
    margin: 0;
    padding: 0;
    font-weight: 400;
}

.inline-link:hover {
    background: transparent;
    text-decoration: underline;
}

/* ---- account chip (password screen) ---- */
.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 5px 12px 5px 8px;
    border: 1px solid #dadce0;
    border-radius: 18px;
    font-size: 14px;
    color: #3c4043;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.account-chip:hover {
    background: #f7f8f8;
    border-color: #d2d5d9;
}

.account-chip[hidden] {
    display: none;
}

.account-icon {
    width: 20px;
    height: 20px;
}

.account-caret {
    width: 18px;
    height: 18px;
}

/* ---- Material outlined text field with floating label ---- */
.text-field {
    position: relative;
    margin-top: 32px;
}

.text-field input {
    width: 100%;
    height: 52px;
    padding: 13px 15px;
    font-size: 14px;
    color: #202124;
    border: 1px solid #202124;
    border-radius: 4px;
    outline: none;
    background: #fff;
}

.text-field input:hover {
    border-color: #202124;
}

.text-field input:focus {
    border: 2px solid #1a73e8;
    padding: 12px 14px;
}

.text-field label {
    position: absolute;
    left: 12px;
    top: 15px;
    padding: 0 4px;
    font-size: 14px;
    color: #3c4043;
    background: #fff;
    pointer-events: none;
    transition: top .1s ease, font-size .1s ease, color .1s ease;
}

.text-field input:focus + label,
.text-field input:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 12px;
}

.text-field input:focus + label {
    color: #1a73e8;
}

.text-field input:not(:focus):not(:placeholder-shown) + label {
    color: #5f6368;
}

/* ---- links / text buttons ---- */
.link {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 8px;
    margin-left: -8px;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.link:hover {
    background: rgba(26, 115, 232, .04);
}

.guest {
    margin-top: 28px;
    font-size: 13px;
    line-height: 1.4286;
    color: #5f6368;
}

.guest .link {
    margin-top: 0;
    margin-left: 0;
    padding: 0;
}

.guest .link:hover {
    background: transparent;
    text-decoration: none;
}

/* ---- show-password row ---- */
.show-pass {
    display: flex;
    align-items: center;
    margin-top: 16px;
    font-size: 14px;
    color: #202124;
}

.show-pass input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: #1a73e8;
    cursor: pointer;
}

/* ---- action buttons ---- */
.actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
}

.btn-text {
    padding: 9px 8px;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-text:hover {
    background: rgba(26, 115, 232, .04);
}

/* ---- "Create account" dropdown ---- */
.create-wrap {
    position: relative;
}

.create-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 248px;
    padding: 8px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3),
                0 2px 6px 2px rgba(60, 64, 67, .15);
    z-index: 20;
}

.create-menu[hidden] {
    display: none;
}

.create-item {
    display: block;
    padding: 12px 24px;
    font-size: 14px;
    color: #202124;
    text-decoration: none;
    white-space: nowrap;
}

.create-item:hover {
    background: #f1f3f4;
}

.btn-filled {
    padding: 10px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    background: #2b4fb5;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: box-shadow .2s ease, background .2s ease;
}

.btn-filled:hover {
    background: #243f93;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3),
                0 1px 3px 1px rgba(60, 64, 67, .15);
}

/* ---- footer (language + links) ---- */
.page-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 4px 0;
    font-size: 12px;
    color: #5f6368;
}

.page-footer select {
    border: none;
    background: transparent;
    color: #5f6368;
    font-size: 12px;
    padding: 8px;
    cursor: pointer;
}

.footer-links a {
    margin-left: 12px;
    padding: 8px;
    color: #5f6368;
    text-decoration: none;
}

.footer-links a:hover {
    color: #202124;
}

/* ---- responsive ---- */
@media (max-width: 600px) {
    .card {
        flex-direction: column;
        max-width: 448px;
        border-radius: 8px;
        padding: 48px 40px 36px;
    }

    .card-left,
    .card-right {
        padding: 0;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        margin-top: 8px;
    }

    .card-right .text-field {
        margin-top: 24px;
    }
}

/* on desktop the input drops to line up with the "Sign in" title, not the logo */
.card-right .text-field:first-child {
    margin-top: 52px;
}

/* password screen has an extra account chip on the left, so the field sits lower */
.page-password .card-right .text-field:first-child {
    margin-top: 92px;
}

/* ---- indeterminate loading bar (Material style, pinned to the card's top edge) ---- */
.card-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;                 /* tall enough to clip cleanly to the card's 24px corner */
    overflow: hidden;
    pointer-events: none;
    /* same radius as the card, so the bar follows the corner curve instead of poking past it */
    border-radius: 24px 24px 0 0;
    /* light track, painted only as a 3px strip pinned to the very top */
    background: linear-gradient(#e8f0fe, #e8f0fe) 0 0 / 100% 3px no-repeat;
}

.card-progress[hidden] {
    display: none;
}

/* two blue segments slide across, offset in time — the classic Google look */
.card-progress::before,
.card-progress::after {
    content: "";
    position: absolute;
    top: 0;
    height: 3px;
    background: #1a73e8;
    will-change: left, right;
}

.card-progress::before {
    animation: cf-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

.card-progress::after {
    animation: cf-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    animation-delay: 1.15s;
}

@keyframes cf-indeterminate {
    0%   { left: -35%;  right: 100%; }
    60%  { left: 100%;  right: -90%; }
    100% { left: 100%;  right: -90%; }
}

@keyframes cf-indeterminate-short {
    0%   { left: -200%; right: 100%; }
    60%  { left: 107%;  right: -8%; }
    100% { left: 107%;  right: -8%; }
}

/* while the bar runs, the form reads as "busy" */
.card.is-loading .card-right {
    opacity: .6;
    pointer-events: none;
}

.card.is-loading .text-field input {
    background: #f8f9fa;
}
