/* Profile form container */
.profile-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
    border: 1px solid rgb(210, 210, 210);
}

/* Fix table responsiveness */
.profile-form-container table {
    width: 800px;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.profile-form-container table.padded {
    border-collapse: separate;
    border-spacing: 0;
}

.profile-form-container table td {
    box-sizing: border-box;
    word-wrap: break-word;
}

/* Fix form inputs */
.profile-form-container input[type="text"],
.profile-form-container input[type="password"],
.profile-form-container input[type="email"],
.profile-form-container select,
.profile-form-container textarea {
    max-width: 100%;
    box-sizing: border-box;
}

/* Center form buttons */
.profile-form-container p[style*="text-align: center"] {
    text-align: center !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {

    .container,
    .profile-form-container {
        padding: 2rem;
    }

    /* Make table responsive */
    .profile-form-container table {
        width: 100% !important;
        font-size: 14px;
    }

    /* Stack table cells on mobile */
    .profile-form-container table tr {
        display: block;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    .profile-form-container table td {
        display: block;
        width: 100% !important;
        padding: 5px 0;
    }

    /* Label styling on mobile */
    .profile-form-container table td:first-child {

        margin-bottom: 5px;
    }

    /* Full width inputs on mobile */
    .profile-form-container input[type="text"],
    .profile-form-container input[type="password"],
    .profile-form-container input[type="email"],
    .profile-form-container select {
        width: 100%;
        max-width: 100%;
    }

    /* Section headers */
    .profile-form-container table td[colspan="2"] {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .profile-form-container table td[colspan="2"] h3 {
        margin: 10px 0;
    }

    .profile-form-container p[style*="text-align: center"] {
        margin: 0;
    }
}

@media (max-width: 480px) {

    .container,
    .profile-form-container {
        padding: 2rem;
    }

    .profile-form-container table {
        font-size: 13px;
    }

}