﻿body {
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ui.steps .step {
    cursor: pointer;
}


header {
    background-color: #00815D;
}
    header .ui.inverted.menu {
        border: 0;
        border-radius: 0;
        background-color: transparent;
    }
        header .ui.inverted.menu:first-child > .item:first-child {
            border-left: 1px solid #cccccc;
            border-right: 1px solid #cccccc;
            border-radius: 0;
            background-color: #ffffff;
        }

#menu-user {
    border-radius: 0;
    border-top: 0;
}

#main {
    padding: 2rem;
    margin-bottom: 2rem;
    background-color: #ffffff;
    border-left: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    flex: 1 0 auto; /* fill remaining viewport height so the footer stays at the bottom on short pages */
}

#footer {
    flex-shrink: 0;
}

.ui.cards .card a img {
    max-height: 200px;
    padding: 2rem;
    background-color: #eee;
}

#introduction .column:first-child {
    padding: 4rem;
}

#introduction .column:last-child h1,
#introduction .column:last-child .ui.message,
#introduction .column:last-child .ui.checkbox {
    margin-bottom: 2rem;
}

#application > .ui.steps {
    margin-bottom: 2rem;
}

#controls .ui.borderless.menu {
    padding: 1rem 0 0 0;
    border: 0;
    box-shadow: none;
}
    #controls .item {
        padding: 0;
    }

th.nopad,
td.nopad {
    padding: 0 !important;
}

td.sidepad {
    padding: 0 11px !important;
}

input.nopad {
    padding: 4px !important;
}

input[type="file"] {
    width: 350px !important;
}

/* Phones only. A flat 350px overflowed the page (177px of horizontal scroll at
   375px), so make it fluid up to the same 350px. Many tenant forms put each upload
   in a five-wide field inside an eight-wide column, which is ~60px on a phone, so
   let that field and column take the full width too. Desktop keeps the flat 350px:
   those narrow fields are ~163px there, and the input spilling past them is what
   every tenant's Documents page has always looked like. */
@media only screen and (max-width: 767px) {
    input[type="file"] {
        width: 100% !important;
        max-width: 350px;
    }

    .ui.form .wide.field:has(> input[type="file"]),
    .ui.grid > .column:has(input[type="file"]),
    .ui.grid > .row > .column:has(input[type="file"]) {
        width: 100% !important;
    }
}

#canvas-signature {
    height: 300px;
    width: 100%;
    margin-bottom: 0;
    border: 1px solid rgba(34, 36, 38, 0.15);
}
#canvas-signature + button {
    top: -4px;
}

#spouse-canvas-signature {
    height: 300px;
    width: 100%;
    margin-bottom: 0;
    border: 1px solid rgba(34, 36, 38, 0.15);
}
#spouse-canvas-signature + button {
    top: -4px;
}

#invites-table-container {
    position: relative; /* Required for the dimmer to work */
    min-height: 200px; /* Ensure the container has some height */
}

#invites-loading-spinner {
    display: none;
    background-color: white !important;
}

#invites-loading-spinner .ui.loader {
    color: #333;
}

#invites-loading-spinner .ui.loader:before {
    border-color: rgba(0, 0, 0, 0.1);
}

#invites-loading-spinner .ui.loader:after {
    border-color: #767676 transparent transparent;
}

.ui.menu .item.error {
    color: red !important; /* Change text color */
    border-bottom: 2px solid red !important; /* Underline in red */
}

.footer.segment {
    padding: 5em 0em;
}

/* Current-password prompts on Account Security (#199): the text, the field and the button stacked, evenly spaced */
.password-prompt > label {
    display: block;
    margin-bottom: 1em;
}

.password-prompt > .fields {
    margin-bottom: 1em !important;
}

/* As first child of its section the header would lose its top margin; keep the same gap as "Reset password" */
#recovery-codes-section > .ui.dividing.header {
    margin-top: calc(2rem - .14285714em);
}

/* The recovery-codes setup prompt on the dashboard: a half-width field, full width on phones */
#recovery-codes-setup .field {
    width: 50%;
}

@media only screen and (max-width: 767px) {
    #recovery-codes-setup .field {
        width: 100%;
    }
}

/* The wizard header is `ui unstackable ... steps`, so on a phone the step labels
   cannot shrink to fit and push the whole page wide (measured on iwe-standard-form:
   27px of horizontal page scroll at 390px). Let the strip scroll within itself
   instead of widening the document. */
@media only screen and (max-width: 767px) {
    #steps {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Without this the five steps flex-shrink to ~70px each and the labels clip to
       "Busin...". Hold a readable width and let the strip scroll instead. */
    #steps .step {
        flex: 0 0 auto;
        min-width: 11rem;
    }
}

@media screen {
    .no-screen {
        display: none;
    }
}

@media print {
    .no-print {
        display: none;
    }

    #print-header {
        display: block !important;
        margin: 2rem 0;
    }

    header {
        display: none;
    }

    #main {
        border: none !important;
        padding: 0;
    }

    #steps {
        display: none;
    }

    #footer {
        display: none;
    }

    #complete {
        display: none;
    }

    #controls {
        display: none;
    }

    #signature {
        display: none;
    }

    #step-1,
    #step-2,
    #step-3,
    #step-4,
    #step-5 {
        display: block !important;
        page-break-after: always;
    }
}
