:root {
  --sidebar-width: 80px;
  --header-height: 45px;
  --app-topbar-height: 45px;
  --app-page-header-height: 120px;
  --app-subnav-height: 45px;
  --footer-height: 20px;
  --sidebar-color: #1E3133;
  --app-sidebar-active: #4B5A5C;
  --app-shell-header-bg: #F2F1EF;
  --app-shell-topbar-bg: #E4E1DA;
  --app-shell-border: #E4E1DD;
  --app-shell-accent: #DE985D;
  --app-shell-text: #1E3133;
  --app-shell-muted: #4D5C5F;
  --th-color: #F2F1EF;
  --td-color: #FBF9F8;

  --text-black-0: #000000;
  --text-black-1: #282626;
  --text-grey-0: #AEA8A2;
  --text-grey-1: #6F6964;
  --text-green-1: #1E3133;
  --text-orange-1: #DE985D;
  --text-purple-3: #323050;
  --text-blue-1: #0080FE;

  --text-low-priority: #2E6EFA;
  --text-med-priority: #DBAE44;
  --text-high-priority: #E65545;
  --text-danger: #E65545;
  --text-disabled: #AEA8A2;

  --bg-widget-green-1: #EDF1EE;
  --bg-widget-grey-1: #EFEFF1;
  --bg-widget-yellow-1: #FDF7EB;
  --bg-widget-orange-1: #FCF7F4;

  --bg-btn-orange-1: #DE985D;

  --bg-widget-btn-yellow-1: #F8E6BB;
  --bg-widget-btn-orange-1: #F4D8C3;
  --bg-widget-btn-purple-1: #CACAD3;

  --bg-purple-1: #323050;
  --bg-red: #E65545;
  --bg-orange-1: #DE985D;
  --bg-yellow-1: #F0CC71;
  --bg-white-0: #FFFFFF;
  --bg-grey-0: #FBF9F8;
  --bg-grey-1: #D9D9D9;
  --bg-green-1: #1E3133;

  --bg-green-success: #10B981;
  --bg-green-normal: #C5DEBC;
  --bg-yellow-caution: #FDE68A;
  --bg-red-urgent: #FFB2AA;

  --modal-backdrop: #00000066;

  --hover-grey: #F2F1EF;
  --hover-grey-2: #F3F0EB;
  --hover-orange-1: #EFCDB5;
  --hover-yellow-1: #F2DDA3;
  --hover-purple-1: #B8B8C4;

  --border-grey-1: #E4E1DA;
  --border-grey-2: #BCB6B1;

  --border-disabled: #BCB6B1;

  --border-widget-grey-1: #CACAD3;
  --border-widget-yellow-1: #F8E6BB;
  --border-widget-orange-1: #F4D8C3;
  --border-widget-green-1: #CCD5CD;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f9fafb;
}

a:hover,
a:focus,
a:hover *,
a:focus * {
  color: inherit !important;
}

.widget-small {
  height: 332px;
  width: 406px;
  border-width: 1px;
  border-radius: 10px;
  border-color: var(--border-grey-2);
  overflow: hidden;
}

.widget-small-header {
  height: 77px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.widget-small-content {
  height: 250px;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-left: 20px;
  padding-right: 20px;
  overflow-y: auto;
}


.widget-medium {
  height: 401px;
  width: 406px;
  border-width: 1px;
  border-radius: 10px;
  border-color: var(--border-grey-2);
  overflow: hidden;
}

.widget-medium-content {
  height: 324px;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-left: 20px;
  padding-right: 20px;
  overflow-y: auto;
}

.widget-large {
  height: 539px;
  width: 612px;
  border-width: 1px;
  border-radius: 10px;
  border-color: var(--border-grey-2);
  overflow: hidden;
}

.widget-large-header {
  height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.widget-filter-btn {
  height: 36px;
  width: 114px;
  border: 1px solid var(--border-grey-2);
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.widget-quick-action {
  height: 94px;
  width: 406px;
  border: 1px solid var(--border-grey-2);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile navigation menu styles for caregiver pages */
.caregiver-mobile-menu {
    transition: opacity 0.2s ease-in-out;
}

.caregiver-mobile-menu.-translate-x-full {
    transform: translateX(-100%) !important;
}

/* Custom mobile navbar background */
.mobile-navbar-bg {
    background-color: #4E7780 !important;
}

/* When menu is open, prevent body scrolling */
body.overflow-hidden {
    overflow: hidden;
}

/* Datepicker styling */

/* Chrome/Edge/Safari */

input[type="date"] {
  text-transform: uppercase;
}

/* Default (empty) state */
input[type="date"].optional {
  color: #00000059; /* grey */
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .2px;
}

/* Focus or filled */
input[type="date"].optional.filled,
input[type="date"].optional:focus {
  color: #000; /* black */
}

/* Firefox fallback */
.form-control[type="date"] {
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .2px;   
}

.form-control[type="date"]:focus,
.form-control[type="date"]:valid {
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .2px;   
}

/* Remove native arrow globally */
/* Hide all native arrows */
select {
  -webkit-appearance: none !important;  /* Chrome, Safari */
  -moz-appearance: none !important;     /* Firefox */
  appearance: none !important;          /* Standard */         /* Standard */
  
  background-color: #FFFFFF !important;
  border: 1px solid #E4E1DD !important;
  border-radius: 10px !important;
  padding-right: 2.5rem;     /* space for custom SVG */
  box-shadow: none !important;  /* remove any default shadow */

  /* Custom chevron (matches _chevron_down_svg helper) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F6964' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 0.9rem 0.9rem !important;
}

/* IE/Edge Legacy */
select::-ms-expand {
  display: none;
}

/* Override OS/browser dropdown styling */
select.form-control {
  -webkit-appearance: none;  /* Chrome, Safari */
  -moz-appearance: none;     /* Firefox */
  appearance: none;          /* Standard */
  border-radius: 10px !important;
}

select.form-control.form-control-white,
select.form-control-white,
.form-control.form-control-white {
  background-color: #FFFFFF !important;
}

/* Datepicker styling */
/* Chrome/Edge/Safari */
/* Default (empty) state */
input[type="date"].optional {
  color: #00000059; /* grey */
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .2px;
}

/* Focus or filled */
input[type="date"].optional.filled,
input[type="date"].optional:focus {
  color: #000; /* black */
}

input[type="text"]::placeholder {
    color: #00000059 !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: .2px;
}

input[type="email"]::placeholder {
    color: #00000059 !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: .2px;
}

input[type="tel"]::placeholder {
    color: #00000059 !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: .2px;
}

textarea::placeholder {
    color: #00000059 !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: .2px;
}

/* scrollbar styling */

*::-webkit-scrollbar-track {
  background: transparent;
}

.hide-track::-webkit-scrollbar {
  width: 9px; /* adjust scrollbar width */
  height: 152px;
}

.hide-track::-webkit-scrollbar-thumb {
  background-color: rgba(30, 49, 51, 0.30); /* scrollbar thumb color */
  border-radius: 4px;
}

/* Firefox */
.hide-track {
  scrollbar-width: thin;
  scrollbar-color: #1E31334D;
}

.is-invalid-msg {
    color: red;
    font-size: 12px;
    letter-spacing: .2px;
    color: black;
}

.container-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Main region accounts for fixed header & sidebar */
.main {
  display: flex;
  padding: 0;
  margin: 0;
  padding-left: 0;
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 0;
  /*margin-top: var(--header-height);*/       /* avoid sitting under fixed header */
}

/* Mobile-only: remove left padding so .main spans full width on small screens */
@media (max-width: 640px) {
    .main {
        padding-left: 0 !important;
        margin-top: 30px !important;
    }
}

/* Content to the right of sidebar */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex: 1;
  min-width: 0;
  width: calc(100vw - var(--sidebar-width));
  background-color: #FFF;
  margin-top: 0;
  margin-left: var(--sidebar-width);
  padding-top: var(--app-topbar-height);
  position: relative;
  /*padding-left: 110px;*/
}

@media (max-width: 640px) {
  .main-content {
    width: 100%;
    max-width: 100vw;
    margin-left: 0;
    padding-top: 0;
    overflow-x: hidden;
  }
}

.main-content.collapsed {
    width: calc(100vw - 80px);
    margin-left: 80px;
}

/* Header starts after the sidebar */
.header {
  display: flex;
  justify-content: right;
  align-items: center;
  background-color: var(--sidebar-color);
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  height: var(--header-height);
  flex: 1;
  min-width: 0;
  z-index: 900;                  /* under sidebar so sidebar is visible */
  padding-bottom: 0;
}

.header-menu {
    width: 370px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-right: 5px;
}

.dropdown-menu-language {
    font: Arial;
    font-weight: 550;
    font-size: 16px;
    height: 27px;
    border: none;
    border-radius: 25px;
    text-align: center;
    float: inline-start;
    margin-bottom: 19px
}

#locale-select option {
    font-family: 'Montserrat', sans-serif;
    font-weight:400;
    font-size: 14px;
    letter-spacing: .2px;
    color: black;
}

.divider {
    border: 1px solid #c7c8c7;
    border-radius: 2px;
    height: 45px;
    width: 1px;
    margin-right: 10px;
}

.profile-dropdown {
    padding-top: 4px;
    transition: all 0.3s ease;
}

.profile-dropdown:hover {
    overflow: visible;
    filter: drop-shadow(0 0 12px #4bb7ff)
            drop-shadow(0 0 15px #0059ff);
}

.profile-dropdown:hover svg {
    overflow: visible;
    filter: drop-shadow(0 0 12px #4bb7ff)
            drop-shadow(0 0 15px #0059ff);
}


.profile-pic {
    border-radius: 50px;
    object-fit: cover;
    margin-right: 15px;
    margin-left: -6px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial;
    font-weight: 550;
}

.user-name {
    font-size: 15px;
    margin-bottom: 1px;
}

.invis-dropdown {
    font-size: 12px;
    background-color: #e0e0e0;
    border: none;
}

.logo {
  left: 0;                         /* was 27px */
  text-align: center;
}

.logo.collapsed {
    width: 45px;
    top: 0px;
    left: 20px;
    overflow: hidden;
    transition:
        width 0.3s ease,  
        top 0.3s ease, 
        left 0.3s ease;
}

.logo.collapsed {
    width: 45px;
    top: 0px;
    left: 20px;
}

/* Make the logo fit the sidebar and center it */
.logo img {
  display: block;
  max-width: calc(var(--sidebar-width) - 24px); /* keep some padding */
  height: auto;
  margin: 0 auto;                  /* center the image itself */
}

.logo.collapsed img {
    width: 150px;
    transition: width 0.3s ease;        
}

.logo.collapsed img {
    width: 150px;
}

/* Sidebar pinned to top/left */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: #1E3133;
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;               /* was relative */
  top: 0;
  left: 0;
  z-index: 1000;                 /* above header/content */
  overflow: visible;
  transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-hide-btn-div {
    position: relative;
    z-index: 4;
}

.sidebar-hide-btn {
    height: 30px;
    width: 30px;
    background-color: var(--sidebar-color);
    color: #1E3133;
    border-radius: 50px;
    position: absolute;
    top: 8vh;
    left: -16px;
    z-index: 5;
}

.sidebar.collapsed .sidebar-hide-btn {
    left: 55px;
}

.sidebar-hide-carat {
    position: relative;
    z-index: 5;
    top: 0px;
    left: 10px;
    transition: transform 0.3s ease;
}

.sidebar-hide-carat.collapsed {
    transform: rotate(180deg);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sidebar-menu ul {
    width: 100%;
    list-style: none;
    margin-top: 25px;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu img {
    height: 30px;
    width: 30px;
    margin-right: 5px;
    margin-bottom: -8px;
}

.sidebar-menu ul a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.5s;
}

.sidebar-menu ul a:hover {
    color: white !important;
}

.menu ul {
    list-style: none;
}

.menu li {
    margin-bottom: 20px;
}

.menu li a {
    color: #1E3133;
    text-decoration: none;
    font-size: 18px;
    display: block;
    transition: background-color 0.3s;
}

.menu li a:hover,
.menu li.active a {
    background-color: #3e4a52;
}

.content {
    flex: 1;
    padding: 20px;
    background-color: #f9fafb;
}

.search-bar input {
    width: 300px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.user-info {
    display: flex;
    align-items: center;
}

.user {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.notifications,
.new-item-btn {
    background-color: #3e4a52;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 10px;
    margin-left: 10px;
    cursor: pointer;
}

.page-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.page-title .back-link {
    margin-right: 10px;
    text-decoration: none;
    color: #2b3a42;
    font-size: 16px;
}

.page-title h1 {
    font-size: 24px;
}

/* Reusable page header bar */
.page-header {
  background: #F2F1EF;           /* or #FBF9F8 if you prefer that shade */
  height: 120px;
  display: flex;
  align-items: center;
  padding-left: 20px;
  color: #1E3133;
}

.page-header__title {
  font-size: 24px;
  font-weight: 700; /* bold */
  margin: 0;        /* ensure no default margins push it around */
}

.search-company {
    margin-bottom: 20px;
}

.search-company input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.companies {
    background-color: white;
    
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.company-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.create-company-btn {
    background-color: #3e4a52;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.company-list table {
    width: 100%;
    border-collapse: collapse;
}

.company-list th,
.company-list td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.options-btn {
    background-color: #3e4a52;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Footer aligned with content (not under sidebar).
   SCOPED TO .app-footer, not the bare `footer` element. As a bare selector this
   hit every <footer> in the app, and there are three: this one, the account
   page's centred byline, and the version bar inside the template preview
   document. The other two were being pinned to the bottom of the viewport,
   clipped to 20px and shoved right by the sidebar width — which is how the
   preview's version line came to sit on top of this bar (JJ-3682).
   A <footer> inside an <article> is correct HTML; the stylesheet has to leave
   room for it. */
.app-footer {
  position: fixed;
  bottom: 0;
  height: var(--footer-height);
  flex: 1;
  min-width: 0;
  text-align: center;
  background-color: white;
  margin-left: var(--sidebar-width);
  z-index: 11;
}

/* The prototype's Templates, Knowledge Base, Records and assessment editor
   workspaces use the full canvas. The legacy fixed footer otherwise sits on top of their last row
   and makes the browser comparison look clipped even when the page scrolls. */
body.templates-index .app-footer,
body.templates-new .app-footer,
body.templates-edit .app-footer,
body.templates-previews-show .app-footer,
body.templates-labels-index .app-footer,
body.templates-insights-show .app-footer,
body.knowledge_base-documents-index .app-footer,
body.knowledge_base-documents-show .app-footer,
body.clients-documents-index .app-footer,
body.clients-assessments-new .app-footer,
body.clients-assessments-create .app-footer,
body.clients-assessments-edit .app-footer,
body.clients-assessments-update .app-footer {
  display: none;
}

.icon-text {
    display: flex;
    align-items: center;
     /* Aligns image and text vertically */
}

.icon-class {
    width: 24px; /* Set the width of your icon */
    height: 24px; /* Set the height of your icon */
    margin-right: 11px; /* Add space between the icon and text */
    margin-top: -10px;
}

.invalid {
    color: red;
}

.valid {
    color: green;
}

.password-wrapper {
    position: relative;
    width: fit-content;
}
  
/*#password {
    padding-right: 30px;
}
*/
  
/*#togglePassword {
    position: absolute;
    right: 10px;
    top: 12px;
    transform: translateY(-50%);
    cursor: pointer;
}*/

/*.filter-dropdown {
    border: white;
    appearance: none;
    outline: none;
    
}*/
  
.table-container {
    display: table;
    width: 100%;
    border-collapse: collapse;
  }
  
  .table-header {
    display: table-header-group;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ccc;
  }
  
/*
  .table-row-div {
   display: table-row;
  }
*/
  
  .table-cell-div {
    display: table-cell;
    padding: 10px;
    border: 1px solid #ccc;
    width: 200px;
  }
  
  .table-body {
    display: table-row-group;
  }

/* Modern Calendar Styles - Google Calendar inspired */
.modern-calendar-wrapper {
  --fc-border-color: #e5e7eb;
  --fc-today-bg-color: #eff6ff;
  --fc-event-bg-color: #3b82f6;
  --fc-event-border-color: #2563eb;
  --fc-event-text-color: #ffffff;
  --fc-button-bg-color: #ffffff;
  --fc-button-border-color: #d1d5db;
  --fc-button-text-color: #374151;
  --fc-button-hover-bg-color: #f9fafb;
  --fc-button-active-bg-color: #3b82f6;
  --fc-button-active-text-color: #ffffff;
}

/* Calendar container */
.modern-calendar-wrapper .fc {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header toolbar customization */
.modern-calendar-wrapper .fc-header-toolbar {
  padding: 0 0 1.5rem 0;
  margin-bottom: 0;
}

.modern-calendar-wrapper .fc-toolbar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

/* Button styling */
.modern-calendar-wrapper .fc-button {
  background-color: var(--fc-button-bg-color);
  border: 1px solid var(--fc-button-border-color);
  color: var(--fc-button-text-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease-in-out;
}

.modern-calendar-wrapper .fc-button:hover {
  background-color: var(--fc-button-hover-bg-color);
  border-color: #9ca3af;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.modern-calendar-wrapper .fc-button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.modern-calendar-wrapper .fc-button-active,
.modern-calendar-wrapper .fc-button-active:hover {
  background-color: var(--fc-button-active-bg-color);
  border-color: var(--fc-button-active-bg-color);
  color: var(--fc-button-active-text-color);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Today button special styling */
.modern-calendar-wrapper .fc-today-button {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.modern-calendar-wrapper .fc-today-button:hover {
  background-color: #dbeafe;
  border-color: #93c5fd;
}

/* Grid styling */
.modern-calendar-wrapper .fc-theme-standard td,
.modern-calendar-wrapper .fc-theme-standard th {
  border-color: var(--fc-border-color);
}

.modern-calendar-wrapper .fc-theme-standard .fc-scrollgrid {
  border-color: var(--fc-border-color);
}

/* Day grid styling */
.modern-calendar-wrapper .fc-daygrid-day-frame {
  min-height: 100px;
}

.modern-calendar-wrapper .fc-daygrid-day-number {
  color: #374151;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem;
}

.modern-calendar-wrapper .fc-day-today {
  background-color: var(--fc-today-bg-color);
}

.modern-calendar-wrapper .fc-day-today .fc-daygrid-day-number {
  color: #1d4ed8;
  font-weight: 600;
}

/* Week/month header styling */
.modern-calendar-wrapper .fc-col-header-cell {
  background-color: #f9fafb;
  border-color: var(--fc-border-color);
  padding: 0.75rem 0.5rem;
}

.modern-calendar-wrapper .fc-col-header-cell-cushion {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Event styling */
.modern-calendar-wrapper .fc-event {
  background-color: var(--fc-event-bg-color);
  border-color: var(--fc-event-border-color);
  border-radius: 0.375rem;
  border-width: 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin: 2px;
  font-size: 0.75rem;
  font-weight: 500;
}

.modern-calendar-wrapper .fc-event:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  transition: all 0.15s ease-in-out;
}

.modern-calendar-wrapper .fc-event-title {
  color: var(--fc-event-text-color);
  font-weight: 500;
}

.modern-calendar-wrapper .fc-event-time {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

/* Multiple event colors for different types */
.modern-calendar-wrapper .fc-event.event-type-appointment {
  background-color: #10b981;
  border-color: #059669;
}

.modern-calendar-wrapper .fc-event.event-type-session {
  background-color: #8b5cf6;
  border-color: #7c3aed;
}

.modern-calendar-wrapper .fc-event.event-type-meeting {
  background-color: #f59e0b;
  border-color: #d97706;
}

.modern-calendar-wrapper .fc-event.event-type-break {
  background-color: #6b7280;
  border-color: #4b5563;
}

/* Time grid view enhancements */
.modern-calendar-wrapper .fc-timegrid-slot {
  height: 3rem;
  border-color: var(--fc-border-color);
}

.modern-calendar-wrapper .fc-timegrid-slot-minor {
  border-style: dotted;
  border-color: #e5e7eb;
}

.modern-calendar-wrapper .fc-timegrid-axis {
  background-color: #f9fafb;
  border-color: var(--fc-border-color);
}

.modern-calendar-wrapper .fc-timegrid-axis-cushion {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Improved scrolling for time grid views */
.modern-calendar-wrapper .fc-scroller {
  overflow-y: auto !important;
  max-height: 70vh;
}

.modern-calendar-wrapper .fc-timegrid-body {
  min-height: 100%;
}

/* Mobile time grid adjustments */
@media (max-width: 768px) {
  .modern-calendar-wrapper .fc-scroller {
    max-height: 60vh;
  }
  
  .modern-calendar-wrapper .fc-timegrid-slot {
    height: 2.5rem;
  }
  
  .modern-calendar-wrapper .fc-timegrid-axis-cushion {
    font-size: 0.7rem;
    padding: 0.25rem;
  }
}

/* Now indicator */
.modern-calendar-wrapper .fc-timegrid-now-indicator-line {
  border-color: #ef4444;
  border-width: 2px;
}

.modern-calendar-wrapper .fc-timegrid-now-indicator-arrow {
  border-color: #ef4444;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .modern-calendar-wrapper .fc-toolbar {
    flex-direction: column;
    gap: 1rem;
  }
  
  .modern-calendar-wrapper .fc-toolbar-title {
    font-size: 1.25rem;
    order: -1;
  }
  
  .modern-calendar-wrapper .fc-button-group .fc-button {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .modern-calendar-wrapper .fc-daygrid-day-frame {
    min-height: 80px;
  }
}

/* Loading state */
.modern-calendar-wrapper.fc-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Custom scrollbar for time grid */
.modern-calendar-wrapper .fc-scrollgrid-sync-table {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.modern-calendar-wrapper .fc-scrollgrid-sync-table::-webkit-scrollbar {
  width: 8px;
}

.modern-calendar-wrapper .fc-scrollgrid-sync-table::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.modern-calendar-wrapper .fc-scrollgrid-sync-table::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modern-calendar-wrapper .fc-scrollgrid-sync-table::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Modal Animation Enhancements */
#calendar-event-modal > div:last-child {
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.2s ease-out;
}

#calendar-event-modal:not(.hidden) > div:last-child {
  transform: scale(1);
  opacity: 1;
}

/* Enhanced hover effects for calendar events */
.modern-calendar-wrapper .fc-event {
  transition: all 0.2s ease-in-out;
}

.modern-calendar-wrapper .fc-event:hover {
  transform: translateY(-1px) scale(1.02);
  z-index: 10;
}

/* Loading shimmer effect */
.modern-calendar-wrapper.loading {
  position: relative;
  overflow: hidden;
}

.modern-calendar-wrapper.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Custom more link styling */
.modern-calendar-wrapper .fc-more-link {
  color: #3b82f6;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.modern-calendar-wrapper .fc-more-link:hover {
  background-color: #dbeafe;
  border-color: #93c5fd;
}

/* Popover styling for "more" events */
.modern-calendar-wrapper .fc-popover {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.modern-calendar-wrapper .fc-popover-header {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
}

.modern-calendar-wrapper .fc-popover-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
}

.modern-calendar-wrapper .fc-popover-close {
  color: #6b7280;
  font-size: 1.25rem;
  font-weight: normal;
  opacity: 0.7;
  transition: opacity 0.15s ease-in-out;
}

.modern-calendar-wrapper .fc-popover-close:hover {
  opacity: 1;
}

/* Login page gradient background */
.login-gradient {
    background: #e4e1da;
}

/* Kevin AI chat — markdown replies.
   Assistant messages arrive as sanitized HTML (Ai::MarkdownRenderer) and are
   rendered with `kevin-markdown prose prose-sm` by
   app/javascript/utils/assistant_message_body.js. Prose supplies the base
   typography; these rules tighten spacing for small chat bubbles and give
   tables visible borders. Element selectors (0,1,1) intentionally out-rank
   prose's :where() rules (0,1,0). */
.kevin-markdown p,
.kevin-markdown ul,
.kevin-markdown ol,
.kevin-markdown pre,
.kevin-markdown table,
.kevin-markdown blockquote {
  margin-top: 0.375rem;
  margin-bottom: 0.375rem;
}

.kevin-markdown h1,
.kevin-markdown h2,
.kevin-markdown h3,
.kevin-markdown h4,
.kevin-markdown h5,
.kevin-markdown h6 {
  margin-top: 0.75rem;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
}

.kevin-markdown > :first-child {
  margin-top: 0;
}

.kevin-markdown > :last-child {
  margin-bottom: 0;
}

.kevin-markdown table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.kevin-markdown th,
.kevin-markdown td {
  border: 1px solid #e2e8f0; /* slate-200 */
  padding: 0.25rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.kevin-markdown th {
  background-color: #f8fafc; /* slate-50 */
  font-weight: 600;
}

.kevin-markdown pre {
  overflow-x: auto;
}

/* Dark mode (Help Center docs assistant) */
.dark .kevin-markdown th,
.dark .kevin-markdown td {
  border-color: #475569; /* slate-600 */
}

.dark .kevin-markdown th {
  background-color: rgba(51, 65, 85, 0.5); /* slate-700/50 */
}
