/* FM27 R27.90 · Shared, scoped finish for signed-in redesign. */
/* Personal notifications: adjacent to the settings gear, accessible independently. */
body.fm27-midnight .fm27-r2790-notify-wrap{position:relative;display:flex;align-items:center;flex:0 0 auto}
body.fm27-midnight .fm27-r2790-notify-toggle{position:relative}
body.fm27-midnight .fm27-r2790-notify-badge{position:absolute;top:-6px;right:-7px;display:flex;justify-content:center;align-items:center;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:#ef586d;border:2px solid #161c32;color:white;font-size:9px;font-weight:800;font-variant-numeric:tabular-nums}
body.fm27-midnight .fm27-r2790-notify-popover{position:absolute;z-index:1070;right:0;top:calc(100% + 10px);width:min(380px,calc(100vw - 20px));max-height:min(560px,75vh);display:flex;flex-direction:column;background:#15243b;border:1px solid #49668d;border-radius:10px;box-shadow:0 16px 36px rgba(0,0,0,.45);overflow:hidden;color:#e9f2ff}
body.fm27-midnight .fm27-r2790-notify-popover[hidden]{display:none!important}
body.fm27-midnight .fm27-r2790-notify-title{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 15px;background:#1b304d;border-bottom:1px solid #385373;font-size:.9rem}
body.fm27-midnight .fm27-r2790-notify-title button{border:0;background:transparent;color:#a9bfdf;cursor:pointer}
body.fm27-midnight .fm27-r2790-notify-content{overflow-y:auto;overscroll-behavior:contain;min-height:54px}
body.fm27-midnight .fm27-r2790-notification-list{display:flex;flex-direction:column}
body.fm27-midnight .fm27-r2790-notification{display:grid;grid-template-columns:30px minmax(0,1fr) 7px;align-items:start;gap:10px;text-decoration:none;color:#e5edff;padding:12px 13px;border-bottom:1px solid #30435e;font-size:.76rem}
body.fm27-midnight a.fm27-r2790-notification:hover{background:#233d5c;color:#fff}
body.fm27-midnight .fm27-r2790-notification.is-unread{background:#1c3454}
body.fm27-midnight .fm27-r2790-notification-icon{display:grid;place-items:center;width:29px;height:29px;border-radius:7px;background:#294668;color:#9bd3ef}
body.fm27-midnight .fm27-r2790-notification-body{min-width:0;display:flex;flex-direction:column;gap:5px;line-height:1.45;overflow-wrap:anywhere}
body.fm27-midnight .fm27-r2790-notification-body time{font-size:.66rem;color:#8fa8ca}
body.fm27-midnight .fm27-r2790-unread-dot{margin-top:10px;width:7px;height:7px;border-radius:100%;background:#50dba2}
body.fm27-midnight .fm27-r2790-notification-empty{padding:25px;display:flex;align-items:center;flex-direction:column;gap:7px;text-align:center;color:#a9c0db;font-size:.76rem}
body.fm27-midnight .fm27-r2790-notification-empty .bi{font-size:1.4rem;color:#60d6a7}
body.fm27-midnight .fm27-r2790-notification-empty strong{color:#eef5ff}
/* Homepage: the calendar content must fit the available right-hand space, without logo collisions. */
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-calendar-row:not(.fmh-calendar-phase){grid-template-columns:58px minmax(0,1fr) 39px;column-gap:10px;padding-inline:12px;min-width:0;min-height:56px}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-r2790-event-identity{display:grid;grid-template-columns:22px minmax(0,1fr);gap:8px;align-items:center;min-width:0;overflow:visible;white-space:normal}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-r2790-event-crest{display:flex;justify-content:center;align-items:center;width:22px;min-width:22px;overflow:visible}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-r2790-event-crest img{width:20px;height:20px;max-width:20px;object-fit:contain;flex:0 0 20px}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-r2790-event-details{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:3px;overflow:hidden}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-r2790-opponent{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650;font-size:.71rem;line-height:1.35}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-inline-competition{display:flex;align-items:center;gap:5px;min-width:0;max-width:100%;font-size:.63rem;white-space:nowrap;line-height:1.25;overflow:hidden}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-inline-competition .fm27-competition-logo{display:block;flex:0 0 15px;width:15px;height:15px;object-fit:contain;margin:0}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-r2790-competition-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-r2790-kickoff{justify-self:end;white-space:nowrap;min-width:35px}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-calendar-phase{grid-template-columns:58px 20px minmax(0,1fr) 10px;column-gap:8px;min-height:53px;padding-inline:12px}
body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-calendar-phase>span:not(.fmh-phase-dot){min-width:0}
/* Results: slightly more room between date, crest and club, not a bigger card. */
body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row{grid-template-columns:63px 22px minmax(0,1fr) 21px 43px 26px;column-gap:8px;padding-inline:5px}
body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row>img{margin-right:0;max-width:23px}
body.fm27-midnight .fm27-recruitment-offers .fm27-r2790-offer-direction,body.fm27-midnight .fm27-private-inbox .fm27-r2790-offer-direction{font-size:.73rem;white-space:nowrap;color:#c7d8f0}
@media(max-width:600px){body.fm27-midnight .fm27-home-dashboard .fmh-calendar .fmh-calendar-row:not(.fmh-calendar-phase){column-gap:7px;grid-template-columns:55px minmax(0,1fr) 39px;padding-inline:9px}body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row{grid-template-columns:60px 21px minmax(0,1fr) 18px 42px 25px;column-gap:6px}}

body.fm27-midnight .fm27-home-dashboard .fmh-recent-list .fmh-r2790-empty-crest{display:block;width:21px;height:21px;flex:0 0 21px}

body.fm27-midnight .fm27-home-dashboard .fmh-recent-list .fmh-r2790-empty-crest{display:block;width:21px;height:21px;flex:0 0 21px}

/* R27.90a: visible time-to-crest distance = crest-to-opponent distance.
   Earlier R27.79 rules use !important, so override them explicitly rather
   than relying on weaker R27.90 column-gap/grid rules. */
body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row{
  grid-template-columns:63px 22px minmax(0,1fr) 21px 43px 26px!important;
  column-gap:8px!important;
}
body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row>time{
  justify-self:end;text-align:right;white-space:nowrap;margin:0;
}
body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row>img{
  width:21px!important;height:21px!important;max-width:21px!important;
  margin:0!important;object-fit:contain;justify-self:start;
}
body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row>.fmh-r2790-empty-crest{
  justify-self:start;width:21px;height:21px;
}
@media(max-width:600px){
  body.fm27-midnight .fm27-home-dashboard .fmh-recent-list>.fmh-result-row{
    grid-template-columns:58px 21px minmax(0,1fr) 18px 42px 25px!important;
    column-gap:6px!important;
  }
}
