/*
 * Localworks × WordPress — Setup / Install Branding
 * Deploy as: wp-admin/css/install.min.css (overwrite existing)
 *
 * Universal card stack: every visible body child after #logo gets
 * white bg at the same width → seamless card on ALL wizard pages.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ═══ PAGE ════════════════════════════════════════════════ */
html {
  height: 100% !important;
  background: #120E48 !important;
}

body {
  min-height: 100vh !important;
  margin: 0 !important;
  background: linear-gradient(160deg, #120E48 0%, #1A1464 40%, #2D2496 100%) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3rem 1.5rem !important;
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased !important;
}

/* ═══ LOGO ════════════════════════════════════════════════ */
#logo {
  font-size: 0 !important;
  color: transparent !important;
  text-align: center !important;
  margin: 0 0 2rem !important;
  padding: 0 !important;
  line-height: 1 !important;
  background: transparent !important;
  max-width: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#logo a { display: none !important; }

#logo::before {
  content: 'Localworks';
  display: block !important;
  font-size: 2.5rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  color: #fff !important;
  line-height: 1 !important;
  text-shadow: 0 4px 30px rgba(0,0,0,.35) !important;
  margin-bottom: 0.5rem !important;
}

#logo::after {
  content: '\00d7  WordPress';
  display: block !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,.35) !important;
}

/* ═══ SCREEN-READER TEXT ═════════════════════════════════ */
h1.screen-reader-text, .screen-reader-text {
  display: none !important;
}

/* ═══ UNIVERSAL CARD STACK ═══════════════════════════════
   All visible siblings after #logo get white bg + same width.
   They join into one seamless card. */
#logo ~ *:not(.screen-reader-text):not(script):not(style) {
  background: #fff !important;
  max-width: 440px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;
  box-sizing: border-box !important;
  position: relative !important;
}

/* Top of card — first visible element after screen-reader h1 */
h1.screen-reader-text + *,
#logo + *:not(.screen-reader-text) {
  border-radius: 20px 20px 0 0 !important;
  padding-top: 2.5rem !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 8px 40px rgba(0,0,0,.22),
    0 30px 80px -20px rgba(0,0,0,.4) !important;
}

/* Orange accent line at top */
h1.screen-reader-text + *::before,
#logo + *:not(.screen-reader-text)::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 10% !important;
  right: 10% !important;
  height: 3px !important;
  border-radius: 0 0 3px 3px !important;
  background: linear-gradient(90deg, #FF8C00, #FFB347, #FF8C00) !important;
  z-index: 1 !important;
}

/* Bottom of card — last body child */
body > *:not(#logo):not(.screen-reader-text):not(script):not(style):last-child {
  border-radius: 0 0 20px 20px !important;
  padding-bottom: 2rem !important;
}

/* Single-element card (form pages) — full radius */
h1.screen-reader-text + *:last-child,
#logo + *:not(.screen-reader-text):last-child {
  border-radius: 20px !important;
  padding-bottom: 2rem !important;
}

/* ═══ HEADINGS ═══════════════════════════════════════════ */
h1:not(.screen-reader-text), h2, h3 {
  color: #1A1464 !important;
  font-weight: 700 !important;
  font-size: 1.125rem !important;
  margin: 0 0 1rem !important;
  line-height: 1.35 !important;
}

/* ═══ LABELS ═════════════════════════════════════════════ */
label, th {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #1A1464 !important;
  margin-bottom: 0.25rem !important;
}

/* ═══ INPUTS ═════════════════════════════════════════════ */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea, select {
  border: 1.5px solid #E2E4EC !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.9375rem !important;
  font-family: inherit !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: #F8F9FC !important;
  color: #1F2937 !important;
  transition: border-color .15s, box-shadow .15s, background .15s !important;
  outline: none !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus, select:focus {
  border-color: #FF8C00 !important;
  box-shadow: 0 0 0 3px rgba(255,140,0,.15) !important;
  background: #fff !important;
}

/* Language multi-select */
select[name="language"], #language {
  height: 280px !important;
  border-radius: 10px !important;
  padding: 0.25rem 0 !important;
  font-size: 0.875rem !important;
  margin-bottom: 1.25rem !important;
  cursor: pointer !important;
}

select option:checked {
  background: linear-gradient(90deg, #FF8C00, #FFB347) !important;
  color: #fff !important;
}

/* ═══ BUTTONS ════════════════════════════════════════════ */
input[type="submit"],
button[type="submit"],
.button, .button-primary, .button-large,
.step .button, .step a {
  background: linear-gradient(135deg, #FF8C00, #FF9E2C) !important;
  background-image: linear-gradient(135deg, #FF8C00, #FF9E2C) !important;
  border: none !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  font-family: inherit !important;
  padding: 0.8rem 2.25rem !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  box-shadow: 0 4px 16px rgba(255,140,0,.35) !important;
  text-shadow: none !important;
  display: inline-block !important;
  height: auto !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.button:hover, .button-primary:hover,
.step .button:hover, .step a:hover {
  background: linear-gradient(135deg, #E07B00, #FF8C00) !important;
  background-image: linear-gradient(135deg, #E07B00, #FF8C00) !important;
  box-shadow: 0 6px 24px rgba(255,140,0,.5) !important;
  transform: translateY(-2px) !important;
}

input[type="submit"]:active,
button[type="submit"]:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(255,140,0,.3) !important;
}

/* ═══ FORM TABLE (DB config step) ════════════════════════ */
table.form-table { width: 100% !important; border-collapse: collapse !important; }
table.form-table th, table.form-table td {
  padding: 0.375rem 0 !important;
  display: block !important;
  width: 100% !important;
}
table.form-table tr { display: block !important; margin-bottom: 0.5rem !important; }

/* ═══ TEXT ════════════════════════════════════════════════ */
p {
  font-size: 0.875rem !important;
  color: #6B7280 !important;
  line-height: 1.65 !important;
  margin-top: 0 !important;
}

ol, ul {
  color: #6B7280 !important;
  font-size: 0.875rem !important;
  line-height: 1.65 !important;
  padding-left: 1.25rem !important;
}

li { margin-bottom: 0.25rem !important; color: #6B7280 !important; }

a { color: #1A1464 !important; text-decoration: none !important; font-weight: 500 !important; }
a:hover { color: #FF8C00 !important; }

code {
  background: #F0F1F5 !important;
  padding: 0.15rem 0.45rem !important;
  border-radius: 4px !important;
  font-size: 0.8125rem !important;
  color: #1A1464 !important;
}

/* ═══ NOTICES ════════════════════════════════════════════ */
.error, .notice, .updated, .message {
  border-left: 4px solid #FF8C00 !important;
  border-radius: 0 10px 10px 0 !important;
  background: #FFF8F0 !important;
  padding: 0.75rem 1rem !important;
  margin: 0 0 1rem !important;
}

/* ═══ FOOTER ATTRIBUTION ════════════════════════════════ */
body::after {
  content: 'Powered by Localworks \00b7  Built with WordPress';
  display: block !important;
  text-align: center !important;
  color: rgba(255,255,255,.25) !important;
  font-size: 0.6875rem !important;
  letter-spacing: 0.06em !important;
  margin-top: 2rem !important;
  font-weight: 500 !important;
  background: transparent !important;
  max-width: none !important;
  width: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: static !important;
}

/* ═══ RESPONSIVE ═════════════════════════════════════════ */
@media (max-width: 520px) {
  body { padding: 2rem 1rem !important; }
  #logo ~ *:not(.screen-reader-text) {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  #logo::before { font-size: 2rem !important; }
}
