:root {
	--blue-accent: #5B84E0;
}

html, body {
	overflow-x: hidden;
}

.info-row > div {
	flex: 1;
	margin: 0 5px;
	padding: 5px;
	border: 1px solid #ccc; 
	text-align: center;
}
.info-row > div:first-child {
	margin-left: 0; // Remove the left margin for the first div in the row
}
.info-row > div:last-child {
	margin-right: 0; // Remove the right margin for the last div in the row
}
#pieWrapper {
	width: 30%;  /* Shrink width by 70% */
	height: auto; /* Keep aspect ratio */
	display: block; /* Needed to center the canvas element on the page */
	margin: 0 auto; /* Center the canvas element on the page */
}
.canvas-wrapper {
	width: 70%;     /* This sets the width of the container */
	margin: 0 auto; /* This centers the container horizontally */
}
.canvas-wrapper canvas {
	max-width: 100%;  /* This ensures that the canvas won't exceed its container's width */
	display: block;   /* This helps to remove any potential unwanted space below the canvas */
}
.summary-stats {
	background-color: #009999;
	color: #FFFFFF;
}
.universal-search {
	width: 40% !important;
}
.card-item:hover {
	cursor: pointer;
}

.new-entry-highlight {
    background-color: #fff3cd;
    border-radius: 3px;
}

.new-entry {
    background-color: #fff3cd;
    border-radius: 3px;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.navbar img {
	height:50px
} 

nav span {
	color: #009999;
}
.toggle-text {
	font-size: .8rem;
}
.overall-div {
	border: 5px solid #009999;
}
.overall-title {
	color: 009999;
	margin-top: 8px;
}
.dash-div {
	border: 5px solid red;
}
.dash-title {
	color: red;
	margin-top: 8px;
}
.nav-divider {
	border-right: 1px solid rgb(218, 213, 213);
}
.btn-primary, .btn-view {
	background-color: ##007bff;
	color: white;
	border: white;
}
.btn-primary:hover {
	background-color: #009999;
	border: #009999;
}
.btn-primary:active {
	background-color: #009999 !important;
	border: #009999 !important;
}
.query {
	background-color: lightgoldenrodyellow !important
}
.main {
	max-width: 1260px;
	min-width: 320px;
	margin: auto;
	padding: 0px 10px;
	width: 100%;
	}

.form-component {
	padding: 0px 3px;
}

footer a {
	color: gray;
}
footer a:hover {
	color: #333;
	text-decoration: none;
}
footer p {
	margin-bottom: 0.5rem;
}
.dashcard {
	border: none;
}
.basecard {
	border: none;
}
.chart-header {
	text-decoration: underline;
}
.dg {
	width: 50%;
	display: flex;
	justify-content: center;
}
.dg2 {
	width: 80%;
	display: flex;
	justify-content: center;
}
.dg3 {
	width: 100%;
	display: flex;
	justify-content: center;
}
.chart-container {
	margin: 1rem auto;
	width:65%;
	max-width: 100%;
	padding:5px;
}
.faq-div {
	margin: auto;
}

.faq-answer {
	font-size: .9rem
}
.pop-container {
	width: 55%
}

.feedback-btn {
	position: fixed;
	right: 10px;
	bottom: -4px;
	z-index: 92
}

#graderHeader {
	text-align: center;
}
.card-info-container {
	text-align: center;
	font-family: Arial, sans-serif;
	margin: 20px auto;
	width: 75%;
	background-color: #f8f8f8;
	padding: 20px 0;
}
.card-title {
	margin-bottom: 20px;
}
.info-container {
	width: 75%;  
	margin: 0 auto; // Center the info container
}
.info-row {
	display: flex;
	justify-content: space-between; // Add even spacing between the divs
	flex-wrap: wrap;
	margin-bottom: 10px;
}

#copyLinkButton {
    padding: 5px 10px;
    border-radius: 5px;
}

#copyMessage {
    /* margin-top: 5px; */
    color: green;
}

@media all and (min-width: 768px) {
	.navbar .nav-item .dropdown-menu{ display: none; }
	.navbar .nav-item:hover .dropdown-menu{ display: block; }
	.navbar .nav-item:hover .dropdown-menu.dropdown-menu-split{ display: grid; grid-template-columns: 1fr 1fr; }
	.navbar .nav-item:hover .dropdown-menu.dropdown-menu-split-3{ grid-template-columns: 1fr 1fr 1fr; }
	.navbar .nav-item .dropdown-menu{ margin-top:0; }
}

@media all and (min-width: 1300px) {
	.navbar .nav-item .dropdown-menu{ display: none; }
	.navbar .nav-item:hover .dropdown-menu{ display: block; }
	.navbar .nav-item:hover .dropdown-menu.dropdown-menu-split{ display: grid; grid-template-columns: 1fr 1fr; }
	.navbar .nav-item:hover .dropdown-menu.dropdown-menu-split-3{ grid-template-columns: 1fr 1fr 1fr; }
	.navbar .nav-item .dropdown-menu{ margin-top:0; }

	#gradesTable {
		width: 100%;
		table-layout: fixed;
	}
}

@media only screen and (max-width: 1299px) and (min-width: 900px) {

	.responsive-table {
        width: 60%;
		margin: 0 auto;
		font-size: 0.8em;
        border-collapse: collapse;
    }
    .responsive-table th, .responsive-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }
    .responsive-table th {
        background-color: #f2f2f2;
        font-weight: bold;
    }
    .responsive-table tr:nth-child(even) {
        background-color: #f9f9f9;
    }

}

@media only screen and (max-width: 900px) {
	
	.nav-divider {
		border-right: None;
	}
	.dash-title {
		font-size: 1.75rem;
		margin-top: 8px;
	}
	.dash-div {
		margin-top: 1rem;
	}
	.dash-div {
		margin-top: 1rem;
	}
	.dashcard {
		border: none;
		border-bottom: 2px solid #009999;
		border-radius: 0px;
	}
	.basecard {
		border: none;
	}
	.dg, .dg2, .dg3 {
		width: 100%;
	}
	.faq-div {
		margin: auto;
		width:90% !important;
	}
	.pop-par {
		margin: auto;
		width:90% !important;
	}
	.social-items {
		display: none!important;
	}
	.faq-response {
		font-size: 1rem
	}
	.chart-container {
		width:96% !important;
	}	
	.pop-container {
		width: 96% !important;
	}
	.pop-chart {
		height: 600px;
	}
	.top-cards-form {
		width:96% !important;
	}
	.top-cards-form, h2 {
		font-size: 1.1em !important;
		line-height: 2em !important;
	}
	.pop-header {
		font-size: 1em;
		margin-bottom: -15px !important;
	}
	.data-wrap {
		margin-bottom: .5rem !important;
	}
	.rates {
		margin-top: .5rem !important;
	}
	.item-description {
		font-size: 1.1rem !important;
	}
	footer p {
		margin-bottom: .5rem;
	}
	#filter-text-box {
		width: 90%;
	}
	.card-info-container {
		width: 95%;
	}
	.info-container {
		width: 95%;  
	}
	.canvas-wrapper {
		width: 95%;  
	}

	#pieWrapper {
		width: 90%; 
		height: auto; /* Keep aspect ratio */
		display: block; /* Needed to center the canvas element on the page */
		margin: 0 auto; /* Center the canvas element on the page */
	}
	.universal-search {
		width: 80% !important;
	}
	.population-key > .d-flex.flex-column.flex-md-row > span:nth-child(2) {
		text-align: center;
		display: block;
		margin-top: 5px;
	}
	/* Keep the grader badges inline on mobile */
	.population-key > .d-flex.align-items-center {
		flex-direction: row;
		flex-wrap: nowrap;
	}
	.population-details {
		display: flex; /* Use flex layout */
		justify-content: center; /* Center horizontally */
		align-items: center; /* Center vertically */
		text-align: center; /* Center text alignment */
	}
	.population-details .total-population {
		font-size: 14px; /* Adjusts font size */
		line-height: 1.2; /* Adjust line height for better readability */
		padding: 0 10px; /* Add some padding if needed */
	}
	.responsive-table {
        width: 100%;
		font-size: 0.8em;
        border-collapse: collapse;
    }
    .responsive-table th, .responsive-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }
    .responsive-table th {
        background-color: #f2f2f2;
        font-weight: bold;
    }
    .responsive-table tr:nth-child(even) {
        background-color: #f9f9f9;
    }
}

@media screen and (min-width: 768px) {
    .text-muted p {
        max-width: 600px !important;  /* Fixed width for desktop */
    }
}

@media screen and (max-width: 767px) {
    .text-muted p {
        max-width: 85% !important;  /* Percentage width for mobile */
    }
}

@media screen and (max-width: 768px) {
    #setsTable th:nth-child(n+3), #setsTable td:nth-child(n+3) {
        display: none; /* Hide all columns except the first two */
    }
    
    #setsTable {
        font-size: 0.7rem; /* Even smaller font size for mobile */
    }
}

.table-responsive {
    max-width: 70%;  /* Reduced width for desktop */
    margin: 0 auto;
}

#setsTable {
    font-size: 0.75rem;
    width: 100%;
    table-layout: fixed;
}

#setsTable th, #setsTable td {
    padding: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#setsTable th:first-child, #setsTable td:first-child {
    width: 35%;
}

#setsTable th:nth-child(2), #setsTable td:nth-child(2) {
    width: 15%;
    text-align: right;
}

/* Center align PSA through % Graded columns */
#setsTable th:nth-child(n+3), #setsTable td:nth-child(n+3) {
    text-align: center;
    width: 10%;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .table-responsive {
        max-width: 95%;
    }

    #setsTable {
        font-size: 0.65rem;
    }

    #setsTable th:nth-child(n+3), #setsTable td:nth-child(n+3) {
        display: none;
    }

    #setsTable th:nth-child(2), #setsTable td:nth-child(2) {
        text-align: right !important;
    }
}

/* Reset and rebuild button group styles */
.sort-controls .btn-group {
    display: inline-flex;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sort-controls .btn {
    position: relative;
    flex: 1 1 auto;
    border: 1px solid #dee2e6;
    margin: 0;
    padding: 0.375rem 1rem;
    background-color: #fff;
}

/* Remove double borders between buttons */
.sort-controls .btn + .btn {
    margin-left: -1px;
}

/* Specific border radius for first and last buttons */
.sort-controls .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.sort-controls .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.sort-controls .btn.active {
    z-index: 1;  /* Ensure active button border is visible */
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

/* Hover state */
.sort-controls .btn:hover {
    z-index: 1;
}

/* Navbar specific styles */
.navbar {
    padding: 0.5rem 1rem; /* Reduce overall navbar padding */
}

.navbar .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem !important;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
    color: rgba(0,0,0,.5) !important;
}

/* Base navbar styles */
.navbar .nav-link {
    position: relative;
    text-decoration: none;
}

/* Mobile specific styles */
@media screen and (max-width: 768px) {
    .navbar .nav-link {
        padding: 0.5rem 1rem !important;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .navbar .dropdown-menu {
        padding: 0;
        border: none;
        background: transparent;
    }

    .navbar .dropdown-item {
        padding: 0.5rem 2rem;
        color: rgba(0, 0, 0, 0.7);
    }

    /* Remove any existing underline animations */
    .navbar .nav-link::after {
        display: none;
    } 
}

/* Desktop nav pill hover */
@media screen and (min-width: 769px) {
    .navbar .nav-link:not(.dropdown-toggle)::after {
        display: none;
    }

    .navbar .nav-link {
        border-radius: 4px;
        transition: background-color .2s, color .2s;
    }

    .navbar .nav-link:hover,
    .navbar .nav-item.show > .nav-link {
        background-color: rgba(91, 132, 224, 0.05) !important;
        color: var(--blue-accent) !important;
    }

    .navbar .nav-link.active {
        color: inherit !important;
    }
}

/* Sort controls default styling */
.sort-controls .btn-group .btn {
    padding: 0.375rem 1rem;
}

/* Mobile adjustments for sort controls */
@media screen and (max-width: 768px) {
    .sort-controls .btn-group .btn {
        padding: 0.25rem 0.5rem; /* Reduced padding */
        font-size: 0.75rem; /* Smaller font size */
    }
    
    .sort-controls .btn-group {
        width: 100%; /* Full width container on mobile */
        display: flex;
        justify-content: center;
    }
    
    .sort-controls .btn-group .btn {
        flex: 1; /* Equal width buttons */
        min-width: 0; /* Allow buttons to shrink */
        white-space: nowrap; /* Prevent text wrapping */
    }
}

/* Mobile navbar fixes */
@media screen and (max-width: 768px) {
    #navbarNav .navbar-nav {
        padding: 1rem 0 !important;
    }

    #navbarNav .navbar-nav .nav-item {
        width: 100% !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    }

    #navbarNav .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        width: 100% !important;
        text-align: left !important;
    }
 

    /* Remove underline effect on mobile */
    #navbarNav .navbar-nav .nav-link::after {
        display: none !important;
    }

    /* Style dropdown menu */
    #navbarNav .navbar-nav .dropdown-menu {
        border: none !important;
        background-color: #f8f9fa !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #navbarNav .navbar-nav .dropdown-item {
        padding: 0.75rem 2rem !important;
    }

    /* Handle social items */
    #navbarNav .social-items {
        margin: 1rem 0 0 1rem !important;
    }
 
 
    /* Keep the subtle background */
    #navbarNav .navbar-nav .dropdown > .nav-link {
        background-color: rgba(0, 0, 0, 0.02) !important;
        padding-right: 2.5rem !important;
    }
}

/* Desktop styles */
@media screen and (min-width: 769px) {
    .navbar .nav-link {
        position: relative !important;
    }

    .navbar .nav-link:not(.dropdown-toggle)::after {
        display: none !important;
    }
}

@media screen and (max-width: 768px) {

    /* Change hover color for nav items and dropdown items */
    #navbarNav .navbar-nav .nav-link:hover,
    #navbarNav .navbar-nav .dropdown-item:hover {
        background-color: rgba(0, 0, 0, 0.05) !important; /* Light gray hover */
        color: inherit !important; /* Keep original text color */
    }

    /* Remove any default Bootstrap hover colors */
    #navbarNav .navbar-nav .nav-link:active,
    #navbarNav .navbar-nav .nav-link:focus,
    #navbarNav .navbar-nav .dropdown-item:active,
    #navbarNav .navbar-nav .dropdown-item:focus {
        background-color: rgba(0, 0, 0, 0.05) !important;
        color: inherit !important;
    }
}

/* Desktop styles: only apply on screens wider than 992px (Bootstrap's lg breakpoint) */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
      font-size: 15px;
      padding-left: 12px;
      padding-right: 12px;
      white-space: nowrap;
    }
    .navbar-nav {
      flex-wrap: nowrap;
    }
    .navbar .container {
      flex-wrap: nowrap !important;
    }
  }
  
  /* On mobile, let Bootstrap handle stacking and wrapping */
  @media (max-width: 991.98px) {
    .navbar-nav .nav-link {
      font-size: 16px;
      padding-left: 16px;
      padding-right: 16px;
      white-space: normal;
    }
    .navbar-nav {
      flex-wrap: wrap;
    }
    .navbar .container {
      flex-wrap: wrap !important;
    }
  }

.navbar .dropdown-menu:not(.dropdown-menu-split) {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06);
    padding: 0.75rem 0;
    overflow: hidden;
    right: 0;
    left: auto;
  }

  .navbar .dropdown-toggle::after {
    display: none;
  }

  .dropdown-sub-item {
    padding: 0.4rem 1.25rem;
    display:flex;
    flex-direction: column;
    text-decoration: none;
  }

  .dropdown-sub-item:hover {
    text-decoration: none;
  }

  .dropdown-item:hover,
  .mega-link:hover {
    background-color: rgba(91, 132, 224, 0.05) !important;
  }


  .sub-item-label {
    font-weight: normal;
    font-size: .9rem;
    color: #aaa;
    margin-bottom: 1px;
  }
  .sub-item-description {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0;
  }

  /* Mega menu base */
  .dropdown-menu.dropdown-menu-split {
    display: none;
    min-width: 420px;
    padding: 0;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06);

    right: -40px;
    left: auto;
    overflow: hidden;
  }

  .dropdown-menu.dropdown-menu-split.show {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .dropdown-split-col {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0 1rem;
  }

  .dropdown-split-col + .dropdown-split-col {
    border-left: none;
  }

  .dropdown-menu-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dropdown-menu.dropdown-menu-split-3 {
    min-width: 680px;
  }

  .dropdown-menu.dropdown-menu-split-3.show {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* Column header */
  .dropdown-col-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    margin-bottom:.25rem;
  }

  .dropdown-col-title {
    font-size: 0.875rem;
    font-weight: 400;
    color: #c4cad4;
    letter-spacing: 0.2px;
    line-height: 1;
    margin-bottom:0;
  }

  .dropdown-col-description {
    font-size: 0.68rem;
    color: #bbb;
    margin-bottom: 0;
    line-height: 1.3;
    font-weight: 400;
  }

  /* Sub-item links */
  .mega-link {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1.25rem;
    font-size: 0.82rem;
    color: rgba(0,0,0,.5);
    text-decoration: none;
    transition: color .15s, background .15s;
    line-height: 1.25;
  }

  .mega-link-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #5a5c61;
    margin-bottom: 2px;
  }

  .mega-link-subtitle {
    font-size: 0.78rem;
    font-weight: 400;
    color: #8892a6;
  }

  .mega-link:hover {
    background: rgba(91, 132, 224, 0.06);
    text-decoration: none;
  }

  .mega-link:hover .mega-link-title {
    color: var(--blue-accent);
  }

  .mega-link:hover .mega-link-subtitle {
    color: #6b7489;
  }

  .dropdown-menu-split .dropdown-item:hover {
    background-color: transparent;
  }

  .dropdown-menu.dropdown-menu-split-1 {
    min-width: 280px;
  }

  .dropdown-menu.dropdown-menu-split-1.show,
  .navbar .nav-item:hover .dropdown-menu.dropdown-menu-split-1 {
    display: grid !important;
    grid-template-columns: 1fr;
  }

/* ── Mobile top bar ── */
.mobile-top-bar {
    position: sticky;
    top: 0;
    z-index: 1030;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mobile-nav-hamburger {
    background: none;
    border: none;
    padding: 4px;
    color: var(--blue-accent);
    cursor: pointer;
    line-height: 1;
}

/* ── Mobile nav overlay (sits below top bar) ── */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1029;
    background: #fff;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.open {
    display: flex;
}

.mobile-nav-body {
    flex: 1;
    padding: 1rem 1.25rem 3rem;
}

.mobile-nav-section {
    margin-bottom: 0.5rem;
}

.mobile-nav-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}

.mobile-nav-section + .mobile-nav-section {
    margin-top: 1.5rem;
}

.mobile-nav-item {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(0,0,0,.55);
    text-decoration: none;
    padding: 0.5rem 0.25rem;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: var(--blue-accent);
    background-color: rgba(91, 132, 224, 0.05);
    text-decoration: none;
}
