/* components.css - Reusable components (buttons, navigation, footer) */

/* Page Titles and Subtitles */
.page-title {
  /* To fit german titles */
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.167;
  letter-spacing: -0.02em;
  padding: 6px 0;
}

.page-subtitle {
  font-size: clamp(12px, 4vw, 16px);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.15px;
  line-height: 1.5;
  white-space: pre;
}

/* Button Components */
.button-primary {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--border-radius-lg);
  font-size: var(--font-size-base);
  font-weight: 500;
  font-family: var(--font-family);
  background-color: var(--primary);
  color: var(--text-color-secondary);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.button-primary:hover {
  background-color: var(--primary-hover);
  color: var(--text-color-secondary);
  text-decoration: none;
  transform: translateY(-1px);
}

.button-primary:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.button-primary.disabled {
  background-color: #ccc;
  color: #666;
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 9999px;
  font-size: var(--font-size-base);
  font-weight: 500;
  font-family: var(--font-family);
  background-color: var(--primary);
  color: var(--text-color-secondary);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: var(--text-color-secondary);
  text-decoration: none;
}

.btn-outline,
.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 32px;
  border-radius: 9999px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
  background-color: transparent;
  border: 1px solid rgba(0, 61, 91, 0.5);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.button-outline {
  align-self: flex-start;
}

.btn-outline:hover,
.button-outline:hover {
  background-color: rgba(0, 61, 91, 0.05);
  color: var(--primary);
  text-decoration: none;
}

/* Modal primitives */
.modal-backdrop {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  top: 50%;
  left: 50%;
  width: 900px;
  max-width: 96%;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  transform: translate(-50%, -50%);
  padding: 16px 24px;
  overflow-y: auto;
  height: fit-content;
}

.modal-header {
  align-items: flex-start;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  padding: 0;
  border: none;
}

.modal-title {
  font-family: var(--font-family);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding: 8px;
  border: none;
}

.modal-footer a.close-modal {
  background-color: var(--surface);
  border-radius: 200px;
  text-decoration: none;
  box-shadow: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0.4px;
  outline: none;
  padding: 6px 24px;
}

.modal.open,
.modal-backdrop.open {
  display: block;
}

/* Navigation Component */
.navigation,
nav.navigation {
  background-color: var(--primary);
  padding: 16px 24px;
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navigation-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-nav,
.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-language-item {
  display: flex;
  align-items: center;
}

.concentrix-logo {
  max-height: 30px;
  max-width: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.language-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--secondary);
  position: relative;
}

.language-select {
  display: none;
}

/* Custom Language Selector */
.custom-language-select {
  position: relative;
  cursor: pointer;
  min-width: 220px;
  max-width: 300px;
}

.selected-language {
  background-color: transparent;
  color: var(--secondary);
  font-size: var(--font-size-base);
  font-weight: 400;
  font-family: var(--font-family);
  padding: 8px 18px 8px 12px; /* Added top/bottom padding and left padding to match dropdown options */
  position: relative;
}

.selected-language::after {
  content: '▾';
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--secondary);
  pointer-events: none;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  display: none;
  max-height: 280px; /* Increased to ensure all 5 languages fit comfortably */
  overflow-y: auto;
}

.language-dropdown.open {
  display: block;
}

.language-option {
  padding: 8px 12px;
  color: var(--primary);
  background-color: white;
  cursor: pointer;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background-color: var(--secondary);
  color: var(--primary);
}

.language-option.selected {
  background-color: var(--secondary);
  color: var(--primary);
  font-weight: 600;
}

/* Footer Component */
.footer {
  background-color: var(--primary);
  color: var(--text-color-secondary);
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 6vw, 120px);
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(18px, 4vw, 44px);
  max-width: 2300px;
  margin: 0 auto;
  width: 100%;
}

.footer-text {
  flex: 1;
}

.footer-image {
  max-width: 315px;
  height: 100%;
  flex: 1;
}

.footer-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-subtitle {
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.footer .section-title {
  color: var(--text-color-secondary);
}

.footer-link {
  color: var(--text-color-secondary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--secondary);
  text-decoration: none;
}

.footer-link img {
  margin-left: var(--spacing-xs);
}

/* Section Components */
.section-container {
  padding: 32px 120px;
}

.section-title {
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-color);
}

.section-item {
  font-size: var(--font-size-base);
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

/* List Components */
.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step {
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}


/* Container Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

/* Responsive Design */
@media screen and (max-width: 1100px) {
  .section-title {
    font-size: 32px;
  }
}
@media screen and (max-width: 768px) {
  .section-container {
    padding: 22px;
  }

  .section-item {
    font-size: 16px;
  }

  .footer {
    padding: 28px 18px;
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .footer-image {
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .footer-image {
    display: none;
  }
}

/* Form Components */
select, input[type="text"], input[type="number"], input[type="email"], textarea {
  position: relative;
  cursor: pointer;
  width: 100%;
  padding: 16px 24px;
  border: 1px solid var(--text-color);
  background-color: var(--text-color-secondary);
  border-radius: 4px;
  outline: none;
  appearance: none;
  color: var(--text-color);
  font-size: var(--font-size-base);
  font-weight: 400;
  font-family: var(--font-family);
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--primary);
  /* box-shadow: 0 0 0 3px rgba(37, 226, 204, 0.2); */
  border-color: var(--primary);
  background-color: var(--text-color-secondary);
  box-shadow: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
}

/* Label styling - position as floating label like static reference */
select + label, 
input[type="text"] + label, 
input[type="number"] + label, 
input[type="email"] + label, 
textarea + label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  padding: 0 4px;
  color: var(--text-color);
  font-size: 12px;
  background: var(--text-color-secondary);
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1;
}

/* Move label up if select has a value */
select:focus + label,
select:has(option:checked:not([value=""])) + label,
input[type="text"]:focus + label,
input[type="text"]:not(:placeholder-shown) + label,
input[type="email"]:focus + label,
input[type="email"]:not(:placeholder-shown) + label,
input[type="number"]:focus + label,
input[type="number"]:not(:placeholder-shown) + label,
label.has-value {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-color);
}

/* Input wrapper styling */
.select-wrapper, .input-wrapper {
  position: relative;
}

/* Add dropdown arrow */
.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-color);
}

.input-wrapper::after {
  content: none;
  display: none;
}

/* Utility classes are defined in base.css (loaded first) */

/* =================================
   STEPPER COMPONENT (Shared across assessment pages)
   Matches static reference design
   ================================= */

.stepper-section {
  background-color: var(--ternary);
  width: 100%;
}

.stepper-outer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stepper-inner-wrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 40px 184px;
  width: 100%;
}

.stepper-steps-container {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 852px;
}

.step-item {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: clip;
}

.step-icon-wrapper {
  overflow: clip;
  border-radius: 9999px;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
}

.step-icon-inner {
  position: absolute;
  left: 2px;
  width: 20px;
  height: 20px;
  top: 2px;
}

.step-icon-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.step-label {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(42, 43, 44, 0.67);
  white-space: pre;
}

.step-label-medium {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: #2a2b2c;
  white-space: pre;
}

.step-divider {
  background-color: #c8c9ca;
  height: 1px;
  flex-grow: 1;
  min-width: 16px;
}

.step-active-badge {
  background-color: var(--accent);
  display: flex;
  flex-direction: column;
  height: 24px;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
  overflow: clip;
  padding: 0 7px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.step-active-number {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 12px;
  color: #2a2b2c;
  text-align: center;
}

.step-inactive-badge {
  background-color: #b4b5b6;
  display: flex;
  flex-direction: column;
  height: 24px;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
  overflow: clip;
  padding: 0 7px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.step-inactive-number {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 12px;
  color: #ffffff;
  text-align: center;
}

/* Responsive stepper */
@media (max-width: 1200px) {
  .stepper-inner-wrapper {
    padding: 40px 40px;
  }

  .stepper-steps-container {
    width: 100%;
    max-width: 852px;
  }
}

@media (max-width: 768px) {
  .navigation,
  nav.navigation {
    padding: 12px 16px;
  }

  .custom-language-select,
  .language-select {
    min-width: 148px;
    max-width: 190px;
  }
  .stepper-inner-wrapper {
    padding: 3.5% 16px;
  }

  .stepper-steps-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .step-divider {
    height: 1px;
    min-width: 0;
    margin: 0;
    flex: 1 1 auto;
    align-self: center;
    background-color: #c8c9ca;
  }

  .step-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    flex: 1 1 0;
    overflow: visible;
  }

  .step-label, .step-label-medium {
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    max-width: none;
    width: 100%;
    overflow: visible;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .step-icon-wrapper {
    flex-shrink: 0;
  }
}
@media screen and (max-width: 360px) {
  .navigation-controls > img {
    display: none;
  }
}

@media (max-height: 700px) {
  .modal {
    max-height: 80%;
  }
}
