/* --- Global & Layout --- */
body {
    display: flex;
    flex-direction: column;
    font: normal normal normal 15px/1.2 proxima-nova, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    background-color: #ffffff;
    background-image: url('/externalstudentaccountclaim/images/background.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.layout-title {
    height: 100px;
    background: rgb(0, 106, 150);
    border-color: rgba(0, 0, 0, 0.2);
    border-bottom-width: 2px;
    width: 100%;
    display: flex;
    align-items: center;
    padding-left: 20px;
    box-sizing: border-box;
}

.title-logo {
    width: 229px;
    height: 45px;
    overflow: hidden;
    text-indent: -999em;
    background-position: 0 -3px;
    margin-left: 140px;
}

.layout-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
    padding-top: 5vh;
    box-sizing: border-box;
}

/* --- Form Container --- */
.form-wrapper {
    width: 100%;
    max-width: 900px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

h4 {
    font-size: 14px;
    color: #555;
    margin-bottom: 30px;
    font-weight: 400;
    text-align: center;
}

/* --- Form Groups & Inputs --- */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-row-content {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 36px;
}

.form-group label {
    width: 300px;
    font-weight: 600;
    margin-right: 20px;
    flex-shrink: 0;
}

.form-group input,
.form-group select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    max-width: 100%;
    height: 36px;
    font-size: 1em;
}

input:disabled {
    background-color: #f0f0f0;
    color: #888;
}

/* --- Custom Select Arrow --- */
.form-group select {
    appearance: none;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M9 1L5 5 1 1' stroke='%23aaa' stroke-width='2' fill='none' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px;
}

/* --- Mononym Styling --- */
.mononym-group .form-row-content {
    justify-content: flex-start;
}

.mononym-group input[type="checkbox"] {
    flex: none !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0;
    cursor: pointer;
}

.mononym-group label {
    width: auto;
    min-width: 300px;
    cursor: pointer;
}

/* --- Hidden Field Animation (Last Name) --- */
#lastNameContainer,
#middleNameContainer {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    transform-origin: top;
    max-height: 500px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: visible;
    margin-bottom: 15px;
}

#lastNameContainer.hidden-field,
#middleNameContainer.hidden-field {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.9);
    max-height: 0;
    margin-bottom: 0;
    padding: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- SSN / ID Group --- */
.verify-id-fields-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
    flex: 1;
}

.verify-id-fields-group label {
    width: auto;
    margin-right: 0;
    font-weight: normal;
}

/* --- Error Messaging --- */
.error-message {
    color: red;
    font-size: 0.85em;
    font-weight: bold;
    display: inline;
}

.error-message-placement,
.error-message-global {
    margin-left: 320px;
    min-height: 0;
    color: red;
    font-size: 0.85em;
    box-sizing: border-box;
    width: calc(100% - 320px);
    display: block;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    opacity: 0;
}

.verify-id-fields-group .error-message-global {
    margin-left: 0;
    width: 100%;
}

.error-input {
    border-color: red !important;
}

/* --- Support Dialog (Fixed Shrink/Scroll) --- */
#supportDialog {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 30px;
    width: 95%;
    max-width: 700px;
    background-color: #fff;
    box-sizing: border-box;
    overflow-x: hidden;
}

#supportDialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

#supportDialog h2 {
    color: rgb(0, 106, 150);
    margin-top: 0;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.full-width {
    grid-column: span 2;
}

/* Required field styling */
.required-label::after {
    content: " *";
    color: red;
    font-weight: bold;
}

.support-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* --- Submit Section --- */
.form-group-submit {
    flex-direction: row;
    justify-content: flex-end;
}

.form-group-submit button {
    padding: 10px 25px;
    background: rgb(0, 106, 150);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.form-group-submit button:disabled {
    background-color: #cccccc;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    .layout-title {
        height: 70px;
        padding-left: 10px;
    }

    .title-logo {
        margin-left: 0;
        width: 180px;
    }

    .form-row-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label,
    .mononym-group label {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .error-message-placement,
    .error-message-global {
        margin-left: 0;
        width: 100%;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }

    #supportDialog {
        padding: 20px;
        width: 98%;
    }
}

#supportSuccessMessage {
    padding: 15px;
    background-color: #dff0d8; /* Light green background */
    border: 1px solid #d6e9c6; /* Green border */
    color: #3c763d; /* Dark green text */
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}