/* ===========================================================
 * OPUS MUNDI - Main Global Styles
 * Overrides OJS default theme with dark cybernetic aesthetic
 * =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* -------------------------
   Global Reset & Base
   ------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body,
.pkp_structure_page {
  background: linear-gradient(135deg, var(--om-bg-primary) 0%, #0d1117 50%, #141c27 100%);
  color: var(--om-text-primary);
  font-family: var(--om-font-sans) !important;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── LIGHT THEME: body/shell override ──────────────────────────── */
html[data-theme="light"] body,
html[data-theme="light"] .pkp_structure_page {
  background: linear-gradient(135deg, #f0f2f7 0%, #e8ecf4 50%, #f5f6fa 100%) !important;
  color: #1a1f2e !important;
}

/* -------------------------
   Typography
   ------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--om-font-display);
  color: var(--om-text-heading);
  letter-spacing: 0.02em;
}

a {
  color: var(--om-cyan);
  text-decoration: none;
  transition: color var(--om-transition-fast);
}

a:hover {
  color: var(--om-text-heading);
}

/* -------------------------
   Scrollbar Styling
   ------------------------- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--om-bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--om-navy-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--om-cyan);
}

/* -------------------------
   OJS Structure Overrides
   ------------------------- */
.pkp_structure_head {
  background: transparent !important;
  border-bottom: 1px solid var(--om-border) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
}

.pkp_structure_content,
.pkp_structure_main {
  background: transparent !important;
}

.pkp_structure_footer {
  background: var(--om-bg-secondary) !important;
  border-top: 1px solid var(--om-border) !important;
  color: var(--om-text-muted) !important;
  padding: 24px 0 !important;
  font-size: 12px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.pkp_structure_footer a {
  color: var(--om-text-muted) !important;
}

.pkp_structure_footer a:hover {
  color: var(--om-text-secondary) !important;
}

/* -------------------------
   General Panels & Cards
   ------------------------- */
.card,
.pkp_block,
.cmp_block {
  background: var(--om-bg-card) !important;
  border: 1px solid var(--om-border) !important;
  border-radius: var(--om-radius-lg) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: var(--om-shadow-card) !important;
  transition: border-color var(--om-transition), box-shadow var(--om-transition) !important;
}

.card:hover {
  border-color: var(--om-border-accent) !important;
  box-shadow: var(--om-shadow-card), var(--om-shadow-glow) !important;
}

/* -------------------------
   Buttons
   ------------------------- */
.pkp_button,
.btn,
button[type="submit"],
input[type="submit"] {
  background: transparent !important;
  border: 1px solid var(--om-cyan) !important;
  color: var(--om-cyan) !important;
  font-family: var(--om-font-sans) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  padding: 10px 24px !important;
  border-radius: var(--om-radius-sm) !important;
  cursor: pointer !important;
  transition: background var(--om-transition), color var(--om-transition), box-shadow var(--om-transition) !important;
}

.pkp_button:hover,
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--om-cyan) !important;
  color: var(--om-bg-primary) !important;
  box-shadow: 0 0 20px var(--om-cyan-glow) !important;
}

/* CTA Primary button */
.btn-primary,
.submitButton,
.button.highlight {
  background: var(--om-cyan) !important;
  color: var(--om-bg-primary) !important;
  font-weight: 700 !important;
}

/* -------------------------
   Forms
   ------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  background: var(--om-bg-panel) !important;
  border: 1px solid var(--om-border) !important;
  color: var(--om-text-primary) !important;
  border-radius: var(--om-radius-md) !important;
  padding: 10px 14px !important;
  font-family: var(--om-font-sans) !important;
  font-size: 14px !important;
  transition: border-color var(--om-transition), box-shadow var(--om-transition) !important;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--om-cyan) !important;
  box-shadow: 0 0 0 3px var(--om-cyan-dim) !important;
}

input::placeholder {
  color: var(--om-text-muted) !important;
}

label {
  color: var(--om-text-secondary) !important;
  font-size: 12px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* -------------------------
   Tables
   ------------------------- */
table {
  border-collapse: collapse;
  width: 100%;
}

th {
  background: var(--om-bg-panel) !important;
  color: var(--om-text-secondary) !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--om-border) !important;
  text-align: left !important;
}

td {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--om-border) !important;
  color: var(--om-text-primary) !important;
  font-size: 14px !important;
}

tr:hover td {
  background: var(--om-bg-panel) !important;
}

/* -------------------------
   Badges / Tags
   ------------------------- */
.badge,
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-review    { background: rgba(255, 193, 7, 0.15); color: #ffc107; border: 1px solid rgba(255,193,7,0.3); }
.badge-published { background: rgba(0, 191, 165, 0.15); color: var(--om-teal); border: 1px solid rgba(0,191,165,0.3); }
.badge-pending   { background: rgba(130, 130, 130, 0.15); color: var(--om-slate); border: 1px solid rgba(130,130,130,0.3); }
