/*
MAHLIS FORM AND AUTHENTICATION STYLES

This local stylesheet supports investor login, logout, security notices, and
form validation messages. It introduces no external dependency.
*/

.form-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


/* -------------------------------------------------------------------------
   AUTHENTICATION CARD
   ------------------------------------------------------------------------- */

.auth-card {
    max-width: 42rem;
}


/* -------------------------------------------------------------------------
   FORM LAYOUT
   ------------------------------------------------------------------------- */

.auth-form,
.contact-form {
    display: grid;
    gap: 1.25rem;
    margin-block: 2rem;
}

.submission-list {
    display: grid;
    gap: 1rem;
}

.submission-card {
    padding: 1rem;
    background: var(--colour-paper);
    border: 0.0625rem solid var(--colour-line);
    border-radius: var(--radius-medium);
}

.submission-card h3 {
    margin-top: 0;
}

.submission-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.form-field {
    display: grid;
    gap: 0.4rem;
}

    .form-field label {
        color: var(--colour-ink);
        font-weight: 700;
    }


    /* -------------------------------------------------------------------------
   FORM CONTROLS

   Controls inherit the website font and remain large enough for touch use.
   ------------------------------------------------------------------------- */

    .form-field input,
    .form-field select,
    .form-field textarea {
        width: 100%;
        min-height: 2.8rem;
        padding: 0.7rem 0.8rem;
        color: var(--colour-ink);
        background: var(--colour-card);
        border: 0.125rem solid var(--colour-line);
        border-radius: var(--radius-small);
        font: inherit;
    }

    .form-field textarea {
        min-height: 9rem;
        resize: vertical;
    }

        .form-field input:hover,
        .form-field select:hover,
        .form-field textarea:hover {
            border-color: var(--colour-primary);
        }

        .form-field input:focus-visible,
        .form-field select:focus-visible,
        .form-field textarea:focus-visible {
            border-color: var(--colour-primary-dark);
        }


/* -------------------------------------------------------------------------
   BUTTONS

   Colour, border, text, and shape work together so meaning does not depend
   only on colour.
   ------------------------------------------------------------------------- */

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 2.8rem;
    padding: 0.65rem 1.1rem;
    color: var(--colour-card);
    background: var(--colour-primary);
    border: 0.125rem solid var(--colour-primary);
    border-radius: var(--radius-small);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

    button:hover {
        background: var(--colour-primary-dark);
        border-color: var(--colour-primary-dark);
    }

    button:disabled {
        color: var(--colour-muted);
        background: var(--colour-soft);
        border-color: var(--colour-line);
        cursor: not-allowed;
    }


/* -------------------------------------------------------------------------
   FORM MESSAGES
   ------------------------------------------------------------------------- */

.form-message {
    margin-block: 1rem;
    padding: 0.9rem 1rem;
    border: 0.125rem solid var(--colour-line);
    border-radius: var(--radius-small);
    font-weight: 650;
}

.form-message-error {
    color: #6f1515;
    background: #fff1f1;
    border-color: #a83030;
}

.form-message-success {
    color: #11532f;
    background: #edf9f1;
    border-color: #2e7d4f;
}


/* -------------------------------------------------------------------------
   SECURITY NOTICE
   ------------------------------------------------------------------------- */

.security-notice {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: var(--colour-soft);
    border-left: 0.3rem solid var(--colour-primary);
    border-radius: var(--radius-small);
}

    .security-notice h2 {
        margin-top: 0;
        font-size: 1.35rem;
    }


/* -------------------------------------------------------------------------
   LOGOUT
   ------------------------------------------------------------------------- */

.logout-form {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 0.125rem solid var(--colour-line);
}


/* -------------------------------------------------------------------------
   MOBILE FORMS
   ------------------------------------------------------------------------- */

@media (max-width: 36rem) {
    button {
        width: 100%;
    }

    .security-notice {
        padding: 0.9rem;
    }
}


/* -------------------------------------------------------------------------
   PRINT

   Authentication controls are not useful in printed investor documents.
   ------------------------------------------------------------------------- */

@media print {
    .auth-form,
    .logout-form,
    .security-notice,
    .form-message {
        display: none;
    }
}
