/*
Theme Name: MIL Portal GP Child
Theme URI: https://mil-osi.com/
Description: Child theme for GeneratePress tuned for MIL HR Portal full-width landing + tight app-style layout.
Author: MIL-OSI
Template: generatepress
Version: 0.1.3
Text Domain: mil-portal-gp-child
*/

/* Keep theme styling neutral so plugin UI dominates */
body{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/**
 * Portal Landing tightening (applies only to pages using the Portal Landing template)
 * Goal: app-bar feel (tight header), full-width content, no sidebars, no redundant title.
 */
body.mil-portal-landing .site-content{
  padding-top: 0 !important;
}

/* Tighten header spacing for portal landing only */
body.mil-portal-landing .site-header .inside-header{
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
body.mil-portal-landing .site-header{
  margin-bottom: 0 !important;
}

/* Neutralize content padding wrappers for portal landing only */
body.mil-portal-landing .inside-article,
body.mil-portal-landing .inside-page-header,
body.mil-portal-landing .entry-content{
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Hide page title on portal landing */
body.mil-portal-landing .entry-header{
  display: none !important;
}

/* Force full width on portal landing */
body.mil-portal-landing .container.grid-container,
body.mil-portal-landing .inside-article,
body.mil-portal-landing .inside-page-header{
  max-width: none !important;
  width: 100% !important;
}

/* Remove sidebars for portal landing */
body.mil-portal-landing .is-right-sidebar,
body.mil-portal-landing .is-left-sidebar,
body.mil-portal-landing #left-sidebar,
body.mil-portal-landing #right-sidebar,
body.mil-portal-landing .sidebar{
  display: none !important;
}

/* Ensure content area takes full width */
body.mil-portal-landing .content-area{
  width: 100% !important;
  float: none !important;
}

/* Reduce any extra top spacing inside main */
body.mil-portal-landing .site-main{
  margin-top: 0 !important;
}

/* Avoid accidental horizontal scroll due to full-width containers */
body.mil-portal-landing{
  overflow-x: hidden;
}

/* -------------------------------------------------------------------------
 * HR Portal (My Leave) – filter pills legibility + status colour-coding
 * -------------------------------------------------------------------------
 * Ensures the "chip" filter buttons remain readable (some stacks inherit white
 * text on white backgrounds) and provides consistent colour tokens matching the
 * leave status badges.
 */

/* Common chip/button selectors used across MIL HR Suite builds */
body.mil-portal-landing .wphr-employee-portal .wphr-chip,
body.mil-portal-landing .wphr-employee-portal .wphr-filter-chip,
body.mil-portal-landing .wphr-employee-portal .wphr-filter-btn,
body.mil-portal-landing .wphr-employee-portal .wphr-leave-filter button,
body.mil-portal-landing .wphr-employee-portal .wphr-leave-filters button{
  color: #1f2937 !important; /* slate-800 */
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 999px !important;
  padding: 8px 12px !important;
  line-height: 1 !important;
}

/* Active state (covers multiple implementations) */
body.mil-portal-landing .wphr-employee-portal .wphr-chip.is-active,
body.mil-portal-landing .wphr-employee-portal .wphr-filter-chip.is-active,
body.mil-portal-landing .wphr-employee-portal .wphr-filter-btn.is-active,
body.mil-portal-landing .wphr-employee-portal .wphr-leave-filter button.active,
body.mil-portal-landing .wphr-employee-portal .wphr-leave-filters button.active,
body.mil-portal-landing .wphr-employee-portal .wphr-leave-filter button[aria-pressed="true"],
body.mil-portal-landing .wphr-employee-portal .wphr-leave-filters button[aria-pressed="true"]{
  color: #ffffff !important;
  background: #111827 !important; /* gray-900 */
  border-color: #111827 !important;
}

/* Status-colour helpers – apply when the chip/button has status classes/attrs */
body.mil-portal-landing .wphr-employee-portal .status-approved,
body.mil-portal-landing .wphr-employee-portal .approved,
body.mil-portal-landing .wphr-employee-portal [data-status="approved"]{
  border-color: #34d399 !important;
  color: #065f46 !important;
}

body.mil-portal-landing .wphr-employee-portal .status-pending,
body.mil-portal-landing .wphr-employee-portal .pending,
body.mil-portal-landing .wphr-employee-portal [data-status="pending"]{
  border-color: #fbbf24 !important;
  color: #92400e !important;
}

body.mil-portal-landing .wphr-employee-portal .status-declined,
body.mil-portal-landing .wphr-employee-portal .declined,
body.mil-portal-landing .wphr-employee-portal [data-status="declined"]{
  border-color: #fb7185 !important;
  color: #9f1239 !important;
}

body.mil-portal-landing .wphr-employee-portal .status-cancelled,
body.mil-portal-landing .wphr-employee-portal .cancelled,
body.mil-portal-landing .wphr-employee-portal [data-status="cancelled"]{
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

/* Ensure selected status chips don't become invisible under the active rule */
body.mil-portal-landing .wphr-employee-portal .status-approved.is-active,
body.mil-portal-landing .wphr-employee-portal .status-pending.is-active,
body.mil-portal-landing .wphr-employee-portal .status-declined.is-active,
body.mil-portal-landing .wphr-employee-portal .status-cancelled.is-active,
body.mil-portal-landing .wphr-employee-portal .approved.is-active,
body.mil-portal-landing .wphr-employee-portal .pending.is-active,
body.mil-portal-landing .wphr-employee-portal .declined.is-active,
body.mil-portal-landing .wphr-employee-portal .cancelled.is-active{
  color: #ffffff !important;
}

body.mil-portal-landing .wphr-employee-portal .status-approved.is-active,
body.mil-portal-landing .wphr-employee-portal .approved.is-active{
  background: #10b981 !important;
  border-color: #10b981 !important;
}
body.mil-portal-landing .wphr-employee-portal .status-pending.is-active,
body.mil-portal-landing .wphr-employee-portal .pending.is-active{
  background: #f59e0b !important;
  border-color: #f59e0b !important;
}
body.mil-portal-landing .wphr-employee-portal .status-declined.is-active,
body.mil-portal-landing .wphr-employee-portal .declined.is-active{
  background: #fb7185 !important;
  border-color: #fb7185 !important;
}
body.mil-portal-landing .wphr-employee-portal .status-cancelled.is-active,
body.mil-portal-landing .wphr-employee-portal .cancelled.is-active{
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
}

