/* ============================================================================
   REGISTRATION FORM - Enhanced Styling with High Specificity
   ============================================================================ */

/* OJS Standard Fieldsets - NIVO Styling */
.nivo-auth-form fieldset.identity,
.nivo-auth-form fieldset.login,
.nivo-auth-form fieldset.consent,
.nivo-auth-form fieldset.reviewer,
.nivo-auth-form fieldset.interests {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
}

.nivo-auth-form fieldset.identity legend,
.nivo-auth-form fieldset.login legend,
.nivo-auth-form fieldset.consent legend,
.nivo-auth-form fieldset.reviewer legend,
.nivo-auth-form fieldset.interests legend {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    color: #111827 !important;
}

.nivo-auth-form fieldset .fields > div {
    margin-bottom: 16px !important;
}

.nivo-auth-form fieldset .fields > div:last-child {
    margin-bottom: 0 !important;
}

.nivo-auth-form fieldset label {
    display: block !important;
}

.nivo-auth-form fieldset label .label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 500 !important;
    color: #111827 !important;
}

.nivo-auth-form fieldset label input[type="text"],
.nivo-auth-form fieldset label input[type="email"],
.nivo-auth-form fieldset label input[type="tel"],
.nivo-auth-form fieldset label input[type="password"],
.nivo-auth-form fieldset label select {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: border-color 0.2s !important;
}

.nivo-auth-form fieldset label input:focus,
.nivo-auth-form fieldset label select:focus {
    outline: none !important;
    border-color: #DC2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Buttons section */
.nivo-auth-form div.buttons {
    margin-top: 24px !important;
}

/* ============================================================================
   Plugin Fields - Enhanced Styling
   ============================================================================ */

/* Plugin-injected fieldsets - NIVO styled */
.nivo-auth-form fieldset.registrationFields_orcid,
.nivo-auth-form fieldset.registrationFields_phone {
    background: #ffffff !important;
    border: 2px solid #DC2626 !important;
    border-radius: 8px !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Top highlight bar */
.nivo-auth-form fieldset.registrationFields_orcid::before,
.nivo-auth-form fieldset.registrationFields_phone::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: #DC2626 !important;
    border-radius: 8px 8px 0 0 !important;
}

/* Legend styling */
.nivo-auth-form fieldset.registrationFields_orcid legend,
.nivo-auth-form fieldset.registrationFields_phone legend {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #DC2626 !important;
    margin-bottom: 12px !important;
    padding: 0 8px !important;
    background: #ffffff !important;
}

/* ORCID icon */
.nivo-auth-form fieldset.registrationFields_orcid legend::before {
    content: '🆔' !important;
    margin-right: 8px !important;
    font-size: 1.1em !important;
}

/* Phone icon */
.nivo-auth-form fieldset.registrationFields_phone legend::before {
    content: '📱' !important;
    margin-right: 8px !important;
    font-size: 1.1em !important;
}

/* Fields wrapper */
.nivo-auth-form fieldset.registrationFields_orcid .fields > div,
.nivo-auth-form fieldset.registrationFields_phone .fields > div {
    margin-bottom: 0 !important;
}

/* Label styling */
.nivo-auth-form fieldset.registrationFields_orcid label,
.nivo-auth-form fieldset.registrationFields_phone label {
    display: block !important;
}

.nivo-auth-form fieldset.registrationFields_orcid label .label,
.nivo-auth-form fieldset.registrationFields_phone label .label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    font-size: 0.95rem !important;
}

.nivo-auth-form fieldset.registrationFields_orcid label .label .required,
.nivo-auth-form fieldset.registrationFields_phone label .label .required {
    color: #DC2626 !important;
    margin-left: 2px !important;
}

/* Input styling */
.nivo-auth-form fieldset.registrationFields_orcid label input,
.nivo-auth-form fieldset.registrationFields_phone label input {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
}

.nivo-auth-form fieldset.registrationFields_orcid label input::placeholder,
.nivo-auth-form fieldset.registrationFields_phone label input::placeholder {
    color: #9ca3af !important;
}

.nivo-auth-form fieldset.registrationFields_orcid label input:hover,
.nivo-auth-form fieldset.registrationFields_phone label input:hover {
    border-color: #d1d5db !important;
}

.nivo-auth-form fieldset.registrationFields_orcid label input:focus,
.nivo-auth-form fieldset.registrationFields_phone label input:focus {
    outline: none !important;
    border-color: #DC2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
    background: #ffffff !important;
}

/* Description styling - override inline styles */
.nivo-auth-form fieldset.registrationFields_orcid .description,
.nivo-auth-form fieldset.registrationFields_phone .description {
    display: block !important;
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    margin-top: 6px !important;
    line-height: 1.5 !important;
    font-style: italic !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nivo-auth-form fieldset.identity,
    .nivo-auth-form fieldset.login,
    .nivo-auth-form fieldset.consent,
    .nivo-auth-form fieldset.reviewer,
    .nivo-auth-form fieldset.registrationFields_orcid,
    .nivo-auth-form fieldset.registrationFields_phone {
        padding: 20px !important;
    }
    
    .nivo-auth-form fieldset legend {
        font-size: 0.95rem !important;
    }
    
    .nivo-auth-form fieldset label input {
        padding: 9px 12px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body.nivo-dark-mode .nivo-auth-form fieldset.identity,
    body.nivo-dark-mode .nivo-auth-form fieldset.login,
    body.nivo-dark-mode .nivo-auth-form fieldset.consent,
    body.nivo-dark-mode .nivo-auth-form fieldset.reviewer {
        background: #1f2937 !important;
        border-color: #374151 !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset.registrationFields_orcid,
    body.nivo-dark-mode .nivo-auth-form fieldset.registrationFields_phone {
        background: #1f2937 !important;
        border-color: #DC2626 !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset legend {
        color: #f9fafb !important;
        background: #1f2937 !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset.registrationFields_orcid legend,
    body.nivo-dark-mode .nivo-auth-form fieldset.registrationFields_phone legend {
        color: #DC2626 !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset label .label {
        color: #f9fafb !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset label input,
    body.nivo-dark-mode .nivo-auth-form fieldset label select {
        background: #374151 !important;
        border-color: #4b5563 !important;
        color: #f9fafb !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset label input::placeholder {
        color: #9ca3af !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset label input:focus,
    body.nivo-dark-mode .nivo-auth-form fieldset label select:focus {
        background: #374151 !important;
        border-color: #DC2626 !important;
    }
    
    body.nivo-dark-mode .nivo-auth-form fieldset .description {
        color: #d1d5db !important;
    }
}

/* ============================================================================
   DARK MODE FIX - Registration Fields
   ============================================================================ */

/* Dark mode için daha güçlü selector */
body.dark-mode .nivo-auth-form fieldset.registrationFields_orcid,
body.dark-mode .nivo-auth-form fieldset.registrationFields_phone,
html.dark-mode .nivo-auth-form fieldset.registrationFields_orcid,
html.dark-mode .nivo-auth-form fieldset.registrationFields_phone {
    background: var(--dark-card-bg, #1f2937) !important;
    border-color: var(--primary-color, #DC2626) !important;
}

body.dark-mode .nivo-auth-form fieldset.registrationFields_orcid legend,
body.dark-mode .nivo-auth-form fieldset.registrationFields_phone legend,
html.dark-mode .nivo-auth-form fieldset.registrationFields_orcid legend,
html.dark-mode .nivo-auth-form fieldset.registrationFields_phone legend {
    background: var(--dark-card-bg, #1f2937) !important;
    color: var(--primary-color, #DC2626) !important;
}

body.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label .label,
body.dark-mode .nivo-auth-form fieldset.registrationFields_phone label .label,
html.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label .label,
html.dark-mode .nivo-auth-form fieldset.registrationFields_phone label .label {
    color: var(--dark-text-primary, #f9fafb) !important;
}

body.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label input,
body.dark-mode .nivo-auth-form fieldset.registrationFields_phone label input,
html.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label input,
html.dark-mode .nivo-auth-form fieldset.registrationFields_phone label input {
    background: var(--dark-input-bg, #374151) !important;
    border-color: #4b5563 !important;
    color: var(--dark-text-primary, #f9fafb) !important;
}

body.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label input::placeholder,
body.dark-mode .nivo-auth-form fieldset.registrationFields_phone label input::placeholder,
html.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label input::placeholder,
html.dark-mode .nivo-auth-form fieldset.registrationFields_phone label input::placeholder {
    color: #9ca3af !important;
}

body.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label input:focus,
body.dark-mode .nivo-auth-form fieldset.registrationFields_phone label input:focus,
html.dark-mode .nivo-auth-form fieldset.registrationFields_orcid label input:focus,
html.dark-mode .nivo-auth-form fieldset.registrationFields_phone label input:focus {
    background: var(--dark-input-bg, #374151) !important;
    border-color: var(--primary-color, #DC2626) !important;
}

body.dark-mode .nivo-auth-form fieldset.registrationFields_orcid .description,
body.dark-mode .nivo-auth-form fieldset.registrationFields_phone .description,
html.dark-mode .nivo-auth-form fieldset.registrationFields_orcid .description,
html.dark-mode .nivo-auth-form fieldset.registrationFields_phone .description {
    color: #d1d5db !important;
}

/* ============================================================================
   DARK MODE - Standard OJS Fieldsets (Profile, Login, Consent)
   ============================================================================ */

/* Standard fieldsets dark mode */
body.dark-mode .nivo-auth-form fieldset.identity,
body.dark-mode .nivo-auth-form fieldset.login,
body.dark-mode .nivo-auth-form fieldset.consent,
body.dark-mode .nivo-auth-form fieldset.reviewer,
html.dark-mode .nivo-auth-form fieldset.identity,
html.dark-mode .nivo-auth-form fieldset.login,
html.dark-mode .nivo-auth-form fieldset.consent,
html.dark-mode .nivo-auth-form fieldset.reviewer {
    background: var(--dark-card-bg, #1f2937) !important;
    border-color: var(--dark-border-color, #374151) !important;
}

/* Legend text color in dark mode */
body.dark-mode .nivo-auth-form fieldset legend,
html.dark-mode .nivo-auth-form fieldset legend {
    color: var(--dark-text-primary, #f9fafb) !important;
}

/* Label text color in dark mode */
body.dark-mode .nivo-auth-form fieldset label,
body.dark-mode .nivo-auth-form fieldset label .label,
html.dark-mode .nivo-auth-form fieldset label,
html.dark-mode .nivo-auth-form fieldset label .label {
    color: var(--dark-text-primary, #f9fafb) !important;
}

/* Input fields in dark mode */
body.dark-mode .nivo-auth-form fieldset label input[type="text"],
body.dark-mode .nivo-auth-form fieldset label input[type="email"],
body.dark-mode .nivo-auth-form fieldset label input[type="tel"],
body.dark-mode .nivo-auth-form fieldset label input[type="password"],
body.dark-mode .nivo-auth-form fieldset label select,
html.dark-mode .nivo-auth-form fieldset label input[type="text"],
html.dark-mode .nivo-auth-form fieldset label input[type="email"],
html.dark-mode .nivo-auth-form fieldset label input[type="tel"],
html.dark-mode .nivo-auth-form fieldset label input[type="password"],
html.dark-mode .nivo-auth-form fieldset label select {
    background: var(--dark-input-bg, #374151) !important;
    border-color: #4b5563 !important;
    color: var(--dark-text-primary, #f9fafb) !important;
}

/* Placeholder in dark mode */
body.dark-mode .nivo-auth-form fieldset label input::placeholder,
html.dark-mode .nivo-auth-form fieldset label input::placeholder {
    color: #9ca3af !important;
}

/* Focus state in dark mode */
body.dark-mode .nivo-auth-form fieldset label input:focus,
body.dark-mode .nivo-auth-form fieldset label select:focus,
html.dark-mode .nivo-auth-form fieldset label input:focus,
html.dark-mode .nivo-auth-form fieldset label select:focus {
    background: var(--dark-input-bg, #374151) !important;
    border-color: var(--primary-color, #DC2626) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

/* Helper text in dark mode */
body.dark-mode .nivo-auth-form .nivo-form-helper,
html.dark-mode .nivo-auth-form .nivo-form-helper {
    color: #9ca3af !important;
}

/* Checkbox labels in dark mode */
body.dark-mode .nivo-auth-form .nivo-form-checkbox label,
html.dark-mode .nivo-auth-form .nivo-form-checkbox label {
    color: var(--dark-text-primary, #f9fafb) !important;
}

/* Required star in dark mode */
body.dark-mode .nivo-auth-form .required,
body.dark-mode .nivo-auth-form .nivo-required,
html.dark-mode .nivo-auth-form .required,
html.dark-mode .nivo-auth-form .nivo-required {
    color: var(--primary-color, #DC2626) !important;
}

/* Buttons in dark mode */
body.dark-mode .nivo-auth-form .nivo-btn-primary,
html.dark-mode .nivo-auth-form .nivo-btn-primary {
    background-color: var(--primary-color, #DC2626) !important;
    color: #ffffff !important;
    border-color: var(--primary-color, #DC2626) !important;
}

body.dark-mode .nivo-auth-form .nivo-btn-primary:hover,
html.dark-mode .nivo-auth-form .nivo-btn-primary:hover {
    background-color: #b91c1c !important;
}
/* ============================================================================
   REGISTRATION FORM - DARK MODE OVERRIDE (Super Specific)
   Dark mode.css'i ezmek için çok spesifik selector'lar
   ============================================================================ */

/* Profile, Login, Consent fieldsets - dark background */
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset.identity,
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset.login,
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset.consent,
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset.reviewer {
    background: var(--bg-secondary, #242936) !important;
    border: 1px solid var(--border-primary, #3d4556) !important;
}

/* All input fields in registration form - dark background */
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset input[type="text"],
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset input[type="email"],
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset input[type="tel"],
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset input[type="password"],
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset select {
    background: var(--bg-light, #3d4556) !important;
    border-color: var(--border-secondary, #4a5568) !important;
    color: var(--text-primary, #ffffff) !important;
}

/* Placeholder */
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset input::placeholder {
    color: var(--text-tertiary, #a0aec0) !important;
}

/* Focus state */
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset input:focus,
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset select:focus {
    background: var(--bg-tertiary, #2d3548) !important;
    border-color: var(--primary-color, #DC2626) !important;
}

/* Labels */
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset label,
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset label .label,
body.dark-mode .nivo-auth-page .nivo-auth-form fieldset legend {
    color: var(--text-primary, #ffffff) !important;
}
