/* Responsive Design and Enhanced Input Styling */

/* Enhanced Input Field Styling - Compact */
input[type="text"],
input[type="password"] {
    padding: 8px 10px;
    border: 2px solid #DADADA;
    border-radius: 4px;
    font-size: 0.95em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 350px;
    box-sizing: border-box;
    margin: 0;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #228A91;
    box-shadow: 0 0 0 3px rgba(34, 138, 145, 0.1);
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-color: #A7D0D3;
}

/* Improved Button Styling - Compact */
input.button,
input[type="submit"] {
    background-color: #063E72;
    color: #FFF;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    min-width: 100px;
    margin-top: 5px;
}

input.button:hover,
input[type="submit"]:hover {
    background-color: #052a4f;
    transform: translateY(-1px);
}

input.button:active,
input[type="submit"]:active {
    transform: translateY(0);
}

/* Responsive Design for Mobile */
@media screen and (max-width: 768px) {
    #wrapper {
        width: 100%;
        margin: 0;
        padding: 0 10px;
        box-sizing: border-box;
    }

    #header {
        height: auto;
        padding: 10px 0;
    }

    #logo img {
        max-width: 150px;
        height: auto;
    }

    #banner {
        height: auto;
        padding: 10px 0;
    }

    #app-name {
        font-size: 16px;
        padding-top: 5px;
    }

    #content-wrapper {
        width: 100%;
        padding: 15px 10px;
        box-sizing: border-box;
    }

    #left-col {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 20px;
    }

    #right-col {
        width: 100%;
        float: none;
    }

    #content-left {
        width: 100%;
        float: none;
    }

    #content-right {
        width: 100%;
        float: none;
        margin-left: 0;
        margin-top: 20px;
    }

    .page-title div.page-help {
        text-align: left;
        padding-top: 10px;
    }

    div.form-row {
        padding-top: 8px !important;
        margin-bottom: 10px !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    div.form-row div.label-narrow {
        width: 100%;
        float: none;
        margin-bottom: 3px;
        min-width: auto;
    }

    div.form-row div.element {
        width: 100%;
        float: none;
        min-width: auto;
    }
    
    div.form-row span.required {
        margin-top: 0;
    }

    input[type="text"],
    input[type="password"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    input.button,
    input[type="submit"] {
        width: 100%;
        padding: 14px 30px;
    }

    span.info-box {
        width: 100%;
        box-sizing: border-box;
    }

    .banner-links {
        font-size: 0.75em;
    }

    .banner-links ul li {
        padding: 5px 8px;
    }
}

/* Tablet View */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    #wrapper {
        width: 95%;
        max-width: 960px;
    }

    #content-left {
        width: 60%;
    }

    #content-right {
        width: 35%;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    #logo img {
        max-width: 120px;
    }

    #app-name {
        font-size: 14px;
    }

    div.page-title h1 {
        font-size: 1.3em;
    }

    .page-block {
        font-size: 0.9em;
    }

    div.security-statement {
        font-size: 0.65em;
        line-height: 1.2em;
    }
}

/* Improved Form Layout - Compact and Organized */
div.form-row {
    margin-bottom: 8px !important;
    padding-top: 5px !important;
    clear: both;
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
    justify-content: flex-start;
}

/* Error indicator - 15px width */
div.form-row span.error-indicator {
    margin-top: 0;
    flex-shrink: 0;
    width: 15px;
}

/* Label - 150px width from original CSS */
div.form-row div.label-narrow {
    width: 150px !important;
    min-width: 150px;
    max-width: 150px;
    margin-top: 0;
    flex-shrink: 0;
    text-align: left;
}

/* Required asterisk span - 10px width + 5px margin from original */
div.form-row span.required {
    margin-top: 0;
    flex-shrink: 0;
    width: 10px;
    margin-right: 5px;
}

/* Input element container */
div.form-row div.element {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

/* Compact form container */
div.page-block {
    margin-top: 0.5em;
}

div.page-block div.required-info {
    margin-bottom: 0.5em;
    font-size: 0.85em;
}

div.security-statement {
    margin-top: 1.5em;
    padding: 0.4em;
    font-size: 0.7em;
    line-height: 1.25em;
}

/* Enhanced Accessibility */
input[type="text"]:focus,
input[type="password"]:focus {
    outline: 2px solid #228A91;
    outline-offset: 2px;
}

label {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 5px;
    font-weight: 500;
    white-space: nowrap;
}

/* Compact page title */
div.page-title {
    margin-bottom: 0.5em;
}

div.page-title h1 {
    margin-bottom: 0.3em;
}

/* Compact spacing for page blocks */
div.page-block {
    line-height: 1.3em;
}

/* Ensure form rows align left */
div.form-row {
    justify-content: flex-start;
    text-align: left;
}

/* Ensure labels and inputs are left-aligned */
div.form-row div.label-narrow,
div.form-row div.element {
    text-align: left;
}

/* Submit button row - align to the right */
div.form-row:has(span.submit) {
    align-items: flex-start;
    justify-content: flex-end !important;
}

div.form-row span.submit {
    margin-left: auto !important;
    padding-left: 0 !important;
    text-align: right !important;
    margin-top: 8px;
    float: none !important;
    display: block;
}

div.form-row span.submit br {
    display: none;
}

/* Ensure no centering on button itself */
div.form-row span.submit input.button,
div.form-row span.submit input[type="submit"] {
    margin: 0 !important;
    display: inline-block !important;
    float: none !important;
}

