@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');
@import 'tailwindcss';
@import '../styles/keyboard-management.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
.secondary-button.disabled_button,
.secondary-button:disabled {
  background-color: var(--grey);
  color: var(--disabled-text);
  border: var(--disabled-button-stroke) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--disabled-button-stroke);
  cursor: not-allowed;
}
/* Ensure input-field class has border styling */
.input-field {
  border: 0.5px solid #696969; /* matches border-gray-300 */
  border-radius: 0.375rem; /* matches rounded-md */
}

/* Root variables */
:root {
  --background: #ffffff;
  --foreground: #171717;
  --vector-violet: #7d32ce;
  --vector-violet-light: #bd86f8;
  --eigen-purple: #421e68;
  --midnight-theorem: #1d1a34;
  --blueprint-blue: #4d5ded;
  --blueprint-blue-light: #8793ff;
  --radical-rose: #ff6e99;
  --chalk-dust: #e8e8e8;
  --white: #ffffff;
  --black: #000000;
  --grey: #696969;
  --disabled-text: #989898;
  --disabled-button-stroke: #393939;
}

/* Theme variables */
@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --main-button-color: var(--vector-violet);
  --main-button-stroke: var(--eigen-purple);
  --font-color: var(--black);
  --form-outline: var(--midnight-theorem);
  --sub-category-color: var(--vector-violet-light);
  --sub-category-hover-color: var(--blueprint-blue-light);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #201f1f;
    --foreground: #ededed;
    --font-color: #ffffff;
    --form-outline: var(--chalk-dust);
    --sub-category-color: var(--eigen-purple);
    --sub-category-hover-color: var(--blueprint-blue);
  }
}

/* Body */
body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Nunito', Arial, Helvetica, sans-serif;
  font-weight: 400;
  height: 100vh;
  /* padding: 5%; */
}

.header-landing {
  box-shadow: 0px 2px 2px 0px rgba(105, 105, 105, 0.25);
}

/* Links */
a {
  padding: 0%;
  margin: 0%;
  text-decoration: none;
  color: var(--font-color);
}

/* Navigation */
.nav-link-item {
  padding: 0% 5%;
}

/* Header styling */
.header_styling {
  background-color: var(--background);
  box-shadow: -2px 0px 4px 0px rgba(105, 105, 105, 0.25);
}

.footer_styling {
  background-color: var(--background);
}

/* Sub categories */
.sub_categories {
  margin: 2% 0%;
  border-radius: 5px;
  background-color: var(--sub-category-color);
}

.sub_categories:hover {
  background-color: var(--sub-category-hover-color);
}

/* Forms */
form {
  margin-top: 10%;
}

input,
textarea {
  width: 100%; /* Changed from 500px to 100% */
  padding: 1%;
  background-color: transparent;
  border: none;
  color: var(--font-color);
}

.math-input {
  width: 100%;
  padding: 3%;
}

input:focus-visible,
textarea:focus-visible {
  outline: var(--radical-rose) 2px solid;
}

.form_heading {
  font-weight: 800;
  font-size: 16px;
}

.top_form_input {
  border: var(--form-outline) 1px solid;
  border-radius: 5px 5px 0px 0px;
}

.bottom_form_input {
  border-top: none;
  border-bottom: var(--form-outline) 1px solid;
  border-left: var(--form-outline) 1px solid;
  border-right: var(--form-outline) 1px solid;
  border-radius: 0px 0px 5px 5px;
}

.single_form_input {
  border: var(--form-outline) 1px solid;
  border-radius: 5px;
}

.btn-link {
  margin: 0.5% 0%;
}

/* Logo */
.logo-text {
  font-size: 50px;
  margin: 0;
  font-weight: 1000;
}

/* Buttons */

.header-button {
  background-color: var(--main-button-color);
  color: var(--white);
  font-size: 16px;
  width: 300px;
  padding: 3%;
  margin: 1.5% 0%;
  border: var(--main-button-stroke) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--main-button-stroke);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.header-button:hover {
  background-color: var(--blueprint-blue);
  color: var(--white);
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue-light);
  border: var(--blueprint-blue-light) 1px solid;
}

.header-button:active {
  transform: translateY(5px);
}

.main-button {
  background-color: var(--main-button-color);
  color: var(--white);
  font-size: 16px;
  width: 500px;
  padding: 3%;
  margin: 1.5% 0%;
  border: var(--main-button-stroke) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--main-button-stroke);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.signup-button {
  background-color: var(--main-button-color);
  color: var(--white);
  font-size: 16px;
  width: 500px;
  padding: 1%;
  margin: 1.5% 0%;
  border: var(--main-button-stroke) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--main-button-stroke);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.main-button-landing {
  background-color: var(--main-button-color);
  color: var(--white);
  font-size: 16px;
  width: 500px;
  padding: 3%;
  margin: 1.5% 0%;
  border: var(--main-button-stroke) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--main-button-stroke);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.disabled_button {
  background-color: var(--grey);
  color: var(--disabled-text);
  font-size: 16px;
  width: 500px;
  padding: 3%;
  margin: 1.5% 0%;
  border: var(--disabled-button-stroke) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--disabled-button-stroke);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.main-button:hover {
  background-color: var(--blueprint-blue);
  color: var(--white);
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue-light);
  border: var(--blueprint-blue-light) 1px solid;
}

.signup-button:hover {
  background-color: var(--blueprint-blue);
  color: var(--white);
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue-light);
  border: var(--blueprint-blue-light) 1px solid;
}

.main-button-landing:hover {
  background-color: var(--blueprint-blue);
  color: var(--white);
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue-light);
  border: var(--blueprint-blue-light) 1px solid;
}

.main-button:active {
  transform: translateY(5px);
}

.signup-button:active {
  transform: translateY(5px);
}

.main-button-landing:active {
  transform: translateY(5px);
}

.secondary-button {
  background-color: transparent;
  color: var(--font-color);
  font-size: 16px;
  width: 500px;
  padding: 3%;
  margin: 1.5% 0%;
  border: var(--vector-violet) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--vector-violet);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.community-button {
  background-color: transparent;
  color: var(--font-color);
  font-size: 16px;
  width: 500px;
  padding: 1.1%;
  margin: 1.5% 0%;
  border: var(--vector-violet) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--vector-violet);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.secondary-button:hover {
  background-color: transparent;
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue);
  border: var(--blueprint-blue) 1px solid;
}

.community-button:hover {
  background-color: transparent;
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue);
  border: var(--blueprint-blue) 1px solid;
}

.secondary-button:active {
  transform: translateY(5px);
}

.community-button:active {
  transform: translateY(5px);
}

.signup-button-secondary {
  background-color: transparent;
  color: var(--font-color);
  font-size: 16px;
  width: 500px;
  padding: 1%;
  margin: 1.5% 0%;
  border: var(--vector-violet) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--vector-violet);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.signup-button-secondary:hover {
  background-color: transparent;
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue);
  border: var(--blueprint-blue) 1px solid;
}

.signup-button-secondary:active {
  transform: translateY(5px);
}

.google-button {
  width: 250px;
  margin: auto;
  background-color: transparent;
  color: var(--font-color);
  font-size: 16px;
  border: var(--vector-violet) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--vector-violete);
  border-radius: 5px;
}

.mc-button {
  background-color: var(--main-button-color);
  color: var(--white);
  font-size: 22px;
  width: 500px;
  padding: 2%;
  margin: 1.5% 0%;
  border: var(--main-button-stroke) 1px solid;
  box-shadow: 2px 2px 0px 0px var(--main-button-stroke);
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 3px;
  transition: 0.3s ease-out;
}

.mc-button:hover {
  background-color: var(--blueprint-blue);
  color: var(--white);
  box-shadow: 2px 2px 0px 0px var(--blueprint-blue-light);
  border: var(--blueprint-blue-light) 1px solid;
}

.mc-button:active {
  transform: translateY(5px);
}

/* Misc */
.break {
  height: 50px;
}

.break_small {
  height: 30px;
}

.disclaimer {
  font-size: 16px;
}

/* Progress bar styling */
.progress-filled {
  background-color: var(--vector-violet-light);
  border-radius: 0px 3.40282e38px 3.40282e38px 0px;
}

.progress-bar {
  background-color: var(--grey);
  height: 15px;
}

/* Responsive styles */
@media only screen and (max-width: 600px) {
  input,
  textarea {
    width: 100%;
    padding: 3%;
  }

  .math-input {
    width: 100%;
    padding: 3%;
  }

  .btn-link {
    margin: 2% 0%;
  }

  /* .logo-text {
    font-size: 40px;
    margin-bottom: 0% !important;
  } */

  .main-button {
    width: 90vw;
    padding: 2.5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }

  .signup-button {
    width: 90vw;
    padding: 2.5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }

  .signup-button-secondary {
    width: 90vw;
    padding: 2.5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }

  .community-button {
    width: 90vw;
    padding: 2.5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }

  .main-button-landing {
    width: 90vw;
    padding: 2.5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }

  .disabled_button {
    width: 90vw;
    padding: 2.5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }
  .header-button {
    width: 200px;
    padding: 2.5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }

  .mc-button {
    width: 90vw;
    padding: 5%;
    margin: 0% 0%;
    letter-spacing: 1px;
  }

  .secondary-button {
    width: 90vw;
    padding: 2.5%;
    margin: 0 0%;
    letter-spacing: 1px;
  }

  .google-button {
    width: 60vw;
  }

  .disclaimer {
    font-size: 12px;
  }

  .sub_categories {
    margin: 5% 0%;
  }

  .header_styling {
    box-shadow: 2px 0px 4px 0px rgba(105, 105, 105, 0.25);
  }
}

/* Math Input Animations */
.animate-fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Math Input Validation States */
.math-input-valid {
  border-color: #10b981 !important; /* green */
}

.math-input-invalid {
  border-color: #ef4444 !important; /* red */
}

.math-input-checking {
  border-color: #f59e0b !important; /* yellow */
}

/* Advanced Math Input Styles */

.math-symbol-button {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.math-symbol-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.math-symbol-button:active {
  transform: translateY(0);
}

.math-preview-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: 2px solid #e3f2fd;
}

.suggestion-dropdown {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.history-panel {
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
}

/* Responsive improvements */
@media (max-width: 640px) {
  .math-keyboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .math-symbol-button {
    height: 48px;
    font-size: 16px;
  }
}

.input-with-icon {
  box-sizing: border-box;
  padding-right: 3rem !important;
  width: 100%;
}

@media only screen and (max-width: 600px) {
  .input-with-icon {
    box-sizing: border-box;
    padding-right: 3rem !important;
    width: 100%;
  }
}

.back-header-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100vw - 80px);
}

@media only screen and (max-width: 600px) {
  .back-header-title,
  .page-header,
  .header-title {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 60px); /* Smaller margin for mobile */
    font-size: 16px;
  }
}
.middle_form_input {
  border-top: none !important;
  border-bottom: var(--form-outline) 1px solid !important;
  border-left: var(--form-outline) 1px solid !important;
  border-right: var(--form-outline) 1px solid !important;
  border-radius: 0px !important;
}

/* Avatar triangle shape */
.clip-triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.text-pink-custom {
  color: #ff6e99;
}

/* Fix for mobile navigation covering content */
@media only screen and (max-width: 768px) {
  .profile-content {
    padding-bottom: 100px; /* Space for mobile nav */
  }
}

/* Screen reader only - accessibility helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
