:root {
	--sidebar-color: #2c3e50;
	--sidebar-secondary-color: rgba(255, 255, 255, 0.3);
	--bg-color: #f1f5f9;
	--primary-color: #17c1e8;
	--primary-hover-color: #13a1c2;
	--border-color: #a4c6cf;
	
	
	--primary-base-color: #17c1e8;
	--secondary-base-color: #027E9B;
	--bridge-color: #3f9bb9;
	--deep-shadow-color: #0b3d4a;
	--mist-color: #f0f9fb;

	--sidebar-width-collapsed: 65px;
	--sidebar-icon-width: 58px;
	--sidebar-width-expanded: 210px;
	--transition-speed: 0.3s;
	--sidebar-bg: #027E9B;
	--accent-color: #BEC4CE;
	
	/*--box-shadow: rgba(20, 20, 20, 0.12) 0rem 0.25rem 0.375rem -0.0625rem, rgba(20, 20, 20, 0.07) 0rem 0.125rem 0.25rem -0.0625rem;*/
	--box-shadow: 0 0.46875rem 2.1875rem rgba(4, 9, 20, 0.03), 0 0.9375rem 1.40625rem rgba(4, 9, 20, 0.03), 0 0.25rem 0.53125rem rgba(4, 9, 20, 0.05), 0 0.125rem 0.1875rem rgba(4, 9, 20, 0.03);

	--bg-content: #f7f7f7;
	--secondary-color: #dbdbdb;
	
	--info-bg-color: #e3f2fd;
	--info-border-color: #2196f3;
	--info-font-color: #0d47a1;
	
	--caution-bg-color: #fff3cd;
	--caution-border-color: #ffc107;
	--caution-font-color: #a67e05;
	
	--bs-border-radius: 15px;
	
	--bs-focus-ring-width: 0;
	--bs-focus-ring-opacity: 0;
	--bs-focus-ring-color: none;
	
	--bs-offcanvas-width: 200px;
	
	/* Line Heights (Unitless) */
	--lh-body: 1.6;
	--lh-heading: 1.2;
	/* Fluid Scale calculation: clamp(min, preferred, max) */
	/* Base text (16px -> 18px) */
	--fs-base: 1.6rem; /*clamp(1.4rem, 0.5vw + 1.4rem, 1.8rem); */
	/* H3 (20px -> 28px) */
	--fs-h3: clamp(2.0rem, 1.5vw + 1.5rem, 2.8rem);
		/* H2 (25px -> 40px) */
	--fs-h2: clamp(2.5rem, 3vw + 1.5rem, 4.0rem);
	/* H1 (31px -> 60px) */
	--fs-h1: clamp(3.1rem, 5vw + 1.5rem, 6.0rem);
}

html {
	font-size: 62.5%;
	/* Smooths out font rendering */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body, html {
	/* height: 100%; */
	margin: 0;
}

body {
	font-size: var(--fs-base);
	line-height: var(--lh-body);
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	color: #1a1a1a;
	background-color: var(--bg-content);
	overflow-x: hidden;
	
	/* Max-width for readability (approx 65-75 characters) */
	/*
	max-width: 75ch;
	margin-inline: auto;
	padding: 2rem;
	*/
}


/* ----------------------------------------------------------------- */
/*   Headings and Font Sizes                                         */
/* ----------------------------------------------------------------- */
h1, h2, h3 {
	line-height: var(--lh-heading);
	font-weight: 800;
	margin-top: 0.5em; /* em used so spacing scales with font size */
	margin-bottom: 0.5em;
	color: #000;
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h2.h2-5 { font-size:3rem !important; font-weight:600 !important; }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: 2.4rem; }
h5, .h5 { font-size: 2rem; }
h6 { font-size: 1.6rem; font-weight:600; }

a.h1, a.h2, a.h3, a.h4, a.h5, a.h6 { color:var(--primary-color) }

.fs-base { font-size:var(--fs-base) !important; }
.fs-2rem { font-size:2rem; }

.fc-secondary { color:#999da2; }
.fc-sidebar-20 { color:#d5d8dc; }

.small { font-size: clamp(1.2rem, 0.2vw + 1.1rem, 1.4rem); }
.muted { color:#aaa; }

.page-heading { margin-left:8px; }
.page-heading h3 { color:#67748e !important; }

.section-heading { font-size:clamp(2.8rem, 4vw, 3.6rem); font-weight:400; color:var(--sidebar-color); }


/* ----------------------------------------------------------------- */
/*   Links                                                           */
/* ----------------------------------------------------------------- */
a { color: #0ca7e8; font-weight:500; text-decoration:none; }
a:hover { text-decoration:underline; }
a.btn:hover { text-decoration:none; }


/* ----------------------------------------------------------------- */
/*   Site Navigation                                                 */
/* ----------------------------------------------------------------- */
/* Sidebar Styling */
#sidebar {
	width: var(--sidebar-width-collapsed);
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1050;
	background-color: var(--sidebar-color);
	transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}
#sidebar:hover { width: var(--sidebar-width-expanded); }
#sidebar:hover .nav-text { opacity: 1; }

/* Logo Area */
.sidebar-brand {
	height: 70px;
	display: flex;
	align-items: center;
	padding: 0 15px;
	color: #fff;
	overflow: hidden;
}
.sidebar-brand i {
	min-width: 35px;
	font-size: 2.8rem;
	color: var(--primary-color);
}
.sidebar-brand span {
	font-size:1.8rem;
	font-weight:800;
}

/* Sidebar Navigation Items */
.nav-link {
	display: flex;
	align-items: center;
	padding: 0.85rem 0;
	color: var(--sidebar-secondary-color);
	text-decoration: none;
	transition: all 0.2s;
	white-space: nowrap;
	border-left: 3px solid transparent;
}
.nav-link:hover {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.05);
	border-left-color: #fff;
	text-decoration: none;
}
.nav-link.active {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.1);
	border-left-color: var(--primary-color);
}
.nav-link i {
	min-width: var(--sidebar-icon-width);
	text-align: center;
	font-size: 2rem;
}
.nav-text {
	opacity: 0;
	transition: opacity 0.2s;
	font-weight: 500;
	font-size:1.3rem;
}
.nav-logout {
	color:#fff;
}

#main-content {
	margin-left: var(--sidebar-width-collapsed);
	transition: margin-left var(--transition-speed);
	min-height: 100vh;
	padding: 2rem;
}

.top-navbar {
	background: #fff;
	border-bottom: 1px solid var(--border-color);
	padding: 0.75rem 2rem;
	margin: -2rem -2rem 0 -2rem;
}

.header-title { color:var(--sidebar-color); }
        

/* ----------------------------------------------------------------- */
/*   Buttons                                                         */
/* ----------------------------------------------------------------- */




.btn-light, .btn-light:hover { color: var(--bs-primary); }
.btn-light:hover { background-color:#d8e2f4; }
.btn-sm { border-radius:2rem; }
.btn-light-outline { background:#f8f9fa; border: 1px solid #dee2e6; color:#212529; }
.btn-light-outline:hover { background:#ebedee; border: 1px solid #dee2e6; color:#212529;  }
.btn-outline-primary { border: 1px solid var(--primary-color); color:var(--primary-color); }
.btn-outline-primary:hover { background: var(--primary-color); color:#fff; border-color:var(--primary-color); }
.btn-outline-primary:active { background: #1087a3 !important; }


.btn-link, .btn-link-sm { background:none; border:none; padding:0; margin:0; text-decoration:none; color:#1295b3; }
.btn-link:hover, .btn-link:active { color: #0e7890; text-decoration:underline !important; }
.btn-link-sm { font-size:1.2rem; }
.btn-danger { color:var(--bs-danger); }
.btn-delete { color:#b00000; }
.btn-delete:hover, .btn-delete:active { color:#8d0000; }


.btn {
	border-radius:6px;
	border:2px solid rgb(0,0,0,0.1);
	display:inline-block;
	cursor:pointer;
	padding:5px 20px;
	text-decoration:none;
	font-size:1.6rem;
}
.btn:hover {
	border-color:rgb(0,0,0,0.2) !important;
	text-decoration:none;
}
.btn:active {
	border-color:rgb(255,255,255,0.4) !important;
}
.btn-sm {
	font-size:1.2rem;
	padding:3px 15px;
}
.btn-lg { 
	font-size:2rem !important; 
	padding:8px 25px; 
}
.btn-primary {
	background:var(--primary-color);
	color:#fff;
}
.btn-primary:hover, .btn-primary:active {
	background:#15add0 !important;
}
.btn-success {
	background:#2b915d;
	color:#fff;
}
.btn-success:hover {
	background:#34b070;
}
.btn-danger {
	background:#ab2936;
	color:#fff;
}

.btn-secondary { background-color:#d0d0d0 !important; }
.btn-secondary:hover { background-color:#e1e1e1 !important; }
.btn-secondary:active, .btn-secondary:focus { background-color:#c4c4c4 !important; }
.btn-outline-secondary { border:1px solid #ccc; }
.btn-outline-secondary:hover { background:#aaa; border:1px solid #aaa; }
.btn-outline-secondary:focus, .btn-outline-secondary:active { background:#bbb !important; border:1px solid #bbb !important; }

.btn-input, .btn-input:hover, .btn-input:active { height:40px; padding-top:7px; border-radius:0 10px 10px 0;  }





/* ----------------------------------------------------------------- */
/*   Form Elements                                                   */
/* ----------------------------------------------------------------- */
label { margin-left:4px; }

input:focus, select:focus, textarea:focus {
	outline: none !important;
	box-shadow: 0 0 4px rgba(0,0,0,0.15) !important;
	border: 1px solid var(--primary-color) !important;
}
input[type="text"], input[type="number"], input[type="datetime-local"], input[type="date"], select, textarea, .form-control, .form-select {
	padding: 0.6rem 1rem;
	border: 1px solid #ccc;
	border-radius: 10px;
	font-size: 1.6rem;
	min-height: 40px; /* High touch-target standard */
	transition: border-color 0.2s, box-shadow 0.2s;
	background-color:#fff !important; /* fbfcfd */
}
select { padding-right:3rem !important; }
input[type="checkbox"], input[type="radio"] { border: 1px solid #ccc; }
textarea {  min-height:100px !important;}
.numeric-input { width:75px; }
.nudge-up { top: -3px; position: relative; }
.contact-label, .role-label { min-width:120px; }
select.thin { padding:2px 5px; min-height:inherit; }

		  
.input-icon-group { position:relative; }
.input-icon-group i { position:absolute; top:12px; left:12px; color:#ccc; font-size:1.75rem; }
.input-icon-group input { padding-left:40px; }

input.connected-button { 
	border-right:0 !important; 
	border-top-right-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}

.drag-drop-area { border:2px dashed #ccc; border-radius:10px; background-color: rgb(255,255,255,0.6) !important; color:#999; }

.thread-comment-count { position:relative; font-size:34px; color:var(--sidebar-color); }
.thread-comment-count span { position:absolute; font-size:16px; width:34px; top:10px; text-align:center; font-weight:900; }
		  
        /* Recurrence UI */
        /*.recurrence-panel { background: #f8f9fa; border: 1px solid #dee2e6; padding: 15px; border-radius: 6px; margin-top: 10px; }*/
        .locked-panel { border-radius:12px; background: #e9ecef; color: #6c757d; cursor: not-allowed; opacity: 0.7; }
        
        .hidden { display: none; }
        .inline-inputs { display: flex; gap: 10px; align-items: center; }
        .radio-line { margin-bottom: 8px; display: flex; align-items: center; }
        .radio-line input { margin-right: 8px; }
        
        .checkbox-group { display: flex; gap: 10px; flex-wrap: wrap; }
        .checkbox-item { background: white; padding: 6px 12px; border: 1px solid #ced4da; border-radius: 4px; display: flex; align-items: center; }
        .checkbox-item input { margin-right: 6px; }

        button.btn-save { background: #28a745; color: white; border: none; padding: 12px 20px; width: 100%; font-size: 16px; border-radius: 4px; cursor: pointer; margin-top: 20px;}
        button.btn-save:hover { background: #218838; }

/* ----------------------------------------------------------------- */
/*   Main Content Elements                                           */
/* ----------------------------------------------------------------- */
/*
main { padding-bottom:20px; }
@media (min-width: 1100px) {
	main { max-width:1100px !important; }
}
*/

/* ------------------------------------------------ */
/* UI Card Styling */
/* ------------------------------------------------ */
.filter-box {
	border:1px solid rgb(0,0,0,0.3);
	background:rgb(44, 62, 80,0.04);
	border-radius:5px;
	padding:9px 10px 10px 10px
}
.content-card {
	background:#fff;
	border: 1px solid #dedfe0;
	border-radius: 12px;
	
	/*box-shadow: rgba(0, 0, 0, 0.05) 0rem 1.25rem 1.6875rem 0rem;*/
	transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
	padding: 0.75rem 1.5rem 1.25rem 1.5rem;
}


.content-card-container {
	box-shadow: rgba(0, 0, 0, 0.05) 0rem 1.25rem 1.6875rem 0rem;
	transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.content-card-header {
	border: 1px solid var(--border-color);
	border-radius: 12px 12px 0 0;
	padding: 1rem 2rem 1rem 2rem;
	background: var(--border-color);
	color: #fff;
	font-weight:600;
}
.content-card-body {
	border: 1px solid var(--border-color);
	border-radius: 0 0 12px 12px;
	padding: 1.5rem 2rem 1.75rem 2rem;
	background: #fff;
}

.primary-content-card {
	border: 5px solid #17c1e8;
	background:#fff;
	box-shadow: rgba(20, 20, 20, 0.12) 0rem 0.25rem 0.375rem -0.0625rem, rgba(20, 20, 20, 0.07) 0rem 0.125rem 0.25rem -0.0625rem;
}


.ellipsis-menu button {
	width:40px;
	height:40px;
	background:none;
	border:none;
}
.ellipsis-menu button i {
	font-size:20px; 
	color:#000;
}
.ellipsis-menu button:hover {
	background:#f2f2f2;
}
.ellipsis-menu button:active {
	background:#e1e1e1;
}
.ellipsis-menu ul {
	border:1px solid #f2f2f2;
	border-radius:6px;
}

.ellipsis-menu ul li a:hover {
	text-decoration:none;
	background:#f2f2f2;
}
.ellipsis-menu ul li a:active {
	background:#f2f2f2 !important;
	color: #212529;
}



.block-link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.block-link:active {
	outline:none;
}

/* Wrapper for the entire layout */
.layout-wrapper { display: flex; min-height: 100vh; width: 100%; }

.stats-card {
	border-color: #a4acbb !important; /* c2c7d2 */
	border-left: 7px solid #a4acbb !important;
	background:#fff;
	box-shadow: rgba(20, 20, 20, 0.12) 0rem 0.25rem 0.375rem -0.0625rem, rgba(20, 20, 20, 0.07) 0rem 0.125rem 0.25rem -0.0625rem;
}
.stats-card-edge {
	background:#a4acbb; /* c2c7d2 */
	width:35px !important;
	min-width:35px !important;
	color:#fff;
	font-size:2rem;
}
.stats-card a:hover { text-decoration:underline !important; }

.circle {
  --size: 35px;
  width: var(--size);
  aspect-ratio: 1 / 1;
  font-size: calc(var(--size) * 0.5); /* Text stays proportional */
  
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #67748e;
  color: #fff;
}



.initials-avatar, .initials-avatar-large {
    --size: 48px;

    width: var(--size);
    height: var(--size);
    border-radius: 50%;

    background: #0d6efd;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;
    font-size: calc(var(--size) * 0.4);

    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);

    text-transform: uppercase;
}
.initials-avatar-large {
	width: 90px !important;
	height: 90px !important;
	font-size: 36px !important;
}

.comments-badge i {
    color: #c2c7d2;
    font-size: 3.8rem;
}
.comments-badge span {
    background: #627091;
    font-size: 1.6rem;
    left: 90% !important;
    top: -5px !important;
}
.thread-list-byline {
	border-bottom:1px solid #ddd;
	font-size:1.3rem;
}
.thread-badge {
	background:#fff;
	border:1px solid #cccccc !important;
	color: #67748e;
	text-decoration:none;
	padding-left:10px; padding-right:10px;
}
.thread-badge:hover, .thread-badge.active { text-decoration:none; background:#67748e; border-color:#67748e !important; color:#fff; }
.display-badge { background:#fff !important; border-color:#bbb !important;}


.text-bg-primary { background-color:#17c1e8; }

.person-relationhip-group-label { position:relative; top:5px; }

/* Notes Styling */
        .note-item {
            position: relative;
            padding-left: 20px;
            border-left: 2px solid #e5e7eb;
            margin-bottom: 1.5rem;
            padding-bottom: 0.5rem;
				margin-top:30px; 
        }

        .note-item::before {
            content: '';
            position: absolute;
            left: -7px;
            top: 0;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary-color);
            border: 2px solid white;
        }





.banner {
	border-top: 1px solid;
	border-right: 1px solid;
	border-bottom: 1px solid;
	border-left: 6px solid;
	border-radius: 12px;
	/* box-shadow: rgba(0, 0, 0, 0.05) 0rem 1.25rem 1.6875rem 0rem; */
	box-shadow: rgba(20, 20, 20, 0.12) 0rem 0.25rem 0.375rem -0.0625rem, rgba(20, 20, 20, 0.07) 0rem 0.125rem 0.25rem -0.0625rem;
	align-items: center;
	padding: 15px; 
	margin-bottom: 20px;
}
.banner-info {
	background-color: var(--info-bg-color);
	border-color: var(--info-border-color);
	color: var(--info-font-color);
}
.banner-caution {
	background-color: var(--caution-bg-color);
	border-color: var(--caution-border-color);
	color: var(--caution-font-color);
}
.banner-danger {
	background-color: #f8d7da;
	border-color: #a11e28;
	color: #72151c;
}

.modal-body { padding-top:0; }
.modal-content { padding:10px; border-radius:25px; }
h1.modal-title { margin:0; font-size:2rem; font-weight:500; }

.fa-stack { font-size:1.8rem; }
.fa-stack .fa-circle { color:#ccc; }
.fa-btn { background: none; border: none; padding: 0; }

.attachment-list-item { font-size:2.5rem; font-weight:100; }
.thread-reply {
	border-left: 2px solid #e2e8f0;
	padding: 10px 20px;
	margin-left: 10px;
}


/* ------------------------------------------------ */
/* Responsive Behavior */
/* ------------------------------------------------ */
@media (max-width: 768px) {
	
}
@media (min-width: 1200px) {
	.display-5 {
		font-size: 4rem;
	}
}


/* ------------------------------------------------ */
/* Form Elements */
/* ------------------------------------------------ */

		  
		  

ul.horizontal { list-style-type:none;  margin:0; padding:0; display:inline-block; }
ul.horizontal li { display:inline-block; }


/* ------------------------------------------------ */
/* Weekly Interval Day Selection */
/* ------------------------------------------------ */
.day-toggle-container {
	display: flex;
	gap: 5px;
}
.day-checkbox {
	display: none; /* Hide the actual checkbox */
}
.day-label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	background-color: #e9eef6;
	color: #bdc1c8;
	border-radius: 50%;
	cursor: pointer;
	font-weight: bold;
	user-select: none;
	transition: background-color 0.2s, color 0.2s;
}
/* When the hidden checkbox is checked, style the sibling label */
.day-checkbox:checked + .day-label {
	background-color: #0d6efd; /* Bootstrap Blue */
	color: white;
}
.day-label:hover {
	background-color: #dbdfe7;
}
.day-checkbox:checked + .day-label:hover {
	background-color: #0b5ed7;
}




.check-box-nudge-down { position:relative; top:3px; }


/* Custom Header Box */
.stretch-box {
	padding: 1.25rem;
}

.stretch-box .top-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ex-pt-2 { padding-top:2px; }
.nudge-up-1 { position:relative; top:-1px; }

select[disabled] { color:#aaa; cursor: not-allowed; opacity: 0.7; }
.monthly-repeat-indent { padding-left:117px; }
/*
#endingSection { border-top:1px dashed #ccc; padding-top:10px; margin-top:15px; }
*/

.is-invalid { border:2px solid #960000 !important; }



/* ------------------------------------------------ */
/* Threads */
/* ------------------------------------------------ */
trix-toolbar .trix-button-group { margin-bottom: .5rem; }
.trix-button-row button { background:#fff !important; }
trix-toolbar .trix-button.trix-active { background:var(--primary-color) !important; }
.trix-button-group--file-tools { display: none !important; }
  
trix-editor { min-height: 250px !important; background: white; border-radius: 12px !important; border: 1px solid #dee2e6; }
.trix-editor-thin trix-editor { min-height:100px !important; }
.tag-select { height: auto; }
.attachment-preview { border: 2px dashed #dee2e6; border-radius: 8px; padding: 20px; text-align: center; color: #6c757d; cursor: pointer; }
.attachment-preview:hover { background: #f8f9fa; border-color: #0d6efd; }
.thread-card { transition: transform 0.2s; border: none; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.thread-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.sidebar-card { border: none; border-radius: 15px; }
.badge-tag { font-weight: 500; font-size: 0.75rem; letter-spacing: 0.3px; }
.activity-item { position: relative; padding-left: 20px; border-left: 2px solid #e9ecef; }
.activity-item::before { content: ""; position: absolute; left: -7px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: #0d6efd; border: 2px solid #fff; }

.thread-tag-select-box { max-height: 220px; overflow:auto; }
.thread-reply-col { width:70px; }




/* Hide the checkbox */
.toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Base label style */
.toggle-label {
  display: inline-block;
  padding: 2px 10px !important;
  margin: 0 4px 4px 0;
  border: 2px solid #ccc;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  background: #f8f9fa;
  transition: all 0.2s ease;
  font-size:1.4rem;
}

/* Hover */
.toggle-label:hover {
  border-color: #999;
}

/* Checked state */
.toggle-checkbox:checked + .toggle-label {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.stuck {
  padding-top: 2rem; /* appears only when stuck */
}






/* ------------------------------------------------ */
/* Events Calendar */
/* ------------------------------------------------ */
.calendar-container {
	background: #fff;
	border-radius: 8px;
	box-shadow: var(--box-shadow);
	transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
	border: 1px solid var(--border-color);
}

/* Calendar Header (Days of Week) */
.calendar-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	/*
	background: #bfd7dd;
	border-bottom: 1px solid var(--border-color);
	*/
}

.calendar-header-item {
	padding: 4px;
	text-align: center;
	font-weight: 600;
	font-size: 1.2rem;
	color: var(--sidebar-color);
}

/* Grid Layout for Days */
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

/* Individual Day Cell */
.calendar-day {
	position: relative;
	min-width: 0; /* Prevents flex/grid blowouts */
	height: 160px; /* Fixed height as requested */
	border-right: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	transition: background-color 0.2s ease;
}

.calendar-day:nth-child(7n) {
	border-right: none;
}

.calendar-day:hover {
	background-color: #fcfcfc;
}

/* Top Bar of the Day Cell */
.day-top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 10px;
	height: 35px;
}

/* "New" Link - Hidden by default, shown on hover */
.new-event-link {
	font-size: 1.25rem;
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.new-event-link span { font-size:1.6rem; }

.calendar-day:hover .new-event-link {
	opacity: 1;
}



/* Day Number */
.day-number {
	font-weight: 500;
	font-size: 1.2rem;
	color: #212529;
}
.day-number.today {
	text-align: center;
	background: #67748e;
	color:#fff;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	align-content: center;
}
.other-month {
	background-color: #fbfbfb;
	color: #adb5bd;
}

.other-month .day-number {
	color: #adb5bd;
}

/* Scrollable Events Area */
.events-list {
	height: calc(160px - 35px); /* Total height minus top bar */
	overflow-y: auto;
	padding: 0 8px 8px 8px;
	scrollbar-width: thin; /* Firefox */
}

/* Custom Scrollbar for Chrome/Safari */
.events-list::-webkit-scrollbar {
	width: 4px;
}
.events-list::-webkit-scrollbar-thumb {
	background: #dee2e6;
	border-radius: 4px;
}

/* Individual Event Styling */
.event-item {
	font-size: 1.1rem;
	padding: 4px 8px;
	margin-bottom: 4px;
	border-radius: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	text-decoration:none;
}
.event-item a { text-decoration:none; }
.event-item a:hover { font-weight:500; }

.event-all-day {
	font-weight:600;
	background: #0d6efd !important;
}
.event-all-day a { color: #fff !important; }

.event-blue { background-color: #e7f1ff; color: #0056b3; border-left: 3px solid #0d6efd; }
.event-green { background-color: #e8ffe8; color: #087f5b; border-left: 3px solid #20c997; }
.event-orange { background-color: #fff4e6; color: #d9480f; border-left: 3px solid #fd7e14; }

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
	.calendar-header-item {
		font-size: 0.7rem;
		padding: 8px 4px;
	}
	.calendar-day {
		height: 120px;
	}
	.events-list {
		height: calc(120px - 35px);
	}
	.day-number {
		font-size: 0.8rem;
	}
}
