@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

/* =============================
   Root Variables
============================= */
:root {
  --primary-color: #002E5D;
  --secondary-color: #BDD6E6;
  --first-highlight: #FFB700;
  --background-grey: #FAFAFA;
  --primary-dark: #101727;
  --secondary-dark: #1D2937;
  --first-accent-dark: #0046B8;
  --secondary-accent-dark: #4692FF;
  --dark-white: #8E939B;
}

/* =============================
   Custom Tooltip Styles
============================= */
.custom-tooltip {
  position: relative;
  display: inline-block;
}

.custom-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #2c3e50;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: normal;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: min(90vw, 300px);
  min-width: 60px;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  pointer-events: none;
}

.custom-tooltip::after {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2c3e50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.custom-tooltip:hover::before,
.custom-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* =============================
   Layout and Container Overrides
============================= */
/* Remove container-fluid side paddings */
.container-fluid {
  padding-left: 0px !important;
  padding-right: 0px !important;
}
/* Sidebar Layout */
.bslib-sidebar-layout {
  --_sidebar-bg: var(--primary-color);
}

.bslib-sidebar-layout>.sidebar {
  color: white;
}

.bslib-sidebar-layout>.main,
.bslib-sidebar-layout>.sidebar {
  overflow: visible;
  min-height: 950px;
}

/* =============================
   Button Styles
============================= */
.btn-secondary,
.btn-default:not(.btn-primary):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-danger):not(.btn-dark):not(.btn-light):not([class*='btn-outline-']) {
  border: none;
  background-color: var(--secondary-accent-dark) !important;
  color: white;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  background-image: none !important;
  transition: transform 0.2s ease;
}

.btn-secondary:hover,
.btn-default:not(.btn-primary):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-danger):not(.btn-dark):not(.btn-light):not([class*='btn-outline-']):hover,
.info-box:hover,
.link-banner a {
  transform: scale(1.05);
}

/* =============================
   Body and General Text Styles
============================= */
body {
  background-color: var(--background-grey) !important;
  font-family: "IBM Plex Sans" !important;
}

.about-info {
  font-size: 25px;
  padding: 10px 0;
  text-align: center;
}

.about-text {
  font-size: 20px;
  justify-content: center;
  line-height: 2.5;
  background-color: white !important;
  text-align: center;
}

.about-us-title {
  color: var(--primary-color);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
  margin: 25px 0 15px;
  text-align: center;
}

.about-wrap {
  align-self: center;
  background-color: white !important;
  color: var(--primary-color);
  display: flex;
  font-weight: 500;
  height: auto;
  justify-content: center;
  border-radius: 25px;
  margin: 40px 0;
  max-width: 700px;
  padding: 1rem;
  text-align: center;
  width: 60vw;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.keyword-search {
  color: var(--primary-color);
  font-weight: 500;
  margin: 30px;
}

.bottom-banner {
  background-color: var(--secondary-color);
  height: 170px;
  width: 100%;
  text-align: center;
}

/* =============================
   Feedback and Error Styles
============================= */
.comment-feedback {
  margin-bottom: 30px;
}

.error-header {
  margin: 15px 0 15px 30px;
}

.error-highlight {
  background-color: #ffff99;
  color: #212529;
  cursor: pointer;
}

.error-table tr:hover {
  background-color: white;
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* =============================
   Feedback Container Styles
============================= */
.feedback-container {
  background-color: #fff;
  box-shadow: 0 4px 4px var(--secondary-accent-dark);
  width: 90%;
  max-width: 773px;
  height: 80vh;
  max-height: 668px;
  border-radius: 25px;
  margin: 100px auto;
  padding: 20px;
  overflow: auto;
}

.feedback-container h1,
.feedback-container h3 {
  color: var(--primary-color) !important;
  font-weight: 800;
  font-size: 40px;
}

.feedback-container h3 {
  margin-top: 40px;
}

.highlight {
  background-color: yellow;
  color: black;
  font-style: italic;
}

/* =============================
   Info Box and Link Banner
============================= */
.info-box {
  align-items: center;
  background-color: #FFFFFF;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  color: var(--primary-color);
  display: flex;
  flex: 1 1 150px;
  border-radius: 25px;
  flex-direction: row;
  justify-content: center;
  max-width: 550px;
  min-height: 200px;
  min-width: 100px;
  padding: 1rem;
  transition: transform 0.3s ease;

  font-weight: 400;
  font-size: 20px;
}
.learn {
  font-size: 15px;
  padding: 15px 0;
  text-align: center;
}

.link-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: white;
  min-height: 220px;  
  justify-content: space-evenly;
}

.link-banner a {
  flex: 1 1 150px;
  max-width: 550px;
  min-width: 100px;
  min-height: 200px;

  display: flex;
  text-decoration: none;
  color: inherit;
}

.link-banner a .info-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 25px;
  padding: 1rem;
  transition: transform 0.3s ease;
}
.link-title {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 400;
  margin-top: 15px;
  text-align: center;
}

/* =============================
   Logo
============================= */
.logo {
  width: auto;
  height: 130px;
  margin: 20px auto;
  text-align: center;
}

/* =============================
   Scrolly Container & Blocks
============================= */
.scrolly-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.scrolly-block {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(.4, 0, .2, 1),
    transform 0.8s cubic-bezier(.4, 0, .2, 1);
}

.scrolly-block.visible {
  opacity: 1;
  transform: none;
}

.scrolling-boxes {
  width: 70vw;
  min-width: 300px;
  max-width: 700px;
  min-height: 160px;
  margin: 30px 0;
  border-radius: 12px;
  color: white;
  font-size: 2.2rem;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow:
    rgba(50, 50, 93, 0.15) 0px 20px 40px -10px,
    rgba(0, 0, 0, 0.18) 0px 10px 20px -15px;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(.4, 0, .2, 1),
    transform 0.8s cubic-bezier(.4, 0, .2, 1);
}

/* Different background colors for blocks */
.scrolly-block:nth-child(1) {
  background: var(--secondary-accent-dark)
}

.scrolly-block:nth-child(2) {
  background: var(--primary-color);
}

.scrolly-block:nth-child(3) {
  background: var(--first-accent-dark)
}

.scrolly-block:nth-child(4) {
  background: var(--primary-color);
}

.scrolly-block:nth-child(5) {
  background: var(--secondary-accent-dark)
}


/* =============================
   Text and Table Styling
============================= */
.block-label {
  font-size: 1.1rem;
  font-weight: normal;
}

.source_segment,
.target_segment {
  border: none;
  border-radius: 3px;
  color: #212529;
  margin-bottom: 0.1rem;
  padding: 0.5rem;
}

.segment-title-container {
  display: flex;
  align-items: center;
  justify-content: end;
}

.segment-title {
  margin-top: 0.7rem;
  margin-bottom: 0;
  margin-right: 0.5rem;
}

.source_text,
.target_text {
  background-color: transparent;
  border: none;
  color: #212529;
  display: inline;
  margin: 0;
  padding: 0;
}

.source-text-title,
.target-text-title {
  font-weight: 500;
  display: flex;
  font-size: 1.5rem;
  justify-content: center;

}

.segment-banner {
  align-items: center;
  justify-content: center;

}

.stats-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
  margin: 25px 0 15px;
  text-align: center;
  color: var(--primary-color);
}

table {
  border-collapse: collapse;
  margin-left: 30px;
}

td,
th {
  background-color: white;
  border: 1px solid #ddd;
  color: black;
  padding: 12px;
  text-align: left;
}

th {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* =============================
   Misc / Layout Helpers
============================= */
.text-box {
  align-items: center;
  display: flex;
  border-radius: 25px;
  justify-content: center;
  margin-top: 20px;
}

#feedback-page {
  color: #2A3338 !important;
  text-align: center;
}

#feedback-page .result_message {
  font-style: italic;
  margin-top: 10px;
}

.wrap-wrapper {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.banner-section {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--primary-color);
  color: white;
  padding: 20px;
  z-index: 0;
}

.banner-title, .banner-title2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 1.5px;
  opacity: 0.9;
  opacity: 0;
  transform: scale(0.8);
  animation: scaleUp 1s ease forwards;
  animation-delay: 0.7s;
}
@keyframes scaleUp {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* =============================
   Login + Sign Up Shared Styles
============================= */
label[for^="signup_"], label[for="password_login"], label[for="email_login"], label[for="us_state"], label[for="custom_title"] {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 0.5rem;
  display: inline-block;
  color: var(--primary-color);
}

.login-container input.form-control, .login-container select.form-select, .signup-inner-wrapper input.form-control, .signup-inner-wrapper select.form-select {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #CFCFCF;
  width: clamp(250px, 40vw, 400px);
  margin-bottom: clamp(12px, 2vw, 20px);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  padding: 0;
  background-color: transparent;
  appearance: none;
  box-shadow: none;
}


/* Generic form element style for input/select */
.form-element {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #CFCFCF;
  width: 100%;
  max-width: 400px;
  min-width: 250px;
  margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
  font-size: clamp(0.95rem, 1.25vw, 1.15rem);
  padding: 0.5rem 0;
  background-color: transparent;
  appearance: none;
  box-shadow: none;
}

/* =============================
   Login Page Styles
============================= */
.login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

.login-title,
.sign-up-title {
  font-weight: 600;
  align-self: center;
  margin-bottom: clamp(1rem, 2vw, 2rem);
  font-size: clamp(2rem, 4vw, 3rem);
}

.login-title {
  color: var(--primary-color);
}

.sign-up-title {
  color: white;
}

.input-box {
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.left-side {
  flex: 1;
  background-color: #ffffff;
  display: flex;
  position: relative;
}

.left-side-inner {
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 90%;
  max-width: 400px;
}

.right-side {
  flex: 1;
  background-color: var(--primary-color);
  align-content: center;
}

.right-side-inner {
  margin: auto;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 90%;
  max-width: 30rem;
  padding: 2rem;
  margin-bottom: 60px;
}

.sign-up-text {
  color: white;
}
.optional-text,
.password-hint {
  font-weight: lighter;
  font-size: clamp(0.875rem, 1.25vw, 1rem);
  color: #666666;
}

.signup-outer-wrapper,
.language-outer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100dvh;
  overflow: visible;
}

.signup-inner-wrapper,
.signup2-inner-wrapper {
  background-color: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
  display: grid;
  gap: 1.5rem;
  margin-bottom: 20px;
  
}

.signup-main-title,
.language-title {
  color: var(--primary-color);
  align-self: center;
}

.shiny-notification-warning {
  color: #b30000;
  background-color: #ffe6e6;
  border: 1px solid #b30000;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.text-success {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #d4edda;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 90vw;
  text-align: center;
  animation: fadeOut 5s ease forwards;
  animation-delay: 3s;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* =============================
   Media Queries
============================= */

/* ===== Mobile: ≤ 480px ===== */
@media (max-width: 480px) {
  .custom-tooltip::before {
    font-size: 10px;
    max-width: min(98vw, 200px);
    padding: 5px 8px;
  }

  .about-wrap {
    height: auto;
    padding: 20px;
    width: 90vw;
  }

  .info-box {
    width: 100%;
    flex-direction: column;
    /* More vertical for small screens */
  }

  .link-banner {
    display: flex;
    overflow: visible;
    padding: 1rem;
    width: 100%;
    height: auto;
    flex-direction: column;
    /* Stack links vertically */
  }
}

/* ===== Small Tablets: 481px–767px ===== */
@media (min-width: 481px) and (max-width: 767px) {
  .custom-tooltip::before {
    font-size: 11px;
    max-width: min(95vw, 250px);
    padding: 6px 10px;
  }

  .about-wrap {
    height: auto;
    padding: 25px;
    width: 85vw;
  }

  .info-box {
    flex-direction: row;
    width: auto;
    /* Reset width to auto */
  }

  .link-banner {
    padding: 1rem;
    display: flex;
    height: auto;
    overflow: visible;
    width: 100%;
    flex-direction: row;
  }
}

/* ===== Tablets & Small Laptops: 768px–1199px ===== */
@media (min-width: 768px) and (max-width: 1199px) {
  .custom-tooltip::before {
    font-size: 11px;
    max-width: min(95vw, 250px);
    padding: 6px 10px;
  }

  .about-wrap {
    padding: 30px;
  }

  .banner-section {
    width: 100%;
    height: 100%;
  }

  .info-box {
    flex-direction: row;
    width: auto;
  }

  .link-banner {
    padding: 1rem;
    display: flex;
    height: auto;
    overflow: visible;
    width: 100%;
    flex-direction: row;
  }
}

/* ===== Desktops: ≥ 1200px ===== */
@media (min-width: 1200px) {
  .custom-tooltip::before {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* ===== Extra Layout Constraint ===== */
@media (max-width: 1500px) {
  .card-grid-container {
    grid-template-columns: 1fr;
  }
}

/* =============================
   Dark Mode Overrides
============================= */
[data-bs-theme="dark"] label[for^="signup_"], [data-bs-theme="dark"] label[for="password_login"], [data-bs-theme="dark"] label[for="email_login"], [data-bs-theme="dark"] label[for="us_state"], [data-bs-theme="dark"] label[for="custom_title"] {
  color: var(--secondary-accent-dark);
}
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .link-banner {
  background-color: var(--primary-dark) !important;
}

[data-bs-theme="dark"] .login-container input.form-control, [data-bs-theme="dark"] .login-container select.form-select,[data-bs-theme="dark"] .signup-inner-wrapper input.form-control, [data-bs-theme="dark"] .signup-inner-wrapper select.form-select,
[data-bs-theme="dark"] .login-title, [data-bs-theme="dark"] .signup-main-title {
  color: var(--secondary-accent-dark);
}

[data-bs-theme="dark"] .info-box,
[data-bs-theme="dark"] .left-side,
[data-bs-theme="dark"] .signup-inner-wrapper,
[data-bs-theme="dark"] .signup2-inner-wrapper,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: var(--secondary-dark);
}

[data-bs-theme="dark"] .about-wrap,
[data-bs-theme="dark"] .about-text,
[data-bs-theme="dark"] .feedback-container {
  background-color: var(--primary-color) !important;
}

[data-bs-theme="dark"] .scrolly-block:nth-child(1),
[data-bs-theme="dark"] .scrolly-block:nth-child(5) {
  background: var(--first-accent-dark);
}

[data-bs-theme="dark"] .scrolly-block:nth-child(2),
[data-bs-theme="dark"] .scrolly-block:nth-child(4) {
  background: var(--secondary-accent-dark);
}

[data-bs-theme="dark"] .scrolly-block:nth-child(3) {
  background: var(--primary-color);
}

[data-bs-theme="dark"] .link-title,[data-bs-theme="dark"] .stats-title,[data-bs-theme="dark"] .about-us-title,[data-bs-theme="dark"] .about-text,[data-bs-theme="dark"] .keyword-search,[data-bs-theme="dark"] .feedback-container h1,[data-bs-theme="dark"] .feedback-container h3,[data-bs-theme="dark"] td,
[data-bs-theme="dark"] th,[data-bs-theme="dark"] .source_text,[data-bs-theme="dark"] .target_text,[data-bs-theme="dark"] .text-box  {
  color: white !important;
}

[data-bs-theme="dark"] td,
[data-bs-theme="dark"] th {
  background-color: #5a6169 !important;
  border-color: #ffffff !important;
}

[data-bs-theme="dark"] .custom-tooltip::before {
  background-color: #f8f9fa;
  color: #212529;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .custom-tooltip::after {
  border-top-color: #f8f9fa;
}

[data-bs-theme="dark"] .info-box {
  border: 1px solid var(--secondary-accent-dark) !important;
  border-color: var(--dark-white);
  color: white;
}

[data-bs-theme="dark"] .source_segment,
[data-bs-theme="dark"] .target_segment {
  background-color: #343a40;
  color: #f8f9fa;
}

[data-bs-theme="dark"] .error-highlight {
  background-color: #ffcc66;
  color: black;
}

[data-bs-theme="dark"] .bslib-sidebar-layout {
  --sidebar-fg: color: white;
}
/* Help Page Styling */
.help-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
  align-self: center;

}

.help-title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 20px;
  font-size: 1.5rem;
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
}

.help-page-sub-title {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--first-accent-dark);
  margin-top: 20px;
  margin-bottom: 10px;
}

.help-page-title {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 2rem
}

.help-content-container {
  padding: 20px;
  margin-left: 30px;

}

.help-content-container p,
.help-content-container li {
  font-size: 1.25rem;
}

.bottom-banner {
  background-color: var(--primary-color);
  height: 170px;
  width: 100%;
}

/* Verify page CSS */
.verify-outer-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 70px;
}

.verify-main-title {
  color: var(--primary-color);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
  margin: 25px 0 100px;
  text-align: center;
}

.verify-text {
  color: #666666;
  font-size: clamp(0.875rem, 2vw, 1rem);
  margin-bottom: 20px;
  text-align: center;
}

#code_input, #search_query {
  border-radius: 3px !important;
  border: 0.5px solid #666666;
}

.signup-button-row {
  justify-content: center;
  display: flex;
  gap: 10px;
}

#search_query {
  margin-top: 30px;
}

#keyword_mode_search_button {
 margin-top: 30px;
}