html,
body {
    margin: 0;
}

body {
    background-color: white;
    font-family: "Albert Sans";
    padding-block: 3em;
}

.bold {
    font-weight: bold;
}

h1 {
    font-size: 3em;
}

#title {
    margin-inline: auto;
}

#title h1,
#title p {
    text-align: center;
}

#title h1 {
    margin: 0;
}

#title p {
    font-size: 1.3em;
}

form {
    background-color: white;
    border-radius: 20px;
    padding: 3%;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 35%;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

form input {
    padding: 0.6em 0.75em;
    border: 1px solid lightgray;
    border-radius: 10px;
    box-sizing: border-box;
}

form input:disabled {
    background-color: #f0f0f0;
    color: #aaa;
    border-color: #d0d0d0;
    cursor: not-allowed;
}

.form_row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1em;
}

.form_field {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5em;
}

.form_row .form_field {
    min-width: 0;
}

label {
    align-self: start;
}

#flickr_url_title {
    margin: 0;
}

#flickr_url_subtitle {
    margin-top: 0;
    color: gray;
    font-size: 0.8em;
}

#flickr_url {
    width: 100%;
}

#flickr_url:disabled {
    color: #737373;
}

#flickr_url.flickr_auth_required {
    border: 2px solid #F23047;
    box-shadow: 0 0 0 3px rgba(242, 48, 71, 0.15);
}

#flickr_url,
#files_username,
#files_password {
    font-size: 1.1em;
}

#files_username,
#files_password {
    width: 100%;
}

#authorize_btn {
    background-color: white;
    border: 0;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translate(0, -50%);
    font-weight: bold;
    color: #407FF2;
}

#flickr_authorized_check {
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translate(0, -50%);
}

#authorize_btn:hover,
#authorize_btn:active {
    cursor: pointer;
    color: #0f56d7;
}

#url_input {
    display: flex;
    position: relative;
}

hr {
    width: 100%;
    border: none;
    border-top: 1px solid #eee;
}

#buttons {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

#migrate_btn {
    display: none;
    font-size: 1.2em;
    font-weight: 600;
    padding: 1%;
    margin-inline: auto;
    color: white;
    background-color: gray;
    border: 1px solid gray;
    border-radius: 12px;
    background-color: darkgray;
    cursor: wait;
}


#migration_in_progress_msg {
    display: none;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    margin-inline: auto;
    color: black;
    animation: migration_in_progress_pulse 3s ease-in-out infinite;
}

@keyframes migration_in_progress_pulse {

    0%,
    40%,
    100% {
        color: black;
    }

    70% {
        color: #eee;
    }
}


#migrate_control_btns {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

#toggle_migrate_btn,
#cancel_migrate_btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    cursor: pointer;
    font-size: 0.85em;
    border: 1px solid lightgray;
    border-radius: 8px;
    padding: 0.5em 1em;
}

.toggle_icon {
    flex-shrink: 0;
}

#cancel_migrate_btn {
    color: #F23047;
    border-color: #F23047;
}

#progress_bar_container {
    border: 1px solid lightgray;
    border-radius: 10px;
    padding: 1.25em 1.5em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

#progress_bar_header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

#migrated_percentage {
    color: #407FF2;
    font-size: 1.3em;
    font-weight: 700;
}

#files_downloaded_msg {
    font-size: 0.85em;
    color: black;
}

#progress_bar_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5em;
}

#speed_metric {
    font-size: 0.85em;
    color: black;
}

.progress_bar {
    height: 25px;
    border-radius: 20px;
}

#progress_bar_front {
    background-color: #407FF2;
    width: 0%;
}

#progress_bar_back {
    background-color: #EFEFEF;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    margin-inline: auto;
}

#please_wait {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1em;
    margin-inline: auto;
    font-size: 1.2em;
    display: none;
}

#please_wait img {
    width: 10%;
    height: 10%;
    align-self: center;
}

.red {
    color: #F23047;
}

.blue {
    color: #407FF2;
}

.lightgray {
    color: #848884;
}

.bold {
    font-weight: bold;
}

#success_msg,
#progress_msg,
#pause_msg {
    text-align: center;
    font-size: 1.2em;
    display: none;
}

#new_migration_btn {
    display: none;
    font-size: 1.2em;
    font-weight: 600;
    padding: 1%;
    margin-block-start: 1em;
    margin-inline: auto;
    color: white;
    background-color: #F23047;
    border: 1px solid #F23047;
    border-radius: 12px;
    cursor: pointer;
}

#total_files_msg {
    font-size: 1.2em;
}

#progress {
    width: 100%;
    display: none;
    flex-direction: column;
}

#main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2em;
}

#how_to {
    align-self: center;
}

#migration_debug {
    width: calc(100% - 4rem);
    max-width: none;
    margin-inline: auto;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    padding: 1em;
    background-color: #FCFCFC;
}

#migration_debug h2 {
    margin-top: 0;
    margin-bottom: 0.4em;
    font-size: 1.4em;
}

#debug_hint {
    color: #666;
    margin-top: 0;
}

#debug_logs {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    max-height: 280px;
    overflow-y: auto;
}

.debug_log_item {
    font-family: monospace;
    font-size: 0.9em;
    border-left: 3px solid #407FF2;
    padding-left: 0.6em;
    white-space: pre-wrap;
}

.debug_error {
    border-left-color: #F23047;
}

.debug_warning {
    border-left-color: #d98d00;
}

.debug_duration_slow {
    color: #F23047;
    font-weight: 700;
}

nav {
    padding: 1%;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#nav_with_hr {
    position: sticky;
    top: 0;
    background-color: white;
}

#track_migrations {
    color: black;
    text-decoration: none;
    font-size: 1.5em;
    transition: all ease 0.2s;
    background-color: white;
}

#track_migrations:visited {
    color: black;
    text-decoration: none;
}

#track_migrations:hover {
    transform: scale(1.05);
}

#script_progress_msgs {
    display: flex;
    flex-direction: row;
    gap: 1em;
    margin-bottom: 1em;
}

.stat_block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    background-color: #F1F6FE;
    border-radius: 10px;
    padding: 0.75em 1em;
}

.stat_label {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.stat_value {
    font-size: 1.3em;
    font-weight: 600;
}

#script_progress {
    width: 40%;
    margin-inline: auto;
    display: none;
    flex-direction: column;
}


@media screen and (max-width: 800px) {

    /* Mobile design */
    form {
        width: 80%;
    }

    nav {
        flex-direction: column;
    }

    #script_progress_msgs {
        flex-direction: column;
    }

    #script_progress {
        width: 80%;
    }

    #script_progress_msgs {
        flex-direction: column;
    }

    .form_row {
        flex-direction: column;
    }

    .form_row .form_field {
        width: 100%;
    }

    #migration_debug {
        width: calc(100% - 2rem);
    }


}
