/* ===== BASE ===== */

:root {
  font-size: 100%; /* default */
}


/* Smooth transitions for body styles */
body {
  transition: font-size 0.3s ease, line-height 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

/* Universal Access Icon */
.bi-universal-access {
  font-size: 36px;  /* Increase size */
  color: #0d6efd;   /* Change color (blue example) */
  display: block;   /* optional: if you want it above text in button) */
  margin-bottom: 4px; /* space between icon and text */
}

/* Button container: circular with black inner circle */
.universal-access-btn {
  background-color: #1a1a1a;
  border: none;
  border-radius: 50%;
  padding: 1rem;
  cursor: pointer;

  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;

  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.2);
}

/* White exterior ring */
.universal-access-btn::before {
  content: "";
  position: absolute;
  top: -0.25rem;
  left: -0.25rem;
  width: calc(100% + 0.5rem);
  height: calc(100% + 0.5rem);
  border-radius: 50%;
  background-color: white;
  z-index: -1;
}

/* SVG inside button */
.universal-access-btn svg {
  width: 6rem;       /* increases the size using rem */
  height: 6rem;      /* height scales proportionally */
  color: #1a1a1a;
  transition: transform 0.3s ease;
}

/* Hover effect */
.universal-access-btn:hover svg {
  transform: scale(1.2);
}


/* ===== WIDGET ===== */
.a11y-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
}

.a11y-toggle {
  background: #013168; /* Same background as PAMEC body */
  
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
}


/* ===== MENU ===== */
.a11y-menu {
  display: none;
  width: 400px;
  margin-top: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  max-height: 85vh; 
  overflow-y: auto;
}


/* Menu Header */
.a11y-menu-header {
  display: flex;
  justify-content: center ; /* space-between; */
  align-items: center;
  font-weight: bold;
  /* margin-bottom: 15px; */
  text-align: center;
}

.centered-text {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}

/* Scrollbar */
.a11y-menu::-webkit-scrollbar {
  width: 6px;
}
.a11y-menu::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

/* ===== DIVIDER ===== */
.divider {
  border: 0;
  border-top: 2px solid #0078d4; /* Blue color (Windows 11 primary blue) */
  margin: 20px 0;  /* Add space above and below the divider */
  width: 100%;
  opacity: 0.2;  /* Make it subtle */
}

/* ===== MAIN ICON SIZE CONTROL ===== */
.a11y-main-icon {
  font-size: 36px;   /* 🔥 Increase size here */
  color: #fff;
  display: block;
}


/* ===== PROFILES  ===== */

/* Vision profile */
body.vision {
  font-size: 18px;
  cursor: url('big-cursor.png'), auto ; /* optional custom cursor */
  background-color: #fdfdfd ; /* optional high-contrast background */
}

/* Cognitive profile */
body.cognitive {
  line-height: 1.8;
  background-color: #fffbe0; /* optional highlight background */
}

/* Colorblind profile */
body.colorblind {
  filter: grayscale(0.4) contrast(1.2); /* example color adjustment */
}

/* Motor profile active body */
body.motor {
  cursor: auto; /* default cursor */
}

/* Increase size and spacing for interactive elements when motor profile is active */
body.motor button,
body.motor .a11y-profile-btn,
body.motor input,
body.motor select,
body.motor textarea,
body.motor a {
  padding: 12px 18px;       /* larger hit area */
  font-size: 16px;          /* slightly bigger text */
  min-height: 48px;         /* minimum height for touch targets */
  margin: 6px 0;            /* extra spacing between elements */
  border-radius: 8px;       /* slightly rounded for easier clicking */
  transition: all 0.3s ease;
}

/* Optional: increase spacing for link-like elements */
body.motor a {
  display: inline-block;
  text-decoration: underline;
}

/* Optional: increase spacing & button hit area */
.a11y-profile-btn.motor {
  padding: 12px 16px;
  font-size: 14px;
}
/*  End Motor */

/* Body class for Dyslexia profile */
body.dyslexia {
  font-family: 'OpenDyslexic', 'Comic Sans MS', Arial, sans-serif; /* fallback if OpenDyslexic not available */
  letter-spacing: 0.05em; /* slightly more spacing between letters */
  line-height: 1.6;        /* increase line height for readability */
 /*  background-color: #fefefe; */ /* optional neutral background */
}

/* Optional: larger text for readability */
body.dyslexia .a11y-profile-btn,
body.dyslexia button,
body.dyslexia input,
body.dyslexia select,
body.dyslexia textarea,
body.dyslexia a {
  font-size: 14px;
}


/* Active profile button */
.a11y-profile-btn.active {
  background-color: #e0f0ff;
  transform: scale(1.05);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#profiles-section{
/*  display:flex;*/
  align-items:center;      /* vertical center */
  justify-content:flex-start; /* keep left aligned */
  padding:12px 0;
}

/* Container for toggle + profiles */
.a11y-profiles-container {
  margin-bottom: 10px;
}

/* Profiles toggle button */
.a11y-profiles-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: bold;
  background: #e9ecef;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Chevron using borders */
.a11y-profiles-toggle .chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid #0d6efd;
  border-bottom: 2px solid #0d6efd;
  transform: rotate(-45deg); /* points right initially */
  transition: transform 0.3s ease;
}

/* Rotate chevron down when button is open */
.a11y-profiles-toggle.open .chevron {
  transform: rotate(45deg); /* points down */
}

.a11y-profiles-bar.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

/*End Chevron Span*

.toggle-icon {
  transition: transform 0.3s ease;
}

.a11y-profiles-toggle.open .toggle-icon {
  transform: rotate(180deg);
}

/* ===== PROFILE GRID ===== */
.a11y-profiles-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;

  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

/* Colorblind profile */
body.colorblind {
  filter: grayscale(0.4) contrast(1.2); /* example color adjustment */
}


.grayscale { filter: grayscale(100%) !important; }

.text-spacing { line-height:1.8 !important; letter-spacing:0.12em !important; word-spacing:0.2em !important; }

.line-height { line-height:2 !important; }

.a11y-profiles-bar.open {
  max-height: 300px;
  opacity: 1;
  margin-bottom: 10px;
}


.a11y-profile{
margin-top:5px;
display:grid;
grid-template-columns:repeat(4,1fr);
gap:10px;
animation:fade .25s ease;
}

/* Profile buttons */
/**
.a11y-profile-btn {
  display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
padding:12px;
border:1px solid #ddd;
border-radius:8px;
background:white;
cursor:pointer;
font-size:12px;
}
*/
/* Profile button flex: icon next to text */
.a11y-profile-btn {
  display: flex;
  align-items: center;       /* icon vertically centered */
  justify-content: flex-start; 
  gap: 8px;                  /* space between icon and text */
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  min-width: 100px;          /* optional: uniform button width */
  height: 40px;              /* compact height */
}

/* Larger icon inside button */
.a11y-profile-btn svg,
.a11y-profile-btn img {
  width: 24px;               /* increase size as needed */
  height: 24px;
}


.a11y-profile-btn:hover {
  background: #e6e6e6;
  transform: translateY(-2px);
}



.a11y-profile-btn.active {
  border-color: #0d6efd;     /* highlight border */
  background-color: #e7f1ff; /* subtle background */
  box-shadow: 0 0 6px rgba(13, 110, 253, 0.5); /* glow effect */
}


/* ===== END PROFILES ===== */


/* ===== CONTROLS GRID ===== */
.a11y-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Responsive */
@media (max-width: 600px) {
  .a11y-controls {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== BUTTONS ===== */
.a11y-btn {
aspect-ratio: 1.2 / 1; /* Wider than tall */
  background: white;
/*  background:#0000cc;*/
  border: 1px solid #ccc;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 8px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.a11y-btn:hover {
  background: #e6e6e6;
  transform: translateY(-2px);
}

.a11y-btn.active {
  background: #0078d4;
  color: white;
  border-color: #0078d4;
}


/* ===== ICON COLORS ===== */
.icon-blue { color: #0d6efd; }
.icon-green { color: #198754; }
.icon-red { color: #dc3545; }
.icon-orange { color: #fd7e14; }
.icon-purple { color: #6f42c1; }
.icon-cyan { color: #0dcaf0; }

/* Add grayscale icon color */
.icon-gray { color: #6c757d; } /* gray */
/* ===== MODES ===== */
.high-contrast {
  background: #000 !important;
  color: #fff !important;
}

.highlight-links a {
  outline: 3px solid yellow;
}

.highlight-headings h1,
.highlight-headings h2,
.highlight-headings h3 {
  background: yellow;
  color: black;
}

.big-cursor {   cursor: pointer; }

/* ===== COLOR FILTERS ===== */

/* Color blindness filters */
.protanopia { filter: url('#protanopia'); }

.deuteranopia { filter: url('#deuteranopia'); }

.spacing-large { line-height: 2 !important; }

.spacing-normal { line-height: 1.5 !important; }

.text-large { font-size: 1.25rem !important; }

.text-small { font-size: 0.9rem !important; }

.colorFilter { filter: saturate(150%); } ; /* filter: invert(90%); */  /*invert-90*/

#reading-guide { display:none; }

.legible-font {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.05em;
}

/* Hide images */
.hide-images img {  display: none !important; }

.dyslexia-font {  
	font-family: 'OpenDyslexic', 'Comic Sans MS', Arial, sans-serif; /* fallback if OpenDyslexic not available */
  	letter-spacing: 0.05em; /* slightly more spacing between letters */
  	line-height: 1.6;
	/* font-family: 'OpenDyslexic', 'Comic Sans MS', Arial, sans-serif !important; */ 
}

.a11y-controls button {
  flex-direction: column; /* icon above text */
  align-items: center;
  justify-content: center;
}

/* Highlight active control button */
.a11y-controls button.active {
  border-color: #0d6efd;      /* blue border */
  background-color: #e7f1ff;  /* light blue background */
  box-shadow: 0 0 6px rgba(13, 110, 253, 0.5); /* subtle glow */
}

.a11y-controls .btn-text {
  display: block;
  font-size: 14px;
  margin-top: 4px;
  text-align: center;
}


/* PROFILE GRID */

.accessibility-profiles{
margin-top:15px;
display:grid;
grid-template-columns:repeat(3,1fr);
gap:10px;
animation:fade .25s ease;
}

.hidden{
display:none;
}

/* PROFILE BUTTONS */

.access-profile-btn{
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
padding:12px;
border:1px solid #ddd;
border-radius:8px;
background:white;
cursor:pointer;
font-size:12px;
}

.access-profile-btn img{
width:24px;
margin-bottom:5px;
}

.access-profile-btn:hover{
background:#0078d4;
color:white;
}

/* ACTIVE PROFILE */

.profile-active{
background:#0078d4;
color:white;
}