/* ============================================================
   Authentication Page Layout
============================================================ */

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    padding: 20px 0;
}

.authentication-container {
    padding: 0 40px;
    text-align: center;
}

/* ============================================================
   Form Containers
============================================================ */

.authentication-form-container,
.authentication-form {
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

.authentication-form-container {
    width: 400px;
    padding: 20px;

    border: 1px solid #cccccc;
    border-radius: 15px;
}

.logo-container {
    display: flex;
    justify-content: center;

    margin-bottom: 10px;
}

/* ============================================================
   Inputs & Upload
============================================================ */

.input {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 20px;
    text-align: left;

    border: 1px solid #cccccc;
    border-radius: 10px;
}

.input input {
    flex: 1;
    min-width: 0;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    border-radius: 10px;
}

.upload-area {
    display: block;
    width: 100%;
    height: 100%;
    padding: 40px;

    cursor: pointer;
    text-align: center;

    font-weight: var(--font-weight-bold);

    border: 4px dashed var(--brand-yellow);
    border-radius: 15px;
    background-color: rgba(255, 221, 0, 0.4);
}

.form-button {
    width: 100%;
}

.auth-link {
    color: #222222;
    text-decoration-thickness: 2px;
}

/* ============================================================
   Legal Text
============================================================ */

.legal {
    font-size: 14px;
    color: #999999;
    text-align: center;
}

.legal-link {
    color: #999999;
    text-decoration-thickness: 2px;
}

/* ============================================================
   Form Messages
============================================================ */

.form-message {
    text-align: center;
}

.form-message.success {
    color: #41a67e;
}

.form-message.error {
    color: #ff3838;
}

/* ============================================================
   Toggle Switch
============================================================ */

.form-toggle {
    position: relative;
    display: flex;
    align-items: center;

    width: 100%;
    margin: 0 auto;
    padding: 5px;

    background-color: #f3f3f3;
    border-radius: 10px;
}

.toggle-button {
    position: relative;
    flex: 1;
    padding: 10px 20px;

    background: none;
    border: none;
    border-radius: 10px;
}

.toggle-button.active {
    color: #ffffff;
}

.toggle-indicator {
    position: absolute;
    top: 5px;
    left: 5px;

    width: calc(50% - 4px);
    height: calc(100% - 10px);

    background-color: #222222;
    border-radius: 10px;

    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-toggle.register .toggle-indicator {
    transform: translateX(100%);
}

/* ============================================================
   Conditional Visibility
============================================================ */

[data-visible-when] {
    display: none;
}

.authentication-form-container[data-mode='register']
[data-visible-when='register'] {
    display: block;
}

/* ============================================================
   Responsive
============================================================ */

@media (max-width: 768px) {
    .authentication-container {
        width: 100%;
        padding: 0 20px;
    }

    .authentication-form-container {
        width: 100%;
        margin: 0 auto;
    }
}