@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400&family=Roboto:wght@400&display');

.header-info {
    width: 70%;
    margin: 20px auto 30px 15%;
    line-height: 1.5;
}

.header-info p {
    margin-bottom: 10px;
    font-size: 15px;
    color: #444;
}
* {
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

form {
    background: none;
    max-width: 100%;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    width: 70%;
    margin: 0 auto;
}

body {
    text-align: left;
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
    margin: 0;
    padding: 40px;
}


h1 {
    font-family: 'Oswald', sans-serif;
    color: #333;
    font-size: 43px !important;
    font-weight: bold;
    margin-bottom: 5px;
}


input {
    background-color: #f0f0f0; 
    border: 1px solid #ccc; 
    padding: 8px;
}

.input-group {
    display: flex;
    gap: 1rem;
}

.half-width {
    flex: 1; 
    display: flex;
    flex-direction: column;
}

.half-width.vertical-align-top {
    justify-content: flex-start;
}

.half-width input {
    width: 100%;
    padding: 12px;
    height: 45px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;

}

.half-width select {
    width: 100%;
    padding: 12px;
    height: 45px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: #f0f0f0; 
    border: 1px solid #ccc; 
    padding: 8px;
    color: #555;
}


.input-group .third-width input,
.third-width select {
    height: 40px;
    font-size: 14px;
    padding: 10px;
    border: 1px solid #ccc;
    color: #555;
    background-color: #f0f0f0; 
    border-radius: 4px;
    box-sizing: border-box;
    text-align: center;
}


.header-info {
    width: 70%;
    margin: 20px auto 30px;
    line-height: 1.5;
}

.header-info p {
    margin-bottom: 10px;
    font-size: 15px;
    color: #444;
}

.info-paragraph {
    font-size: 15px;
    color: #444;
    margin: 5px 0 15px 0;
    line-height: 1.5;
    max-width: 100%;
}

label {
    font-weight: bold;
    display: block;
    margin-top: 15px;
    margin-bottom: 10px; 
    font-size: 16px;
}


.underline {
    width: 150px;
    background-color: #304aab !important;
    height: 3px;
    margin: 0 0 20px 0;
    align-self: flex-start;
}

input[type="submit"] {
    background-color: #304aaa;
    color: white;
    border: none;
    padding: 12px;
    width: 10%;
    font-size: 18px;
    border-radius: 50px; 
    cursor: pointer;
    margin-top: 20px;
    display: block;
}

input[type="submit"]:hover {
    background-color: #414143;
}



.required{
    color:red;
}

.wide-input {
    width: 100%;
    padding: 14px;
    height: 50px; 
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-top: 0;
}

select.wide-input {
    appearance: none;
    background-color: white;
    cursor: pointer;
}

.wide-textarea {
    width: 100%;
    height: 120px;
    padding: 14px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    resize: vertical;
    margin-top: 10px;
}

.vertical-align-top{
    margin-top: 5px;
}
.radio-group {
    display: flex;
    flex-wrap: wrap;
}

.radio-group label {
    color: #414143;
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-top: 0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.radio-group input[type="radio"] {
    margin-right: 0px;
    width: 14px;
    height: 14px;
    accent-color: #304aaa;
    cursor: pointer;
}

.radio-group input[type="radio"]:checked + label {
    color: #304aaa;
    background-color: rgba(48, 74, 170, 0.08);
    font-weight: 500;
}

.radio-group label:hover {
    background-color: rgba(48, 74, 170, 0.05);
}

.header-container {
    position: relative;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 20px 15%;
    width: 70%;
}

.header-container img {
    height: 150px;
    margin-bottom: 0;
}

/* Slightly smaller logo for index page header */
.header-container.small-header img {
    height: 120px !important;
    margin-bottom: 12px;
}

.header-container h1 {
    font-size: 43px;
    font-weight: bold;
    margin: 0;
    z-index: 5;
}

.address-line2 {
    margin-top: 15px;
    margin-bottom: 15px;
}

.city-state-group {
    margin-bottom: 15px;
}

.auth-button, .doctor-buttons, .benefit-buttons, .facility-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.secondary-button {
    background-color: #f0f0f0;
    color: #304aaa;
    border: 2px solid #304aaa;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secondary-button:hover {
    background-color: #304aaa;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.secondary-button:active {
    transform: translateY(0);
}

#remove-person, #remove-doctor, #remove-benefit, #remove-facility {
    border-color: #d9534f;
    color: #d9534f;
}

#remove-person:hover, #remove-doctor:hover, #remove-benefit:hover, #remove-facility:hover {
    background-color: #d9534f;
    color: white;
}

.terms-and-conditions-section {
    margin-top: 20px;
}

.scrollable-box {
    border: 1px solid #ccc;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #304aaa;
    color: white;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 5px;
    position: relative;
    vertical-align: middle;
    text-align: center;
    line-height: 1;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    user-select: none;
}

.info-button::before {
    content: "i";
    display: inline-block;
    transform: translateY(0.5px);
}

.info-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: normal;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    pointer-events: none;
    width: max-content;
    max-width: 300px;
    text-align: center;
}

.info-button:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.label-with-info {
    display: flex;
    align-items: center;
}

.input-field-align {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.input-field-align label {
    margin-bottom: 10px;
}

.document-upload-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.income-documents-section {
    border-left: 4px solid #0077cc;
}

.upload-instructions {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

.document-upload-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.file-upload-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-upload-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-upload-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0077cc;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.file-upload-label:hover {
    background-color: #005fa3;
}

#file-selected {
    font-size: 14px;
    color: #555;
}

.document-description {
    width: 100%;
}

.document-description input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#upload-preview {
    margin-top: 10px;
    min-height: 60px;
    display: flex;
    justify-content: center;
}

.upload-thumbnail {
    max-width: 120px;
    max-height: 120px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    background-color: white;
}

.pdf-icon, .file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 80px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #c00;
    font-weight: bold;
    font-size: 14px;
}

.file-icon {
    color: #0077cc;
}

#upload-list {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.uploaded-document {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.document-info {
    flex: 1;
    padding-left: 15px;
}

.document-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.document-desc {
    font-size: 14px;
    color: #555;
}

.remove-document {
    background: none;
    border: none;
    color: #c00;
    cursor: pointer;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-document:hover {
    background-color: #f5f5f5;
}

.month-year-container {
    width: 100%;  
    display: flex;
    gap: 10px;
}

.month-input {
    flex: 1;
}

.year-input {
    flex: 1;
}

.month-input input, .year-input input {
    width: 100%;
    padding: 8px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    text-align: center;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    form {
        width: 100%;
        margin-left: 0;
        padding: 20px;
    }

    h1, .underline {
        margin-left: 0;
    }


    .header-container {
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        text-align: center;
    }

    .header-container img {
        position: relative;
        top: 0;
        left: 0;
        height: 50px;
        margin-bottom: 10px;
    }


    input[type="submit"] {
        width: 100%;
        font-size: 20px;
        padding: 14px;
    }

    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .half-width, .third-width {
        width: 100% !important;
    }

    .half-width input, .half-width select,
    .third-width input, .third-width select {
        width: 100%;
    }
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-weight: normal;
}

.full-width {
    width: 100%;
}

.confirmation-checkbox {
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    width: 100%;
}

.confirmation-checkbox input[type="checkbox"] {
    margin-right: 10px;
    min-width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 4px;
}

.confirmation-checkbox label {
    line-height: 1.4;
    padding-top: 2px;
}

#additional_notes {
    height: 300px;
}

.password-field-container {
    position: relative;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    z-index: 5;
}

.eye-icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.eye-icon.show {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23555'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
}

.eye-icon.hide {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23555'%3E%3Cpath d='M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z'/%3E%3C/svg%3E");
}

/* esig */
.e-signature-section {
    margin: 30px 0;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.signature-instructions {
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
    color: #444;
}

.signature-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    width: 100%;
}

.signature-pad {
    width: 100%;
    height: 200px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    touch-action: none;
}

.signature-actions {
    margin-top: 15px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.signature-confirmation {
    margin-top: 15px;
}

.signature-pad.active {
    border-color: #304aaa;
    box-shadow: 0 0 8px rgba(48, 74, 170, 0.5);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.medical-auth-modal-content {
    width: 95%;
    max-width: 1200px;
}

.modal-header {
    padding: 20px 30px;
    background-color: #304aaa;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.modal-close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover,
.modal-close:focus {
    color: #ddd;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    background-color: #f1f1f1;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.auth-form-container {
    position: relative;
}

.auth-page {
    display: none;
}

.auth-page.active {
    display: block;
}

.auth-form-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #304aaa;
    margin-bottom: 20px;
}

.auth-logo {
    height: 40px;
    margin-bottom: 10px;
}

.auth-company-info h3 {
    margin: 10px 0 5px 0;
    color: #304aaa;
    font-size: 18px;
}

.auth-company-info p {
    margin: 2px 0;
    font-size: 12px;
    color: #555;
}

.auth-section-title {
    text-align: center;
    color: #304aaa;
    margin: 20px 0;
    font-size: 20px;
    font-weight: bold;
}

.auth-form-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.auth-form-section h4 {
    margin-top: 0;
    color: #304aaa;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.auth-form-field {
    display: flex;
    flex-direction: column;
}

.auth-form-field.auth-small {
    max-width: 80px;
}

.auth-form-field.full-width {
    grid-column: 1 / -1;
}

.auth-form-field label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.auth-form-field input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.auth-form-field input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.auth-legal-text {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

.auth-legal-text p {
    margin: 10px 0;
}

.auth-legal-text ul {
    margin: 10px 0 10px 25px;
}

.auth-legal-text li {
    margin: 5px 0;
}

.auth-footnote {
    font-style: italic;
    color: #666;
    font-size: 12px;
}

.auth-signature-section {
    margin-top: 20px;
}

.auth-signature-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-signature-pad {
    width: 100%;
    height: 150px;
    border: 2px solid #304aaa;
    border-radius: 4px;
    background-color: white;
    touch-action: none;
    cursor: crosshair;
}

.auth-signature-pad.active {
    border-color: #1e3a8a;
    box-shadow: 0 0 8px rgba(48, 74, 170, 0.5);
}

.auth-navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

.view-medical-auth-btn {
    background-color: #304aaa;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin: 20px 0;
    transition: background-color 0.3s, opacity 0.3s;
}

.view-medical-auth-btn:hover:not(:disabled) {
    background-color: #253a8a;
}

.view-medical-auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #304aaa;
}

.section-header {
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #304aaa;
    padding-bottom: 10px;
}

.section-header h3 {
    margin: 0;
    color: #304aaa;
    font-size: 20px;
}

/* Validation error highlighting */
.validation-error {
    border: 3px solid #f44336 !important;
    padding: 15px;
    border-radius: 5px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Ensure error borders are visible on mobile */
@media (max-width: 768px) {
    .validation-error {
        border-width: 4px !important;
        margin: 10px 0;
    }
}

