/* GG Daengku 1.2 — GGtheme original masthead + auth login compatibility fixes. */
/* The previous Daengku layer reset GGtheme's branded header to a flat white bar. */
body.gtheme-body .header-gtheme {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 10px 32px rgba(15,23,42,.085) !important;
    border-bottom: 1px solid rgba(15,23,42,.09) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
}
body.gtheme-body .header-gtheme::after {
    display: block !important;
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gtheme-mid) 20%, var(--gtheme-accent) 50%, var(--gtheme-mid) 80%, transparent);
    opacity: .75;
}
body.gtheme-body .header-gtheme .gtheme-header-inner {
    min-height: 76px;
    max-width: 1480px;
}
body.gtheme-body .header-gtheme .gtheme-search-button,
body.gtheme-body .header-gtheme .gtheme-theme-toggle {
    border-radius: 10px !important;
}
/* Only the GGtheme hero should own large journal branding; editorial modules follow it. */
body.gtheme-body .iit-hero { isolation: isolate; }
body.gtheme-body .gd-home { padding-top: 8px; }

/* Authentication is a separate full-width composition; OJS block sidebars must not pinch it. */
body.pkp_page_login .gtheme-public-shell.gtheme-no-sidebar,
body.pkp_page_user.pkp_op_register .gtheme-public-shell.gtheme-no-sidebar,
body.pkp_page_user.pkp_op_registerComplete .gtheme-public-shell.gtheme-no-sidebar {
    width: 100%;
    max-width: 1170px !important;
    margin-inline: auto;
    padding: clamp(24px, 4vw, 52px) 24px 72px !important;
    grid-template-columns: minmax(0,1fr) !important;
}
body.pkp_page_login .gtheme-content-shell,
body.pkp_page_user.pkp_op_register .gtheme-content-shell,
body.pkp_page_user.pkp_op_registerComplete .gtheme-content-shell {
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
}
.gtheme-auth-page,
.gtheme-auth-frame,
.gtheme-auth-main,
.gtheme-auth-aside,
.gtheme-auth-form {min-width: 0; max-width: 100%; box-sizing: border-box;}
.gtheme-auth-page { margin: 0 auto; }
.gtheme-auth-login-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
    overflow: hidden;
}
.gtheme-auth-main { padding: clamp(26px, 4vw, 54px); }
.gtheme-auth-aside { padding: clamp(27px, 3.8vw, 46px); overflow-wrap: anywhere; }
.gtheme-auth-aside :where(h2,h3) {
    max-width: 100%;
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(22px, 2.1vw, 30px);
    line-height: 1.18;
    font-weight: 500;
    color: #fff !important;
}
.gtheme-auth-aside p, .gtheme-auth-aside li { overflow-wrap: anywhere; }
.gtheme-auth-form { width: 100%; }
.gtheme-auth-form .gtheme-auth-field + .gtheme-auth-field { margin-top: 20px; }
.gtheme-auth-form .gtheme-auth-field label {
    display: inline-block;
    margin-bottom: 4px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
}
.gtheme-auth-form .gtheme-auth-field input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font: inherit;
}
.gtheme-auth-form .gtheme-auth-remember {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}
.gtheme-auth-form .gtheme-auth-remember input {
    flex: 0 0 auto;
    margin: 0;
}
.gtheme-auth-page .gtheme-auth-meta {flex-wrap: wrap;}
.gtheme-auth-form button[type='submit'] {
    display: block;
    border-radius: 12px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--gtheme-dark), var(--gtheme-mid)) !important;
}
@media (max-width: 900px) {
    .gtheme-auth-login-grid { grid-template-columns: minmax(0,1fr); }
    .gtheme-auth-aside { min-height: 0; }
    .gtheme-auth-aside .gtheme-auth-benefits { margin-top: 18px; }
}
@media (max-width: 600px) {
    body.pkp_page_login .gtheme-public-shell.gtheme-no-sidebar,
    body.pkp_page_user.pkp_op_register .gtheme-public-shell.gtheme-no-sidebar,
    body.pkp_page_user.pkp_op_registerComplete .gtheme-public-shell.gtheme-no-sidebar {
        padding: 22px 12px 50px !important;
    }
    .gtheme-auth-frame { border-radius: 16px; }
    .gtheme-auth-main, .gtheme-auth-aside { padding: 26px 20px; }
    .gtheme-auth-meta { flex-direction: column; align-items: flex-start; }
    body.gtheme-body .header-gtheme .gtheme-header-inner { padding: 10px 14px; }
}
html.dark body.gtheme-body .header-gtheme {
    background: rgba(17,27,44,.96) !important;
    border-bottom-color: rgba(255,255,255,.12) !important;
}
html.dark .gtheme-auth-form .gtheme-auth-field label { color: #e2e8f0; }
/* Global .gtheme-prose heading rules otherwise recolor this dark-panel heading. */
body.gtheme-body .gtheme-prose .gtheme-auth-aside h2,
body.gtheme-body .gtheme-prose .gtheme-auth-aside h3,
html.dark body.gtheme-body .gtheme-prose .gtheme-auth-aside h2,
html.dark body.gtheme-body .gtheme-prose .gtheme-auth-aside h3 {
    color: #fff !important;
}
