/* ===========================================================================
   EO Hostage Research - administration interface.

   Loaded on top of core's admin CSS (never instead of it: an admin screen missing core styles is
   unusable, and every WordPress release would break a full replacement). What it does is give
   wp-admin and the login screen this project's own voice - the site's brown and amber over a warm
   paper background, serif headings, quiet cards - so the people running a research programme are not
   looking at the same grey-blue dashboard as everyone else.

   Written to the project's CSS standard: one selector per line, one line per declaration block.
   Direction-agnostic throughout (logical properties), because the interface runs in Hebrew RTL.
   =========================================================================== */

:root{--eohr-brown:#4a2c11;--eohr-brown-dark:#341d0a;--eohr-amber:#fed72f;--eohr-amber-strong:#f0a319;--eohr-paper:#fbf9f4;--eohr-paper-edge:#efe9dd;--eohr-ink:#3a3532;--eohr-ink-soft:#7c736c;--eohr-card:#ffffff;--eohr-radius:12px;--eohr-radius-sm:8px;--eohr-serif:"Frank Ruhl Libre","Frank Ruehl CLM",FrankRuehl,David,ui-serif,Georgia,"Times New Roman",serif;--eohr-shadow:0 1px 2px rgba(58,53,50,.06),0 8px 24px -12px rgba(58,53,50,.14);}

/* --- Page frame ----------------------------------------------------------- */
body.wp-admin{background-color:var(--eohr-paper);color:var(--eohr-ink);}

#wpcontent,
#wpfooter{background-color:var(--eohr-paper);}

#wpbody-content{padding-bottom:80px;}

#wpfooter{color:var(--eohr-ink-soft);border-top:1px solid var(--eohr-paper-edge);}

#wpfooter p{font-size:12px;}

/* --- Admin bar ------------------------------------------------------------ */
#wpadminbar{background:var(--eohr-brown-dark);box-shadow:0 1px 0 rgba(0,0,0,.15);}

#wpadminbar .ab-item,
#wpadminbar a.ab-item,
#wpadminbar>#wp-toolbar span.ab-label,
#wpadminbar>#wp-toolbar span.noticon{color:#f4ece0;}

#wpadminbar .ab-top-menu>li:hover>.ab-item,
#wpadminbar .ab-top-menu>li.hover>.ab-item,
#wpadminbar .ab-top-menu>li>.ab-item:focus{background-color:var(--eohr-brown);color:var(--eohr-amber);}

#wpadminbar #wp-admin-bar-site-name>.ab-item:before,
#wpadminbar .ab-icon:before,
#wpadminbar .ab-item:before{color:var(--eohr-amber-strong);}

/* --- Side menu ------------------------------------------------------------ */
#adminmenuback,
#adminmenuwrap,
#adminmenu,
#adminmenu .wp-submenu{background-color:var(--eohr-brown);}

#adminmenu a{color:#f0e6d8;}

#adminmenu div.wp-menu-image:before{color:#e3cfae;}

#adminmenu li.menu-top:hover,
#adminmenu li.opensub>a.menu-top,
#adminmenu li>a.menu-top:focus{background-color:var(--eohr-brown-dark);color:var(--eohr-amber);}

#adminmenu li.menu-top:hover div.wp-menu-image:before{color:var(--eohr-amber);}

#adminmenu .wp-has-current-submenu .wp-submenu,
#adminmenu .wp-has-current-submenu.opensub .wp-submenu,
#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,
#adminmenu .wp-submenu.sub-open{background-color:var(--eohr-brown-dark);}

#adminmenu li.current a.menu-top,
#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
.folded #adminmenu li.current.menu-top{background-color:var(--eohr-brown-dark);color:#fff;box-shadow:inset 4px 0 0 var(--eohr-amber);}

body.rtl #adminmenu li.current a.menu-top,
body.rtl #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu{box-shadow:inset -4px 0 0 var(--eohr-amber);}

#adminmenu .wp-submenu a:hover,
#adminmenu .wp-submenu a:focus,
#adminmenu .wp-submenu li.current a{color:var(--eohr-amber);}

#adminmenu .wp-menu-separator{background:rgba(255,255,255,.12);}

#collapse-button{color:#e3cfae;}

/* --- Headings ------------------------------------------------------------- */
.wrap>h1,
.wrap>h1.wp-heading-inline,
.wrap>h2:not(.nav-tab-wrapper),
.metabox-holder h2,
.postbox-header h2{font-family:var(--eohr-serif);color:var(--eohr-brown);font-weight:700;}

.wrap>h1,
.wrap>h1.wp-heading-inline{font-size:26px;line-height:1.3;padding-bottom:10px;position:relative;}

.wrap>h1:after,
.wrap>h1.wp-heading-inline:after{content:"";position:absolute;inset-inline-start:0;bottom:0;width:56px;height:3px;border-radius:2px;background:var(--eohr-amber);}

.wrap .page-title-action{background:var(--eohr-card);border:1px solid var(--eohr-paper-edge);border-radius:999px;color:var(--eohr-brown);font-weight:700;padding:5px 16px;box-shadow:none;}

.wrap .page-title-action:hover,
.wrap .page-title-action:focus{background:var(--eohr-amber);border-color:var(--eohr-amber-strong);color:var(--eohr-brown-dark);}

/* --- Cards: meta boxes, list tables, settings ---------------------------- */
.postbox,
.wp-list-table,
.tablenav.top,
.tablenav.bottom,
#wpbody-content .form-table-wrapper,
#poststuff .stuffbox{background-color:var(--eohr-card);border:1px solid var(--eohr-paper-edge);border-radius:var(--eohr-radius);box-shadow:var(--eohr-shadow);}

.tablenav.top,
.tablenav.bottom{padding:6px 12px;margin-block:12px;}

.postbox{margin-bottom:20px;}

.postbox .postbox-header{border-bottom:1px solid var(--eohr-paper-edge);border-radius:var(--eohr-radius) var(--eohr-radius) 0 0;background:linear-gradient(180deg,#fffdf8,var(--eohr-card));}

.postbox .postbox-header h2,
.postbox .postbox-header h3{font-size:15px;padding:12px 14px;}

.postbox .inside{padding:14px;}

.wp-list-table{border-collapse:separate;overflow:hidden;}

.wp-list-table thead th,
.wp-list-table thead td{background-color:#fffdf8;color:var(--eohr-brown);font-weight:700;border-bottom:1px solid var(--eohr-paper-edge);}

.wp-list-table tbody tr:hover{background-color:#fffdf5;}

.wp-list-table .row-title{color:var(--eohr-brown);font-family:var(--eohr-serif);font-size:15px;}

.striped>tbody>:nth-child(odd),
ul.striped>:nth-child(odd){background-color:#fdfbf6;}

/* --- Buttons -------------------------------------------------------------- */
.wp-core-ui .button-primary{background:var(--eohr-brown);border-color:var(--eohr-brown-dark);color:var(--eohr-amber);border-radius:var(--eohr-radius-sm);font-weight:700;text-shadow:none;box-shadow:none;}

.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus{background:var(--eohr-brown-dark);border-color:var(--eohr-brown-dark);color:var(--eohr-amber);}

.wp-core-ui .button-primary:focus{box-shadow:0 0 0 2px var(--eohr-amber);}

.wp-core-ui .button,
.wp-core-ui .button-secondary{background:var(--eohr-card);border-color:#d9cfbe;border-radius:var(--eohr-radius-sm);color:var(--eohr-brown);font-weight:600;}

.wp-core-ui .button:hover,
.wp-core-ui .button-secondary:hover{background:#fffaef;border-color:var(--eohr-amber-strong);color:var(--eohr-brown-dark);}

.wp-core-ui .button-link{color:var(--eohr-brown);}

/* --- Form controls -------------------------------------------------------- */
input[type=text],
input[type=search],
input[type=email],
input[type=url],
input[type=password],
input[type=number],
input[type=tel],
input[type=date],
select,
textarea{border:1px solid #d9cfbe;border-radius:var(--eohr-radius-sm);background-color:#fffdf9;color:var(--eohr-ink);}

input[type=text]:focus,
input[type=search]:focus,
input[type=email]:focus,
input[type=url]:focus,
input[type=password]:focus,
input[type=number]:focus,
select:focus,
textarea:focus{border-color:var(--eohr-amber-strong);box-shadow:0 0 0 2px rgba(240,163,25,.25);outline:none;}

input[type=checkbox]:checked::before{color:var(--eohr-brown);}

.form-table th{color:var(--eohr-brown);font-weight:700;}

/* --- Notices -------------------------------------------------------------- */
.notice,
div.updated,
div.error{border-radius:var(--eohr-radius);border-inline-start-width:4px;box-shadow:var(--eohr-shadow);background-color:var(--eohr-card);}

.notice-info{border-inline-start-color:var(--eohr-brown);}

.notice-success{border-inline-start-color:#067647;}

.notice-warning{border-inline-start-color:var(--eohr-amber-strong);}

/* --- Block editor chrome -------------------------------------------------- */
.block-editor__container .edit-post-header,
.editor-header{background-color:#fffdf8;border-bottom:1px solid var(--eohr-paper-edge);}

.edit-post-visual-editor,
.editor-visual-editor{background-color:var(--eohr-paper);}

/* The meta-box drawer, moved BELOW the content instead of on top of it.
   WordPress renders it as a resizable panel that shares the editor's height: expanding it to read the
   material's fields shrinks the writing canvas to a slot, which is the opposite of what an editor
   wants. Here the canvas keeps (almost) the full visible height, the drawer follows it at its natural
   height, and the region around both scrolls - so the fields are one scroll below the text, the way the
   classic editor placed them. The !important is unavoidable: the height it overrides is an inline style
   written by the resize handle, which is hidden for the same reason.

   The 34px the canvas gives up is the height of the drawer's own title bar, which is what keeps the
   fields FINDABLE: the bar stays visible at the bottom edge instead of the drawer disappearing below
   the fold of a long article. Nothing here is sticky or floating - the whole strip is static, in flow,
   and scrolls with the page. */
.edit-post-layout.has-metaboxes .interface-interface-skeleton__content{overflow-y:auto;}

.edit-post-layout.has-metaboxes .editor-visual-editor,
.edit-post-layout.has-metaboxes .edit-post-visual-editor{flex:1 1 auto!important;min-height:0;}

.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main__presenter{background-color:#fffdf8;border-top:1px solid var(--eohr-paper-edge);}

/* The strip CLAIMS only the height of its own title bar in the flex layout (flex-basis 34px) and renders
   its real height past that, into the scrollable region. That is what lets the canvas keep everything
   else - whatever the editor's notice bar happens to leave - without a magic number, while the title bar
   stays visible at the bottom edge. */
.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main{flex:0 0 34px!important;height:auto!important;max-height:none!important;min-height:34px;overflow:visible;border-top:1px solid var(--eohr-paper-edge);}

.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main__liner{height:auto!important;max-height:none!important;overflow:visible;}

/* Nothing about the strip is adjustable: no resize handle, and no collapse control - the title bar is
   left as a plain static label. assets/js/admin-editor.js forces the open state on, because that state
   is a stored user preference and CSS cannot reach it. */
.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main .components-resizable-box__handle{display:none!important;}

.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main__presenter button,
.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main__presenter [role=button],
.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main__presenter .components-button{display:none!important;}

.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main__presenter{cursor:default;pointer-events:none;}

.edit-post-layout.has-metaboxes .edit-post-meta-boxes-main__presenter>*{font-family:var(--eohr-serif);color:var(--eohr-brown);font-weight:700;}

.edit-post-layout.has-metaboxes .edit-post-meta-boxes-area{padding:8px 16px 32px;}

/* ---------------------------------------------------------------------------
   The system-messages board, pinned above everything on the dashboard.
   --------------------------------------------------------------------------- */
.eohr-board{margin:16px 20px 4px;background:var(--eohr-card);border:1px solid var(--eohr-paper-edge);border-radius:var(--eohr-radius);box-shadow:var(--eohr-shadow);overflow:hidden;}

.eohr-board__header{display:flex;align-items:center;gap:10px;padding:14px 18px;background:linear-gradient(135deg,var(--eohr-brown),var(--eohr-brown-dark));}

.eohr-board__icon{font-size:22px;width:22px;height:22px;line-height:1;color:var(--eohr-amber);}

.eohr-board__title{font-family:var(--eohr-serif);font-size:19px;font-weight:700;color:var(--eohr-amber);margin:0;flex:1 1 auto;}

.eohr-board__action{color:#f0e6d8;font-size:12px;font-weight:600;text-decoration:none;border:1px solid rgba(254,215,47,.5);border-radius:999px;padding:4px 12px;}

.eohr-board__action:hover,
.eohr-board__action:focus{background:var(--eohr-amber);border-color:var(--eohr-amber);color:var(--eohr-brown-dark);}

.eohr-board__empty{margin:0;padding:20px 18px;color:var(--eohr-ink-soft);}

.eohr-board .eohr-notice-feed{padding:4px 18px 14px;}

.eohr-board .eohr-notice-feed__item{padding:14px 0;border-bottom:1px solid var(--eohr-paper-edge);border-inline-start:0;}

.eohr-board .eohr-notice-feed__title{font-size:17px;margin:2px 0 6px;}

.eohr-board .eohr-notice-feed__body{max-width:80ch;}

.eohr-board .eohr-notice-feed__body p{font-size:14px;color:var(--eohr-ink);}

@media (max-width:782px){
.eohr-board{margin:12px 10px 0;}
.eohr-board__title{font-size:17px;}
}

/* --- Login screen --------------------------------------------------------- */
body.login{background-color:var(--eohr-paper);}

body.login h1 a{background-image:none;width:auto;height:auto;text-indent:0;font-family:var(--eohr-serif);font-size:22px;font-weight:700;color:var(--eohr-brown);line-height:1.4;text-decoration:none;margin-bottom:16px;}

body.login h1 a:before{content:"🎗️ ";}

body.login form{background-color:var(--eohr-card);border:1px solid var(--eohr-paper-edge);border-radius:var(--eohr-radius);box-shadow:var(--eohr-shadow);}

body.login label{color:var(--eohr-brown);font-weight:600;}

body.login .button.wp-hide-pw{color:var(--eohr-ink-soft);}

body.login #nav a,
body.login #backtoblog a{color:var(--eohr-brown);font-weight:600;}

body.login #nav a:hover,
body.login #backtoblog a:hover{color:var(--eohr-amber-strong);}

body.login .language-switcher{display:none;}

/* ===========================================================================
   Theme-owned admin components.
   =========================================================================== */

/* Material fields box (inc/material-meta.php). */
.eohr-fields{display:grid;grid-template-columns:1fr;gap:14px;}

@media (min-width:1100px){
.eohr-fields{grid-template-columns:1fr 1fr;}
.eohr-fields__row--wide{grid-column:1/-1;}
}

.eohr-fields__row{margin:0;display:flex;flex-direction:column;gap:4px;}

.eohr-fields__row--check{background-color:#fffaef;border:1px solid var(--eohr-paper-edge);border-radius:var(--eohr-radius-sm);padding:10px 12px;}

.eohr-fields__row--check input[type=checkbox]{margin-inline-start:0;}

.eohr-fields__label{font-family:var(--eohr-serif);font-weight:700;color:var(--eohr-brown);font-size:13px;}

.eohr-fields__help{color:var(--eohr-ink-soft);font-size:12px;font-style:normal;}

/* System-message mail box (inc/system-messages.php). */
.eohr-notice-mail__field{background-color:#fffaef;border:1px solid var(--eohr-paper-edge);border-radius:var(--eohr-radius-sm);padding:10px;margin:0 0 8px;}

.eohr-notice-mail__title{font-family:var(--eohr-serif);color:var(--eohr-brown);font-size:13px;margin:16px 0 6px;padding-top:12px;border-top:1px solid var(--eohr-paper-edge);}

.eohr-notice-mail__log{margin:0;padding:0;list-style:none;font-size:12px;color:var(--eohr-ink-soft);}

.eohr-notice-mail__log li{padding:8px 10px;border-inline-start:3px solid var(--eohr-amber);background-color:#fffdf8;border-radius:var(--eohr-radius-sm);margin-bottom:6px;}

.eohr-notice-mail__log strong{color:var(--eohr-brown);}

.eohr-notice-mail__failed{color:#b42318;font-weight:700;}

.eohr-notice-mail__pending{background-color:#fffaef;border-inline-start:3px solid var(--eohr-amber-strong);padding:8px 10px;border-radius:var(--eohr-radius-sm);font-size:12px;}

/* System messages in the dashboard widget (inc/system-messages.php). */
.eohr-notice-feed{margin:0;padding:0;list-style:none;}

.eohr-notice-feed__item{padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid var(--eohr-paper-edge);}

.eohr-notice-feed__item:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0;}

.eohr-notice-feed__title{font-family:var(--eohr-serif);color:var(--eohr-brown);font-size:14px;margin:0 0 2px;}

.eohr-notice-feed__date{display:block;color:var(--eohr-ink-soft);font-size:11px;margin-bottom:6px;}

.eohr-notice-feed__body p{margin:0 0 .5em;font-size:13px;line-height:1.6;}

/* Menu screen help (inc/menus.php). */
.eohr-menu-help p:first-child{font-size:14px;}

.eohr-menu-help code{background-color:#fffaef;border:1px solid var(--eohr-paper-edge);}

/* The "research participation" column on the users screen (inc/research-participation.php). */
.eohr-research-done{color:#067647;font-weight:700;}

.eohr-research-pending{color:#8a8580;}

/* The trigger legend in the operational-email settings box (inc/operational-emails.php). */
.eohr-op-email__triggers{margin:.75rem 0 0;padding:0;list-style:none;font-size:12px;line-height:1.6;color:#6b6560;}

.eohr-op-email__triggers li{margin:0 0 .35rem;padding-inline-start:.75rem;border-inline-start:2px solid #e7e5e4;}

.eohr-op-email__triggers li.is-current{color:#4a2c11;border-inline-start-color:#fed72f;}

/* ---- share-preview image picker (inc/social-meta.php) ---- */
.eohr-social-image{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}

.eohr-social-image__preview:empty{display:none;}

.eohr-social-image__preview img{display:block;max-width:180px;height:auto;border-radius:var(--eohr-radius-sm);border:1px solid var(--eohr-paper-edge);}
