@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;
  --primary-grey: #666666;
  --background-grey: #FAFAFA;
  --primary-dark: #101727;
  --secondary-dark: #1D2937;
  --first-accent-dark: #0046B8;
  --secondary-accent-dark: #4692FF;
  --dark-white: #8E939B;
}

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

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

.primary-grey {
  color: var(--primary-grey);
}

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

.primary-dark {
  color: var(--primary-dark);
}

.secondary-dark {
  color: var(--secondary-dark);
}

.first-accent-dark {
  color: var(--first-accent-dark);
}

.secondary-accent-dark {
  color: var(--secondary-accent-dark);
}

.dark-white {
  color: var(--dark-white);
}

/* =============================
   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,
.btb-orange: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);
}

.btn-orange {
  background-color: orange !important;
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  background-image: none !important;
  transition: transform 0.2s ease;
}

.btn-custom-big {
  height: 30px;
  font-size: 1rem;

}

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

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

/* =============================
   Feedback and Error Styles
============================= */
.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;
  width: 900px;
  height: 100%;
  border-radius: 10px;
  margin: 50px auto;
  border: 1px solid var(--primary-grey);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;

}

#feedback_email,
#feedback_text {
  border: 1px solid var(--primary-grey);
  width: 800px !important;
}

.submit-button {
  width: 100%;
}

.text-box {
  display: flex;
  border-radius: 3px;
  margin-top: 20px;
  text-align: left;
  width: 800px;
  font-weight: bold;
}

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

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

.feedback-outer-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* =============================
   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;
}

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

}

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
============================= */

#feedback-page {
  color: #2A3338;
  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 {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background-color: var(--primary-color);
  color: white;
  padding: 20px;
}

.banner-title {
  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;
}

.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;
}

.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,
.account-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,
.account-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;

}

.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;
  }
}

/* ===== 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;
  }
}

/* ===== 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"],
[data-bs-theme="dark"] .h1-title,
[data-bs-theme="dark"] .h3-title,
[data-bs-theme="dark"] .help-title,
[data-bs-theme="dark"] .help-page-title,
[data-bs-theme="dark"] .help-page-sub-title {
  color: var(--secondary-accent-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"] .field-name,
[data-bs-theme="dark"] .feedback-container {
  color: var(--secondary-accent-dark) !important;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .link-banner,
[data-bs-theme="dark"] .white-banner,
[data-bs-theme="dark"] .feedback-container {
  background-color: var(--primary-dark) !important;
}

[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,
[data-bs-theme="dark"] .account-inner-wrapper {
  background-color: var(--secondary-dark) !important;

}

[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,
[data-bs-theme="dark"] .feedback-container {
  background-color: var(--secondary-dark);

}

[data-bs-theme="dark"] .bottom-banner {
  background-color: var(--primary-color) !important;
}

[data-bs-theme="dark"] .about-text,
[data-bs-theme="dark"] .keyword-search,
[data-bs-theme="dark"] .keyword-search td,
[data-bs-theme="dark"] th,
[data-bs-theme="dark"] .source_text,
[data-bs-theme="dark"] .target_text,
[data-bs-theme="dark"] .text-box,
[data-bs-theme="dark"] .p-text,
[data-bs-theme="dark"] .source_segment,
[data-bs-theme="dark"] .target_segment,
[data-bs-theme="dark"] .help-content-container p,
[data-bs-theme="dark"] .help-content-container li {
  color: white !important;
}

[data-bs-theme="dark"] td,
[data-bs-theme="dark"] th {
  background-color: var(--secondary-dark) !important;
  border-color: #ffffff !important;
  color: white;
}

[data-bs-theme="dark"] .feedback-container,
#feedback-page[data-bs-theme="dark"] .form-control {
  box-shadow: none;
  border: 1px solid var(--secondary-accent-dark);
}

[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"] .error-highlight {
  background-color: #ffcc66;
  color: black;
}

[data-bs-theme="dark"] .bslib-sidebar-layout {
  --sidebar-fg: color: white;
}

[data-bs-theme="dark"] .help-link:hover {
  color: var(--first-highlight);
}

[data-bs-theme="dark"] .feedback-container {
  border: 1px solid var(--secondary-accent-dark);
}

/* Help Page Styling */
.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 100px;
  margin-bottom: 20px;
}

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

}

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


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

.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,
.account-button-row {
  justify-content: center;
  display: flex;
  gap: 10px;
}

#search_query,
#keyword_mode_search_button {
  margin-top: 30px;
}

/* Text standarized */

html {
  font-size: 16px;
  font-family: "IBM Plex Sans", sans-serif;
}

body {
  font-size: 1rem;
  line-height: 1.6;
  color: #222;
}

.banner-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75em;
}

@media (min-width: 768px) {
  .banner-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .banner-title {
    font-size: 2.5rem;
  }
}

.h1-title {
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
}

.h2-title {
  font-weight: 500;
  margin-bottom: 0.5em;
  text-align: center;
  color: var(--primary-color)
}

.h3-title {
  font-weight: 500;
  margin-bottom: 0.4em;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.p-text {
  color: var(--primary-grey);
}

/* Overview page styles */
.white-banner {
  background-color: white;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  font-size: 20px;
  padding: 50px;
  line-height: 40px;
}

.banner-overlay {
  background-repeat: no-repeat;
  background-size: cover;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url('/stock-image.jpeg');
  background-position: 50% 45%;
  background-blend-mode: overlay;
  color: white !important;
  min-height: 200px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;

}

/* Help Page Styling */
.help-title,
.help-page-title,
.help-page-sub-title {
  color: var(--primary-color);
  font-weight: 600;
  text-align: center;
  align-self: center;
}

.help-page-sub-title {
  font-weight: 500;
}

.help-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.help-page-title {
  font-size: 2rem;
  margin: 20px 0 10px;
}

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

/* Help Page FAQ Section */
.help-list {
  list-style: none;
  padding-left: 20px;
}

.help-link {
  color: var(--primary-color);
  text-decoration: underline;
}

.help-link:hover {
  color: var(--first-accent-dark);
}

/* Account Page Styles */
.account-fields {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 300px;
}

.account-inner-wrapper {
  max-width: 800px;
}

.line-break {
  display: flex;
  justify-content: space-between;
  color: var(--primary-grey);
  margin-top: -12px;
}

.title-wrapper {
  display: flex;
  flex-direction: row;
  gap: 5px;
  font-size: 1.2rem;
  font-weight: 500;
}

.subtitle-wrapper {
  color: var(--primary-grey);
  font-size: 1.2rem;
  font-weight: 500;
}

/* Saved Queries */
.saved-query-table.table {
  border: 1px solid #E9ECEF;
}

.saved-query-table.th {
  background-color: var(--dark-white) !important;

}


/* Delete Account Page Styles */
.delete-account-fields {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 275px;
}

/* Change Password Page Styles */