:root{
  --c-primary: #1B75BC;
  --c-accent:  #00A99D;
  --c-bg:      #F5F7F9;
  --c-card:    #FFFFFF;
  --c-text:    #2E2E2E;
  --c-muted:   #6B7280;
  --radius:    12px;
}

* {
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
}

a{
  color: var(--c-primary);
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

.container{
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 18px;
}

/* =========================================
   HEADER
========================================= */

.site-header{
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .brand{
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  flex: 0 0 auto;
}

.brand-link{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.brand-logo{
  height: 52px;
  width: auto;
  display: block;
}

.brand-title{
  font-size: 16px;
  font-weight: 600;
  margin-top: 6px;
  color: #1f2937;
  line-height: 1.25;
}

.site-header nav{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.site-header a{
  font-weight: 600;
  opacity: .95;
}

.site-header a:hover{
  opacity: 1;
  text-decoration: none;
}

.app-menu{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: 18px;
}

.app-menu__link{
  display: inline-block;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.92;
  color: #1f2937;
}

.app-menu__link:hover{
  opacity: 1;
  color: #2563eb;
  text-decoration: underline;
}

.app-menu__link.is-active{
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-menu{
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.auth-menu a{
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.auth-menu a:hover{
  color: #2563eb;
  text-decoration: underline;
}

.mnr-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  border-bottom: 2px solid #1B75BC !important;
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 0 4px 4px;  
}

.mnr-name {
  font-weight: 600;
  font-size: 14px;
}

.mnr-role {
  font-size: 12px;
  color: #6b7280;
}

/* =========================================
   GENERIC
========================================= */

.card{
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: 28px;
}

.grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.muted{
  color: var(--c-muted);
}

/* =========================================
   BUTTONS
========================================= */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  text-decoration: none !important;
  line-height: 1.2;
}

.btn-primary{
  background: var(--c-accent);
  color: #fff;
}

.btn-primary:hover{
  filter: brightness(0.95);
}

.btn-outline{
  background: transparent;
  border: 2px solid rgba(27,117,188,.25);
  color: var(--c-primary);
}

.btn-outline:hover{
  border-color: rgba(27,117,188,.45);
}

.btn-green{
  background: #57b51f;
  color: #fff;
  border: none;
}

.btn-green:hover{
  filter: brightness(0.96);
  text-decoration: none;
}

.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #d8e0ea;
  color: #1f3b6d;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.btn-secondary:hover{
  text-decoration: none;
  border-color: #b9c7d8;
  background: #fbfdff;
}

/* =========================================
   FRONT PAGE HERO
========================================= */

.cdrcp-hero{
  position: relative;
  width: 100%;
  min-height: 560px;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.88) 0%,
      rgba(255,255,255,0.72) 34%,
      rgba(255,255,255,0.18) 58%,
      rgba(255,255,255,0.05) 100%
    ),
    url("../images/cdrcp-hero.jpg") top center / cover no-repeat;
}

.cdrcp-hero__overlay{
  max-width: 1400px;
  min-height: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 56px 44px;
}

.cdrcp-hero__content{
  max-width: 560px;
}

.cdrcp-hero__content h1{
  margin: 0 0 18px 0;
  font-size: 48px;
  line-height: 1.33;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1f3b6d;
}

.cdrcp-hero__content p{
  margin: 0 0 28px 0;
  font-size: 24px;
  line-height: 1.45;
  color: #425466;
  max-width: 470px;
}

.cdrcp-hero__actions{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================
   LOGIN CARD
========================================= */

.cdrcp-login-card-wrap{
  display: flex;
  justify-content: center;
  margin-top: -54px;
  margin-bottom: 54px;
  position: relative;
  z-index: 3;
}

.cdrcp-login-card{
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border-radius: 18px;
  padding: 30px 30px 28px;
  text-align: center;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
  border: 1px solid #e8edf3;
  position: relative;
}

.cdrcp-login-card::before{
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #57b51f 0%, #1B75BC 50%, #1d4ed8 100%);
}

.cdrcp-login-card__eyebrow{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 12px;
  padding-top: 6px;
}

.cdrcp-login-card h3{
  margin: 0 0 8px 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  color: #1f3b6d;
}

.cdrcp-login-card p{
  margin: 0 0 20px 0;
  font-size: 18px;
  line-height: 1.45;
  color: #4b5563;
  font-weight: 500;
}

.cdrcp-login-card__actions{
  display: flex;
  justify-content: center;
}

/* =========================================
   FEATURES SECTION
========================================= */

.cdrcp-features{
  margin-top: 60px;
  margin-bottom: 60px;
}

.cdrcp-features__title{
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 40px 0;
  color: #1f3b6d;
}

.cdrcp-features__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cdrcp-feature-card{
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  border: 1px solid #e6edf3;
  transition: transform .15s ease, box-shadow .15s ease;
}

.cdrcp-feature-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
}

.cdrcp-feature-card__image{
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.cdrcp-feature-card__content{
  padding: 22px;
}

.cdrcp-feature-card h3{
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 800;
  color: #1f3b6d;
}

.cdrcp-feature-card p{
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #5b6777;
}

/* =========================================
   FOOTER
========================================= */

.site-footer{
  background: #49981a;
  color: #F5F7F9;
  text-align: center;
  padding: 28px 20px;
  font-size: 15px;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
}

.site-footer a{
  color: #F5F7F9;
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover{
  text-decoration: underline;
  opacity: 0.9;
}

.site-footer .container{
  opacity: 0.95;
  letter-spacing: 0.2px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px){
  .header-inner{
    align-items: flex-start;
  }

  .cdrcp-hero{
    min-height: 480px;
  }

  .cdrcp-hero__overlay{
    min-height: 480px;
    padding: 42px 32px;
  }

  .cdrcp-hero__content h1{
    font-size: 52px;
  }

  .cdrcp-hero__content p{
    font-size: 22px;
  }

  .grid{
    grid-template-columns: 1fr;
  }

  .cdrcp-features__grid{
    grid-template-columns: 1fr;
  }

  .cdrcp-features__title{
    font-size: 32px;
  }
}

@media (max-width: 768px){
  .header-inner{
    flex-direction: column;
    align-items: flex-start;
  }

  .app-menu{
    margin-left: 0;
  }

  .auth-menu{
    gap: 12px;
    margin-left: 0;
    justify-content: flex-start;
  }

  .cdrcp-hero{
    min-height: 420px;
    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,0.88) 0%,
        rgba(255,255,255,0.72) 46%,
        rgba(255,255,255,0.28) 100%
      ),
      url("../images/cdrcp-hero.jpg") center center / cover no-repeat;
  }

  .cdrcp-hero__overlay{
    min-height: 420px;
    padding: 30px 22px;
    align-items: flex-start;
  }

  .cdrcp-hero__content h1{
    font-size: 38px;
    line-height: 1.02;
  }

  .cdrcp-hero__content p{
    font-size: 20px;
  }

  .cdrcp-hero__actions{
    flex-direction: column;
    align-items: flex-start;
  }

  .cdrcp-login-card-wrap{
    margin-top: 16px;
  }

  .cdrcp-features{
    margin-top: 8px;
  }

  .cdrcp-feature-card__image{
    height: 200px;
  }

  .cdrcp-feature-card__content{
    padding: 20px;
  }

  .cdrcp-feature-card h3{
    font-size: 20px;
  }

  .cdrcp-features__title{
    font-size: 28px;
  }
}

@media (max-width: 960px){
  .cdrcp-features__grid{
    grid-template-columns: 1fr;
  }
}

.cdrcp-feature-card__content{
  padding: 18px 20px 20px;
}

.cdrcp-feature-card__meta{
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cdrcp-feature-card__icon{
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cdrcp-feature-card__icon svg{
  width: 22px;
  height: 22px;
  display: block;
}

.cdrcp-feature-card__icon--family{
  background: rgba(87,181,31,0.14);
  color: #57b51f;
}

.cdrcp-feature-card__icon--providers{
  background: rgba(27,117,188,0.14);
  color: #1B75BC;
}

.cdrcp-feature-card__icon--safe{
  background: rgba(29,78,216,0.12);
  color: #1d4ed8;
}

.cdrcp-feature-card__text{
  min-width: 0;
}

.cdrcp-feature-card h3{
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 800;
  color: #1f3b6d;
  line-height: 1.2;
}

.cdrcp-feature-card p{
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #5b6777;
}

@media (max-width: 768px){
  .cdrcp-feature-card__meta{
    gap: 12px;
  }

  .cdrcp-feature-card__icon{
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .cdrcp-feature-card__icon svg{
    width: 20px;
    height: 20px;
  }
}

.cdrcp-feature-card--family h3{
  color: #57b51f;
}

.cdrcp-feature-card--providers h3{
  color: #1B75BC;
}

.cdrcp-feature-card--safe h3{
  color: #1d4ed8;
}

/* =========================================
   REGISTER SHORTCODES
========================================= */

.match-register h3{
  display: none;
}

/* =========================================
   REGISTRATION CARD
========================================= */

.card:has(.match-register){
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   REGISTRATION CARD
========================================= */

.card:has(.match-register){
  max-width: 560px;
  margin: 60px auto;
  padding: 34px 34px 30px;
}


/* =========================================
   FORM LAYOUT
========================================= */

.match-register form{
  margin-top: 12px;
}


/* =========================================
   INPUT FIELDS
========================================= */

.match-register input[type="email"],
.match-register input[type="text"]{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d6dde5;
  border-radius: 8px;
  font-size: 15px;
  background: #ffffff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.match-register input:focus{
  outline: none;
  border-color: #1B75BC;
  box-shadow: 0 0 0 3px rgba(27,117,188,0.12);
}


/* =========================================
   BUTTON
========================================= */

.match-register button.btn{
  padding: 12px 22px;
  font-size: 15px;
  border-radius: 8px;
}


/* =========================================
   HELP TEXT
========================================= */

.match-register .muted{
  font-size: 14px;
  color: #6b7280;
}


/* =========================================
   LOGIN LINK
========================================= */

.card > p.muted{
  text-align: center;
  margin-top: 18px;
}

/* =========================================
   LOGIN PAGE
========================================= */

.card:has(#loginform){
  max-width: 560px;
  margin: 60px auto;
  padding: 34px 34px 30px;
}

.card:has(#loginform) h2{
  text-align: center;
  margin-bottom: 24px;
}

#loginform{
  margin-top: 8px;
}

#loginform p{
  margin: 0 0 18px 0;
}

#loginform label{
  display: block;
  font-weight: 600;
  color: #2f3a48;
  margin-bottom: 6px;
}

#loginform .input{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d6dde5;
  border-radius: 8px;
  font-size: 15px;
  background: #ffffff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#loginform .input:focus{
  outline: none;
  border-color: #1B75BC;
  box-shadow: 0 0 0 3px rgba(27,117,188,0.12);
}

#loginform .login-remember label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-bottom: 0;
}

#loginform .login-remember input[type="checkbox"]{
  width: 16px;
  height: 16px;
  margin: 0;
}

#loginform .login-submit{
  margin-top: 22px;
}

#loginform .button.button-primary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 8px;
  border: 0;
  background: #57b51f;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

#loginform .button.button-primary:hover{
  filter: brightness(0.96);
}

.card:has(#loginform) > p.muted{
  text-align: center;
  margin-top: 18px;
}

.card:has(.match-dashboard-loading) {
  text-align:center;
}

/* =========================================
   DASHBOARD TILES
========================================= */

.dashboard-card{
  max-width: 1100px;
  margin: 60px auto;
  padding: 34px;
}

.dashboard-tiles{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.dashboard-tile{
  display: block;
  background: #ffffff;
  border: 1px solid #e6edf3;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.dashboard-tile:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  text-decoration: none;
}

.dashboard-tile--green{
  border-top: 4px solid #57b51f;
}

.dashboard-tile--blue{
  border-top: 4px solid #1B75BC;
}

.dashboard-tile h3{
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 800;
  color: #1f3b6d;
}

.dashboard-tile p{
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #5b6777;
}

@media (max-width: 960px){
  .dashboard-tiles{
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Profile + Care Recipients layout tweaks
   ========================================= */

/* Inner content card width (same as dashboard cards) */
.card > h1 + .card {
  max-width: 1100px; /* adjust if dashboard width differs */
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Hide duplicate inner H2 titles */
.card > h1 + .card > h2 {
  display: none;
}

/* Style PHI / Sensitive labels */
.card > h1 + .card label span.muted {
  color: var(--c-accent);
  font-size: 12px;
}

/* Keep helper muted text unchanged */
.card > h1 + .card .mfp-field > .muted,
.card > h1 + .card #mfp_status,
.card > h1 + .card #mpp_status,
.card > h1 + .card .mfp-avail > .muted {
  color: inherit;
  font-size: inherit;
}

/* =========================================
   Hide debug blocks
   ========================================= */

pre[id$="_debug"] {
  display: none !important;
}

/* =========================================
   Care Recipients table width
   ========================================= */

.card > h1 + .card table.widefat {
  width: 100%;
}

/* =========================================
   Staff Documents moderation dashboard
   ========================================= */

.match-staff-documents-page .msd-filters-card {
  position: sticky;
  top: 24px;
  z-index: 20;
}

.match-staff-documents-page .msd-table th,
.match-staff-documents-page .msd-table td {
  vertical-align: top;
}

.match-staff-documents-page .msd-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.match-staff-documents-page .msd-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.match-staff-documents-page .msd-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.match-staff-documents-page .msd-badge--pending {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.match-staff-documents-page .msd-badge--approved {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.match-staff-documents-page .msd-badge--rejected {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.match-staff-documents-page .msd-preview-modal[hidden] {
  display: none;
}

.match-staff-documents-page .msd-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.match-staff-documents-page .msd-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.match-staff-documents-page .msd-preview-dialog {
  position: relative;
  max-width: 1000px;
  margin: 4vh auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.match-staff-documents-page .msd-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.match-staff-documents-page .msd-preview-body {
  padding: 18px;
  max-height: 82vh;
  overflow: auto;
}

.match-staff-documents-page .msd-table-wrap {
  overflow: auto;
}

@media (max-width: 900px) {
  .match-staff-documents-page .msd-filters-form {
    display: block !important;
  }

  .match-staff-documents-page .msd-filters-form > div {
    margin-bottom: 12px;
  }

  .match-staff-documents-page .msd-preview-dialog {
    margin: 2vh 12px;
  }
}

/* Hide duplicated inner H1 on family/provider documents pages */
.card > h1 + .card > h1 {
  display: none;
}

/* =========================================
   Documents pages cleanup
   ========================================= */

.card > h1 + .card {
  margin-top: 0;
}

.card > h1 + .card > .card:first-of-type {
  margin-top: 0 !important;
}


.card > h1 + .card:not(.match-staff-documents-page) > .card {
  max-width: 1100px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.card > h1 + .card table.widefat {
  width: 100%;
  border-collapse: collapse;
}

.card > h1 + .card table.widefat th,
.card > h1 + .card table.widefat td {
  vertical-align: top;
}

.card > h1 + .card table.widefat td {
  line-height: 1.35;
}

.card > h1 + .card table.widefat tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* === Popover Actions Layout === */

.mpc-shift-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mpc-shift-actions .button {
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
}

/* primary-style */
.mpc-shift-actions .button {
  background: #2563eb;
  color: #fff;
  border: none;
}

.mpc-shift-actions .button:hover {
  background: #1d4ed8;
}

/* cancel / secondary */
.mpc-shift-actions .mpc-btn-cancel,
.mpc-shift-actions .mpc-btn-cancel-shift {
  background: #f3f4f6;
  color: #111827;
}

.mpc-shift-actions .mpc-btn-cancel:hover,
.mpc-shift-actions .mpc-btn-cancel-shift:hover {
  background: #e5e7eb;
}

/* danger  */
.mpc-shift-actions .button.is-danger {
  background: #dc2626;
}

.mpc-shift-actions .button.is-danger:hover {
  background: #b91c1c;
}

/* === Form inside popover === */

.mpc-shift-reschedule-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.mpc-shift-reschedule-form input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.mpc-shift-reschedule-form .button {
  width: 100%;
}

/* === Compact striped tables === */

table.striped {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

/* header */
table.striped thead th {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid rgba(0,0,0,0.08);
  background: #f9fafb;
  font-weight: 600;
}

/* body cells */
table.striped tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  vertical-align: middle;
}

/* zebra stripes */
table.striped tbody tr:nth-child(odd) {
  background: #ffffff;
}

table.striped tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* hover */
table.striped tbody tr:hover {
  background: #eef2ff;
}

/* tighter rows if inside cards */
.card table.striped tbody td {
  padding: 5px 8px;
}

table.striped td:first-child {
  font-weight: 500;
}


/* =========================================
   SHIFT / CALENDAR COMMON UI
========================================= */

.fc-daygrid-event-dot {
  display: none !important;
}

.fc-timegrid-slot.fc-timegrid-slot-lane:empty,
.fc-timegrid-axis:empty {
  display: none;
}

.fc-event-main-frame {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-event-time,
.fc-event-title {
  display: block !important;
  width: fit-content;
  font-size: 11px;
  line-height: 1.2;
}

.match-fc-event-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.match-fc-event-lines .match-fc-time {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
}

.match-fc-event-lines .match-fc-title {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
}

/* =========================================
   PROVIDER / UNIFIED POPOVER (.mpc-*)
========================================= */

.mpc-shift-popover {
  position: absolute;
  z-index: 99999;
  min-width: 220px;
  max-width: 280px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  padding: 12px;
}

.mpc-shift-popover-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.mpc-shift-popover-time {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.mpc-shift-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 28px;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 10px;
}

.mpc-shift-actions .button {
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.mpc-shift-actions .button:not(.is-danger):not(.is-success):not(.is-neutral) {
  background: #2563eb;
  color: #fff;
}

.mpc-shift-actions .button:not(.is-danger):not(.is-success):not(.is-neutral):hover {
  background: #1d4ed8;
}

.mpc-shift-actions .button.is-danger {
  background: #dc2626;
  color: #fff;
}

.mpc-shift-actions .button.is-danger:hover {
  background: #b91c1c;
}

.mpc-shift-actions .button.is-success,
.mpc-shift-actions .mpc-btn-message,
.mpc-shift-actions .mpc-btn-message-recipient,
.mpc-shift-actions .mpc-btn-message-provider {
  background: #16a34a;
  color: #fff;
}

.mpc-shift-actions .button.is-success:hover,
.mpc-shift-actions .mpc-btn-message:hover,
.mpc-shift-actions .mpc-btn-message-recipient:hover,
.mpc-shift-actions .mpc-btn-message-provider:hover {
  background: #15803d;
}

.mpc-shift-actions .button.is-neutral,
.mpc-btn-close-menu {
  background: #f3f4f6;
  color: #111827;
}

.mpc-btn-close-menu {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

.mpc-shift-actions .button.is-neutral:hover,
.mpc-btn-close-menu:hover {
  background: #e5e7eb !important;
  color: #111827 !important;
}

.mpc-divider {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.mpc-shift-reschedule-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.mpc-shift-reschedule-form input[type="date"],
.mpc-shift-reschedule-form input[type="time"] {
  width: 100%;
  box-sizing: border-box;
}

.mpc-shift-message-form {
  display: none;
  margin-top: 10px;
}

.mpc-shift-message-form input[type="text"],
.mpc-shift-message-form textarea,
.mpc-shift-message-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mpc-shift-message-form textarea {
  resize: vertical;
  min-height: 110px;
}

.mpc-msg-status,
.mpc-shift-actions-msg {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.mpc-msg-status.is-error,
.mpc-shift-actions-msg.is-error {
  color: #b42318;
}

.mpc-msg-status.is-success,
.mpc-shift-actions-msg.is-success {
  color: #065f46;
}

/* =========================================
   FAMILY LEGACY POPOVER (.match-shift-*)
   Keep until family shortcodes are fully migrated
========================================= */

.match-shift-popover {
  position: absolute;
  z-index: 99999;
  min-width: 220px;
  max-width: 280px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  padding: 12px;
}

.match-shift-popover-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.match-shift-popover-time {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.match-shift-popover-actions {
  min-height: 28px;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 10px;
}

.match-shift-popover-muted {
  font-size: 12px;
  color: #6b7280;
}

.match-shift-popover-btns {
  display: grid;
  gap: 8px;
}

.match-shift-popover-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
}

.match-shift-popover-btn.is-primary {
  background: #2563eb;
  color: #fff;
}

.match-shift-popover-btn.is-primary:hover {
  background: #1d4ed8;
}

.match-shift-popover-btn.is-danger {
  background: #dc2626;
  color: #fff;
}

.match-shift-popover-btn.is-danger:hover {
  background: #b91c1c;
}

.match-shift-popover-btn.is-success {
  background: #16a34a;
  color: #fff;
}

.match-shift-popover-btn.is-success:hover {
  background: #15803d;
}

.match-shift-message-form {
  display: none;
  margin-top: 10px;
}

.match-shift-message-form.is-open {
  display: block;
}

.match-shift-message-form label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 6px 0;
}

.match-shift-message-form input[type="text"],
.match-shift-message-form textarea,
.match-shift-message-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.match-shift-message-form input[type="text"],
.match-shift-message-form textarea {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.match-shift-message-form textarea {
  resize: vertical;
  min-height: 110px;
}

.match-shift-message-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.match-shift-message-status {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.match-shift-message-status.is-error {
  color: #b42318;
}

.match-shift-message-status.is-success {
  color: #065f46;
}

.match-shift-popover-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.match-shift-popover-close {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  background: #f3f4f6;
  color: #111827;
}

.match-shift-popover-close:hover {
  background: #e5e7eb;
  color: #111827;
}

/* CLOSE MENU (унифицированный) */
.sp-btn-close-menu,
.mpc-btn-close-menu,
.match-shift-popover-close {
  background: #f3f4f6 !important;
  color: #111827 !important;
  border: none !important;
}

.sp-btn-close-menu:hover,
.mpc-btn-close-menu:hover,
.match-shift-popover-close:hover {
  background: #e5e7eb !important;
  color: #111827 !important;
}

/* =========================================
   STAFF SHIFT POPOVER: RESCHEDULE FORM SPACING
========================================= */

.mpc-shift-popover .sp-reschedule-form {
  gap: 10px;
  margin-top: 10px;
}

.mpc-shift-popover .sp-reschedule-form > input {
  margin: 0;
}

.mpc-shift-popover .sp-reschedule-form > div {
  display: flex;
  gap: 8px;
  margin-top: 6px; /* опускаем Save / Cancel чуть ниже */
}

.mpc-shift-popover .sp-btn-close-menu {
  margin-top: 12px;
}

/* Invite button → green like success */
.msm-invite-btn {
  background: #16a34a;       /* green */
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  margin-top: 8px;
}

.msm-invite-btn:hover {
  background: #15803d;
}

.msm-invite-btn:active {
  background: #166534;
}

/* =========================================
   INVITE ACTION BUTTONS (BIG)
========================================= */

/* Base size */
#mpi_accept_btn,
#mpi_decline_btn {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 10px;
}

/* ACCEPT → green */
#mpi_accept_btn {
  background: #16a34a;
  color: #fff;
  border: none;
}

#mpi_accept_btn:hover {
  background: #15803d;
}

/* DECLINE → red */
#mpi_decline_btn {
  background: #dc2626;
  color: #fff;
  border: none;
}

#mpi_decline_btn:hover {
  background: #b91c1c;
}


.mpc-provider-cases-apply-btn,
.mfc-family-cases-apply-btn,
.msc-staff-cases-apply-btn {
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  border: none;
}

/* Past shifts: light grey background, dark grey text */
.fc .fc-event.fc-event-past,
.fc .fc-daygrid-event[aria-disabled="true"] {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #4b5563 !important;
  cursor: default !important;
}

.fc .fc-event.fc-event-past .fc-event-time,
.fc .fc-event.fc-event-past .fc-event-title,
.fc .fc-daygrid-event[aria-disabled="true"] .fc-event-time,
.fc .fc-daygrid-event[aria-disabled="true"] .fc-event-title {
  background: #f3f4f6 !important;
  color: #4b5563 !important;
}

/* Family calendar: past shifts -> light grey */
.fc .fc-daygrid-day.fc-day-past .fc-daygrid-event,
.fc .fc-daygrid-event.fc-event-past,
.fc .fc-daygrid-event[aria-disabled="true"] {
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #4b5563 !important;
  cursor: default !important;
}

/* Inner custom blocks used in family calendars */
.fc .fc-daygrid-day.fc-day-past .fc-daygrid-event .match-fc-time,
.fc .fc-daygrid-day.fc-day-past .fc-daygrid-event .match-fc-title,
.fc .fc-daygrid-event.fc-event-past .match-fc-time,
.fc .fc-daygrid-event.fc-event-past .match-fc-title,
.fc .fc-daygrid-event[aria-disabled="true"] .match-fc-time,
.fc .fc-daygrid-event[aria-disabled="true"] .match-fc-title {
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  color: #4b5563 !important;
  border-color: #d1d5db !important;
}

/* Optional: if some family views still use standard FC inner classes */
.fc .fc-daygrid-day.fc-day-past .fc-daygrid-event .fc-event-time,
.fc .fc-daygrid-day.fc-day-past .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-event.fc-event-past .fc-event-time,
.fc .fc-daygrid-event.fc-event-past .fc-event-title,
.fc .fc-daygrid-event[aria-disabled="true"] .fc-event-time,
.fc .fc-daygrid-event[aria-disabled="true"] .fc-event-title {
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  color: #4b5563 !important;
  border-color: #d1d5db !important;
}

.mpc-req-ok,
.mpc-req-bad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: -2px;
}

.mpc-req-ok {
  color: #16a34a; /* green */
}

.mpc-req-bad {
  color: #dc2626; /* red */
}

.mpc-req-ok svg,
.mpc-req-bad svg {
  display: block;
}
