/* Toggle */
.lgre-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.lgre-switch input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.lgre-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lgre-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.lgre-switch input:checked + .lgre-slider {
    background-color: #2271b1;
}

.lgre-switch input:checked + .lgre-slider:before {
    transform: translateX(26px);
}

.lgre-switch input:focus-visible + .lgre-slider {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .lgre-slider,
    .lgre-slider:before {
        transition: none;
    }
}

/* Disabled rows & opacity handling (reCAPTCHA / Login Protect / Advanced / IP Blocklist) */
.lgre-login-protect-row.lgre-login-protect-disabled th,
.lgre-login-protect-row.lgre-login-protect-disabled td,
.lgre-recaptcha-row.lgre-recaptcha-disabled th,
.lgre-recaptcha-row.lgre-recaptcha-disabled td,
.lgre-advanced-row.lgre-advanced-disabled th,
.lgre-advanced-row.lgre-advanced-disabled td,
.lgre-ip-blocklist-row.lgre-ip-blocklist-disabled th,
.lgre-ip-blocklist-row.lgre-ip-blocklist-disabled td {
    opacity: 0.6;
}

/* Disabled fields cursor */
.lgre-login-protect-field[disabled],
.lgre-advanced-inline input[disabled],
.lgre-ip-blocklist-field[disabled],
.lgre-recaptcha-key-field[disabled],
#lgre_recaptcha_whitelist[disabled] {
    cursor: not-allowed;
}

/* Advanced Settings Layout (Flexbox Fixes) */
.lgre-advanced-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.lgre-advanced-login-url,
.lgre-advanced-login-redirect {
    display: inline-flex;
    align-items: center;
    color: #50575e;
    font-size: 14px;
}

.lgre-advanced-login-url input,
.lgre-advanced-login-redirect input {
    margin-left: 8px;
    min-width: 250px;
}

/* Verification status badge */
.lgre-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 600;
    border: 1px solid transparent;
    margin-left: 6px;
    vertical-align: middle;
}

.lgre-badge--success {
    color: #0a4b1d;
    background: #edfaef;
    border-color: #86d1a1;
}

.lgre-badge--danger {
    color: #8a1f11;
    background: #fcf0f1;
    border-color: #e6a1aa;
}

#lgre-recaptcha-verify-message.lgre-verify-message--error {
    color: #b32d2e;
}

/* Currently active: MODE */
.lgre-active-mode-box {
    background: #f0fff0;
    border-left: 4px solid #2ecc71;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.lgre-active-mode-text {
    line-height: 1.6;
}

/* Configuration status */
.lgre-status-messages {
    padding: 0.9em 1.2em;
    border-left: 4px solid #2271b1;
    background: #f6f7f7;
    list-style: none;
}

.lgre-status-messages li {
    margin: 0.6em 0;
    line-height: 3.0;
}

.lgre-status-messages .lgre-status-icon {
    vertical-align: middle;
    position: relative;
    top: -1px;
    margin-right: 10px;
}

/* Spacing */
body.toplevel_page_webart-login-shield-recaptcha .wrap h1 {
    margin-bottom: 20px;
}

body.toplevel_page_webart-login-shield-recaptcha .wrap hr {
    margin-top: 35px;
    margin-bottom: 35px;
}

body.toplevel_page_webart-login-shield-recaptcha .wrap h2 {
    margin-top: 35px;
    margin-bottom: 16px;
}

body.toplevel_page_webart-login-shield-recaptcha .wrap .form-table {
    margin-bottom: 28px;
}

body.toplevel_page_webart-login-shield-recaptcha .wrap .lgre-active-mode-box {
    margin: 22px 0 30px;
}

body.toplevel_page_webart-login-shield-recaptcha .wrap .lgre-status-messages {
    margin: 1.4em 0;
}

/* Icons */
.lgre-heading-icon {
    display: inline-block;
    margin-right: 5px;
    vertical-align: middle;
    font-size: 20px;
    line-height: 1;
    position: relative;
    top: -2px;
}

/* Your current IP address */
.lgre-ip-status-ok {
    color: #299647;
    font-weight: 400;
}

.lgre-ip-status-blocked {
    color: #c72525;
    font-weight: 400;
}
