﻿/* GTM Assessment Styles - BRCG Brand Aligned v2.8 */
:root {
  --brcg-primary: #054770; /* Brand Blue */
  --brcg-secondary: #9b9b9c; /* Gray */
  --brcg-accent: #10b981; /* Success Green */
  --brcg-dark: #191e47; /* Navy */
  --brcg-body: #494c52; /* Body Text */
  --brcg-light: #f9fafe; /* Light Background */
}

body.gtm-assessment {
  font-family:
    "Open Sans",
    -apple-system,
    sans-serif; /* Primary Font */
  background: #bdbfc8;
  color: var(--brcg-body);
  line-height: 1.6;
  min-height: 100vh;
  padding: 1rem 0;
}

.assessment-container {
  max-width: 850px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.assessment-header {
  border-radius: 15px 15px 0 0;
}

/* --- Headers & Progress --- */
.assessment-header {
  background: var(--brcg-primary);
  color: white;
  padding: 1rem 1.5rem;
  text-align: center;
}

.assessment-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
}

.progress-container {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.75rem 2rem;
}

.progress {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--brcg-accent);
  transition: width 0.3s ease;
}

.progress-text {
  color: var(--brcg-dark);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  text-align: center;
  font-weight: 600;
}

.subtitle {
  margin-top: 0rem;
  font-size: 1.3rem;
  color: var(--brcg-secondary);
  line-height: normal;
}

/* --- Input Fields & Groups --- */
.assessment-body {
  padding: 1.5rem;
}

.contact-header {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brcg-dark);
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.contact-guidance {
  font-size: 1.1rem;
  color: var(--brcg-secondary);
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
  line-height: normal;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brcg-dark);
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.textarea-group.is-invalid textarea,
textarea.form-control.is-invalid {
  border-color: #dc3545;
}

/* Heavier, Darker Labels for both Screens */
.question-text {
  font-size: 1.1rem !important;
  /* Unified size */
  font-weight: 700 !important;
  /* Brand Bold */
  color: #191e47 !important;
  /* BRCG Dark Navy */
  line-height: 1.45 !important;
  padding: 1.25rem 0 0.25rem 1.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

/* --- Question Helper Icon --- */
.question-helper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0;
  border: 1.5px solid var(--brcg-secondary);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s ease;
  position: relative;
}

.question-helper:hover {
  background: var(--brcg-light);
  border-color: var(--brcg-primary);
}

.helper-icon {
  font-size: 12px;
  font-weight: bold;
  color: var(--brcg-secondary);
  line-height: 1;
}

.question-helper:hover .helper-icon {
  color: var(--brcg-primary);
}

/* Helper tooltip */
.helper-tooltip {
  position: absolute;
  bottom: auto;
  top: 50%;
  left: calc(100% + 12px);
  transform: translateY(-50%);
  background: var(--brcg-dark);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
  width: 340px;
  max-width: 340px;
  white-space: pre-line;
  word-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.question-helper:hover .helper-tooltip {
  opacity: 1;
}

.helper-tooltip::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: var(--brcg-dark);
}

/* --- Options (Radio/Checkbox) --- */
.radio-group,
.checkbox-group,
.radio-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.radio-option,
.checkbox-option,
.radio-option-block,
.checkbox-option-block {
  display: flex;
  align-items: center;
  font-size: 0.95rem !important;
  color: #212529 !important;
  font-weight: 300 !important;
  padding: 0.5rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  background: white;
}

/* Unified Option Block Spacing */
/* TLTL From Company Context screen
.radio-option,
.checkbox-option,
.radio-option-block,
.checkbox-option-block {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  margin-bottom: 0.75rem !important;
}
*/

/* Maintain Selected State branding */
.radio-option.selected,
.radio-option-block input:checked + span,
.checkbox-option.selected {
  border-color: var(--brcg-primary) !important;
  background: #f0f7ff !important;
}

/* --- Maintain Original Functional Logic Styles --- */
.privacy-notice {
  background: var(--brcg-light);
  border-left: 4px solid var(--brcg-secondary);
  padding: 1rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(5, 71, 112, 0.2);
  border-radius: 50%;
  border-top-color: var(--brcg-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Buttons --- */
.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.btn {
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--brcg-primary);
  color: white;
}
.btn-secondary {
  background: #e2e8f0;
  color: var(--brcg-dark);
}

/* --- Responsive: Smaller viewports --- */

/* Medium screens (1920x1200 and similar — ~900px usable height after browser chrome) */
@media (max-height: 900px) {
  body.gtm-assessment {
    padding: 0.5rem 0;
  }

  .assessment-header {
    padding: 0.75rem 1.5rem;
  }

  .assessment-header h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .progress-container {
    padding: 0.5rem 1.5rem;
  }

  .assessment-body {
    padding: 1.25rem;
  }

  .question-text {
    font-size: 1rem !important;
    padding: 0.75rem 0 0.2rem 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .radio-option,
  .checkbox-option,
  .radio-option-block,
  .checkbox-option-block {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem !important;
  }

  .radio-group,
  .checkbox-group,
  .radio-group-vertical {
    gap: 0.25rem;
  }

  .contact-header {
    font-size: 1.2rem;
  }

  .contact-guidance {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }

  .button-group {
    margin-top: 1rem;
    padding-top: 1rem;
  }

  .privacy-notice {
    padding: 0.75rem;
    margin: 1rem 0;
    font-size: 0.8rem;
  }
}

/* Small screens (1366x768 and similar — ~650px usable height) */
@media (max-height: 750px) {
  body.gtm-assessment {
    padding: 0.25rem 0;
  }

  .assessment-container {
    max-width: 780px;
  }

  .assessment-header {
    padding: 0.5rem 1rem;
  }

  .assessment-header h1 {
    font-size: 1.35rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .progress-container {
    padding: 0.4rem 1rem;
  }

  .progress-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
  }

  .assessment-body {
    padding: 1rem;
  }

  .question-text {
    font-size: 0.95rem !important;
    padding: 0.5rem 0 0.15rem 0.75rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.4 !important;
  }

  .radio-option,
  .checkbox-option,
  .radio-option-block,
  .checkbox-option-block {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem !important;
  }

  .radio-group,
  .checkbox-group,
  .radio-group-vertical {
    gap: 0.2rem;
  }

  .contact-header {
    font-size: 1.1rem;
  }

  .contact-guidance {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }

  .form-group label {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
  }

  .form-control {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }

  .button-group {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
  }

  .privacy-notice {
    padding: 0.6rem;
    margin: 0.75rem 0;
    font-size: 0.75rem;
  }
}
