/* --- Common Container for Both Forms --- */
#drr-registration-container,
#drr-login-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* --- Common Form Styles --- */
#drr-registration-form h2,
#drr-login-form h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #333;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
}

#drr-registration-form fieldset,
#drr-login-form fieldset {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
}

#drr-registration-form legend {
    font-size: 1.2em;
    font-weight: 600;
    color: #007cba;
    padding: 0 10px;
}

#drr-registration-form p,
#drr-login-form p {
    margin-bottom: 15px;
}

#drr-registration-form label,
#drr-login-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #555;
}

#drr-registration-form input[type="text"],
#drr-registration-form input[type="email"],
#drr-registration-form input[type="password"],
#drr-registration-form select,
#drr-login-form input[type="text"],
#drr-login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

#drr-registration-form input:focus,
#drr-registration-form select:focus,
#drr-login-form input:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.2);
}

#drr-registration-form .required {
    color: #d9534f;
    font-weight: bold;
}

#drr-registration-form input[type="submit"],
#drr-login-form input[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#drr-registration-form input[type="submit"]:hover,
#drr-login-form input[type="submit"]:hover {
    background: #005a87;
}

/* --- Registration Form Specific --- */
#drr-add-new-institution-toggle {
    margin-right: 8px;
}

#drr-new-institution-fields {
    padding: 20px;
    margin-top: 15px;
    background: #e9ecef;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

#drr-new-institution-fields h4 {
    margin-top: 0;
    color: #333;
}

/* --- Common Error and Success Messages --- */
.drr-form-errors,
.drr-form-success {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.drr-form-errors {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

.drr-form-errors ul {
    margin: 0;
    padding-left: 20px;
}

.drr-form-errors p {
    margin: 0;
}

.drr-form-success {
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    text-align: center;
}

/* --- ORCID Login Button --- */
.orcid-login-section {
    text-align: center;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

a.orcid-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background-color: #A6CE39;
    color: #fff !important;
    border: 1px solid #95b932;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

a.orcid-button:hover {
    background-color: #89ab2c;
    border-color: #799426;
    color: #fff !important;
}

a.orcid-button img {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.drr-divider {
    text-align: center;
    border-bottom: 1px solid #ddd;
    line-height: 0.1em;
    margin: 2em 0;
}

.drr-divider span {
    background: #f9f9f9;
    padding: 0 10px;
    color: #888;
}

/* --- ORCID Data Disclosure --- */
.orcid-data-disclosure {
    margin-top: 12px;
    text-align: left;
    display: inline-block;
    width: 100%;
}

.orcid-data-toggle {
    background: none;
    border: none;
    color: #007cba;
    cursor: pointer;
    font-size: 0.9em;
    padding: 4px 0;
    text-decoration: underline;
    display: block;
    margin: 8px auto 0;
}

.orcid-data-toggle:hover {
    color: #005a87;
}

.orcid-data-toggle .toggle-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-style: normal;
    margin-right: 4px;
}

.orcid-data-content {
    margin-top: 12px;
    padding: 16px 20px;
    background: #f0f7ff;
    border: 1px solid #c8e0f4;
    border-radius: 6px;
    font-size: 0.9em;
    color: #333;
    text-align: left;
}

.orcid-data-content ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.orcid-data-content li {
    margin-bottom: 6px;
}

.orcid-data-content p {
    margin: 0 0 10px 0;
}

.orcid-data-content p:last-child {
    margin-bottom: 0;
}

.orcid-data-content a {
    color: #007cba;
}

.orcid-email-note {
    background: #fff8e5;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 10px 14px;
    color: #555;
}