/* Register page */
html,
body,
body.wp-theme-twentytwentyfive {
    min-height: 100%;
    background: #eef3ef !important;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

.wp-site-blocks {
    min-height: 100vh;
    background: transparent !important;
}

.wp-block-post-content {
    width: 100%;
    box-sizing: border-box;
}

body:has(.login-form) {
    position: relative;
    color: #10231f;
    background:
        radial-gradient(circle at 22% 18%, rgba(245, 158, 11, 0.18), transparent 28%),
        radial-gradient(circle at 78% 24%, rgba(20, 184, 166, 0.18), transparent 30%),
        linear-gradient(135deg, #eef7f2 0%, #fff8e8 48%, #e7f3ef 100%) !important;
}

body:has(.login-form)::before {
    content: "\1F4DD";
    position: fixed;
    left: 10%;
    top: 14%;
    width: 20px;
    height: 20px;
    display: grid;
    color: rgba(15, 118, 110, 0.28);
    font-size: 200px;
    line-height: 1;
    opacity: 0.44;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(-8deg);
    z-index: 0;
}

body:has(.login-form)::after {
    content: "\1F4BC";
    position: fixed;
    right: 8%;
    bottom: 118px;
    width: 190px;
    height: 190px;
    display: grid;
    place-items: center;
    color: rgba(245, 158, 11, 0.3);
    font-size: 200px;
    line-height: 1;
    pointer-events: none;
    transform: rotate(11deg);
    z-index: 0;
}

body:has(.login-form) .wp-site-blocks,
body:has(.login-form) main,
body:has(.login-form) .entry-content {
    position: relative;
    z-index: 1;
}

body:has(.login-form) .entry-content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:has(.login-form) main.wp-block-group > .wp-block-group {
    padding-top: clamp(86px, 10vh, 104px) !important;
    padding-bottom: 120px !important;
    box-sizing: border-box;
}

body:has(.login-form) .wp-block-post-title {
    position: relative;
    width: min(100%, 430px);
    margin: 0 auto 14px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.72);
}

body:has(.login-form) .wp-block-post-title::before {
    content: "Create Your Own Study Notes";
    display: block;
    margin-bottom: 9px;
    padding-top: 9px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

body:has(.login-form) .wp-block-post-title::after {
    content: "";
    display: block;
    width: 82px;
    height: 4px;
    margin: 13px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #14b8a6, #0f766e);
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.3);
}

.auth-page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    width: 100%;
    max-width: none !important;
    min-height: 60px;
    margin: 0 !important;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-sizing: border-box;
    border-radius: 0 0 18px 18px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 24%),
        linear-gradient(135deg, #0f766e 0%, #14b8a6 56%, #f59e0b 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.auth-page-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.auth-page-logo {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 auto;
    object-fit: contain;
    margin-top: -8px;
    margin-bottom: -8px;
}

.auth-page-text {
    display: grid;
    gap: 2px;
}

.auth-page-site-name {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.auth-page-tagline {
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
}

.auth-page-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-page-links a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.auth-page-links a:hover {
    color: #fff;
}

body:has(.login-form) form.login-form {
    position: relative;
    width: min(100%, 400px);
    max-width: 430px !important;
    margin: 0 auto !important;
    padding: 30px 34px 28px !important;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid transparent !important;
    border-radius: 24px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(255, 251, 242, 0.91)) padding-box,
        linear-gradient(135deg, rgba(245, 158, 11, 0.74), rgba(20, 184, 166, 0.68), rgba(15, 118, 110, 0.54)) border-box !important;
    box-shadow:
        0 28px 70px rgba(15, 23, 42, 0.22),
        0 8px 18px rgba(95, 65, 36, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

body:has(.login-form) form.login-form:hover {
    transform: translateY(-3px);
    box-shadow:
        0 34px 78px rgba(15, 23, 42, 0.26),
        0 10px 24px rgba(20, 118, 110, 0.14),
        inset 0 2px 0 rgba(255, 255, 255, 0.9) !important;
}

body:has(.login-form) form.login-form::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    background: linear-gradient(90deg, #f59e0b, #14b8a6, #0f766e);
}

body:has(.login-form) form.login-form::after {
    content: "";
    position: absolute;
    right: -52px;
    top: -68px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 18%, transparent 19%),
        radial-gradient(circle, rgba(245, 158, 11, 0.26), rgba(20, 184, 166, 0.12) 54%, transparent 68%);
    pointer-events: none;
}

body:has(.login-form) form.login-form input {
    position: relative;
    z-index: 1;
    width: 100% !important;
    min-height: 48px;
    margin: 0 0 12px !important;
    padding: 13px 17px !important;
    box-sizing: border-box;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    border-radius: 15px !important;
    outline: none;
    background: rgba(248, 250, 252, 0.92) !important;
    color: #172033 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
    font-size: 15px !important;
    font-weight: 650;
    line-height: 1.2;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

body:has(.login-form) form.login-form input::placeholder {
    color: #64748b;
    font-weight: 600;
    opacity: 1;
}

body:has(.login-form) form.login-form input:focus {
    border-color: #14b8a6 !important;
    background: #fff !important;
    box-shadow:
        0 0 0 4px rgba(20, 184, 166, 0.16),
        0 12px 26px rgba(15, 23, 42, 0.08) !important;
}

body:has(.login-form) form.login-form button {
    position: relative;
    z-index: 1;
    width: 100% !important;
    min-height: 50px;
    margin: 0 !important;
    padding: 14px !important;
    border: none !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #111827 0%, #0f766e 58%, #f59e0b 100%) !important;
    color: #fff !important;
    box-shadow:
        0 15px 30px rgba(15, 118, 110, 0.27),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    cursor: pointer;
    font-size: 15px !important;
    font-weight: 850;
    letter-spacing: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

body:has(.login-form) form.login-form button:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow:
        0 19px 36px rgba(15, 118, 110, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

body:has(.login-form) form.login-form button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.16) brightness(0.92);
    opacity: 0.78;
    transform: none;
    box-shadow:
        0 10px 20px rgba(15, 23, 42, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

body:has(.login-form) form.login-form small#confirm_msg {
    position: relative;
    z-index: 1;
    display: block;
    min-height: 34px;
    margin: -4px 0 10px !important;
    padding: 8px 12px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.72);
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.22s ease, transform 0.22s ease, color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

body:has(.login-form) form.login-form small#confirm_msg.is-neutral,
body:has(.login-form) form.login-form small#confirm_msg.is-error,
body:has(.login-form) form.login-form small#confirm_msg.is-success {
    opacity: 1;
    transform: translateY(0);
}

body:has(.login-form) form.login-form small#confirm_msg.is-neutral {
    border-color: rgba(15, 118, 110, 0.14) !important;
    background: rgba(240, 253, 250, 0.7) !important;
    color: #0f766e !important;
}

body:has(.login-form) form.login-form small#confirm_msg.is-error {
    border-color: rgba(220, 38, 38, 0.2) !important;
    background: rgba(254, 242, 242, 0.88) !important;
    color: #b91c1c !important;
}

body:has(.login-form) form.login-form small#confirm_msg.is-success {
    border-color: rgba(22, 163, 74, 0.24) !important;
    background: rgba(240, 253, 244, 0.9) !important;
    color: #15803d !important;
}

body:has(.login-form) form.login-form + p:empty {
    display: none;
}

body:has(.login-form) form.login-form + p {
    position: relative;
    z-index: 3;
    margin: 18px auto 0 !important;
    color: #0f766e;
    font-weight: 600;
    text-align: center;
}

body:has(.login-form) form.login-form + p a {
    color: #0f766e;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

body:has(.login-form) form.login-form + p a:hover {
    color: #b45309;
    text-decoration: none;
}

.login-error-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 99999;
    min-width: 320px;
    max-width: 420px;
    padding: 20px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: #fff;
    box-shadow:
        0 15px 40px rgba(220, 38, 38, 0.35),
        0 5px 15px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transform: translate(-50%, -50%);
    animation:
        errorPop 0.4s ease-out,
        errorFadeOut 0.5s ease 3s forwards;
}

.login-toast.error + form.login-form,
body:has(.login-toast.error) .login-form {
    margin-top: 0 !important;
}

@keyframes errorPop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.85);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes errorFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

@media (min-width: 601px) and (max-height: 760px) {
    body:has(.login-form) main.wp-block-group > .wp-block-group {
        padding-top: 12px !important;
    }

    body:has(.login-form) .wp-block-post-title {
        margin-bottom: 10px;
        font-size: 34px;
    }

    body:has(.login-form) form.login-form {
        padding: 24px 34px 22px !important;
    }

    body:has(.login-form) form.login-form input {
        min-height: 42px;
        margin-bottom: 9px !important;
        padding: 11px 16px !important;
    }

    body:has(.login-form) form.login-form small#confirm_msg {
        min-height: 10px;
        margin: -5px 0 6px !important;
    }

    body:has(.login-form) form.login-form button {
        min-height: 46px;
    }

    body:has(.login-form) form.login-form + p {
        margin-top: 10px !important;
    }
}

@media (max-width: 600px) {
    body {
        --wp--style--root--padding-right: 16px;
        --wp--style--root--padding-left: 16px;
        padding-top: 0 !important;
    }

    body:has(.login-form) {
        background:
            radial-gradient(circle at 18% 14%, rgba(245, 158, 11, 0.18), transparent 28%),
            radial-gradient(circle at 82% 22%, rgba(20, 184, 166, 0.17), transparent 30%),
            linear-gradient(135deg, #eef7f2 0%, #fff8e8 48%, #e7f3ef 100%) !important;
    }

    body:has(.login-form)::before {
        left: -26px;
        top: 78px;
        width: 180px;
        height: 180px;
        place-items: center;
        font-size: 148px;
        opacity: 0.22;
    }

    body:has(.login-form)::after {
        right: -24px;
        bottom: 54px;
        width: 150px;
        height: 150px;
        font-size: 124px;
        opacity: 0.24;
    }

    body:has(.login-form) .wp-site-blocks {
        padding-top: 0 !important;
    }

    body:has(.login-form) main.wp-block-group {
        margin-top: 0 !important;
    }

    body:has(.login-form) main.wp-block-group > .wp-block-group {
        min-height: 100dvh;
        padding-top: 66px !important;
        padding-bottom: 140px !important;
    }

    body:has(.login-form) .wp-block-post-title {
        margin-bottom: 10px;
        font-size: 28px;
    }

    body:has(.login-form) .wp-block-post-title::before {
        margin-bottom: 6px;
        font-size: 11px;
    }

    body:has(.login-form) .wp-block-post-title::after {
        margin-top: 9px;
    }

    .auth-page-header {
        min-height: 56px;
        padding: 8px 16px;
    }

    .auth-page-links {
        display: none;
    }

    .auth-page-logo {
        width: 38px !important;
        height: 38px !important;
    }

    body:has(.login-form) form.login-form {
        width: calc(100% - 32px);
        margin: 0 auto !important;
        padding: 22px 20px 18px !important;
        border-radius: 20px !important;
    }

    body:has(.login-form) form.login-form input {
        min-height: 44px;
        margin-bottom: 10px !important;
        padding: 12px 14px !important;
        font-size: 14px !important;
    }

    body:has(.login-form) form.login-form button {
        min-height: 48px;
    }

    body:has(.login-form) form.login-form small#confirm_msg {
        min-height: 32px;
        margin-top: -6px !important;
        margin-bottom: 10px !important;
        padding: 7px 10px;
    }

    .login-toast.error {
        width: calc(100% - 32px);
        min-width: 0;
        max-width: 360px;
        box-sizing: border-box;
    }
}
