/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* General reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Define BASF color variables */
:root {
    --basf-green: #65AC1E;
    --basf-dark-green: #009900;
    --basf-light-green: #b7d29d;
    --basf-blue: #0075C9;
    --basf-dark-blue: #004a96;
    --basf-gray: #666;
    --basf-grayborder: #ced4da;
}

/* General font family */
body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Header styling */
header {
    background-color: #fff;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: left;
    padding-left: 15px;
    align-items: center;
    background-color: var(--basf-dark-blue);
}

.header-logo {
    height: 70px;
}

.green-line {
    height: 6px;
    background-color: var(--basf-dark-blue);
    width: 100%;
}

.lightgreen-line {
    height: 0.8px;
    background-color: var(--basf-dark-blue);
    width: 100%;
    margin-bottom: 10px;
}

/* Form container — shared base styles */
.form-container,
.form-container-thankyou,
.form-container-thankyous {
    background-color: #fff;
    max-width: 800px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 5px var(--basf-dark-blue);
    padding: 20px;
    z-index: 100;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.form-container           { margin-top: -140px; }
.form-container-thankyou  { margin-top: -30px; }
.form-container-thankyous { margin-top: -80px; }

/* Banner image styling */
.image-banner img {
    width: 100%;
    height: auto;
}

/* Form headings */
h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #333;
}

h2 {
    margin-bottom: 15px;
    font-size: 30px !important;
    color: #004795;
}

p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #333;
}

span {
    font-size: 0.9rem;
}

ul {
    font-size: 0.9rem;
}

li {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

/* Form row styling */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-group-single {
    flex: 0.49;
    min-width: 220px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    min-width: 220px;
    margin-bottom: 20px;
}

label {
    display: flex;
    align-items: center;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #333;
}

legalconsent {
    font-size: 0.8rem;
    color: #333;
}

/* Text input styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    border: 1px solid var(--basf-grayborder);
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    color: #333;
    width: 100%;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--basf-grayborder);
    outline: none;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 8px;
}

input[type="checkbox"]:checked {
    accent-color: var(--basf-dark-blue);
}

/* Checkbox group styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.checkbox-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.form-groups {
    margin-bottom: 10px;
}

/* Feedback section scales */
.scale-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.scale-group img {
    width: 30px;
    height: 30px;
}

/* Submit button styling */
button[type="submit"] {
    background-color: var(--basf-dark-blue);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 15px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #fff;
    color: var(--basf-blue);
    border: 2px solid var(--basf-dark-blue);
    border-radius: 5px;
}

/* Footer styling */
footer {
    background-color: var(--basf-dark-blue);
    width: 100%;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 50px;
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    height: 40px;
}

footer a {
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
}

.social-icons img {
    width: 25px;
    margin-left: 10px;
}

/* Error message */
.error {
    display: none;
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

/* Greyed-out / disabled state */
.greyed-out {
    opacity: 0.5;
    pointer-events: none;
}

.greyout-prefix {
    color: grey;
}

/* Data-tooltip (disabled field tooltip) */
[data-tooltip] {
    position: relative;
    cursor: not-allowed;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -1.5em;
    left: 0;
    background: #333;
    color: #fff;
    padding: 4px 8px;
    font-size: 0.8em;
    white-space: nowrap;
    border-radius: 4px;
    display: none;
}

[data-tooltip]:hover::after {
    display: block;
}

/* Tooltip component */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    opacity: 1;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  color: #333;
  padding: 5px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.tooltip::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 9px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #d9d9d9;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.tooltip.disabled:hover::after, .tooltip.disabled:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Phone input */
.phone-input-container {
    display: flex;
    align-items: center;
    border-radius: 6px;
    width: 100%;
    background-color: #fff;
}

.flag-icon {
    width: 24px;
    height: 16px;
    margin-right: 4px;
}

.country-code {
    background-color: #fff;
    padding: 1px;
    border-radius: 4px;
    margin-right: 4px;
    font-weight: bold;
}

.phone-input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 16px;
}

#validation-message {
    color: #dc3545;
    margin-top: 5px;
}

/* Tablet view */
@media (max-width: 768px) {
    .form-container {
        margin: -50px auto 20px auto !important;
        padding: 15px;
        border-radius: 8px;
    }

    h2 {
        margin-bottom: 10px;
        font-size: 20px !important;
        color: #004795;
    }
}

/* Mobile view */
@media (max-width: 480px) {
    .form-container {
        margin: 0 auto 0 auto !important;
        padding: 20px;
        border-radius: 6px;
        box-shadow: 0 2px 3px var(--basf-dark-blue);
    }

    h2 {
        margin-bottom: 8px;
        font-size: 18px !important;
        color: #004795;
    }
}

/* Loading overlay */
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* BASF animated letters */
.basf-loader {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--basf-dark-blue);
    display: flex;
}

.basf-loader span {
    opacity: 0.2;
    animation: blink 1.2s infinite;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.basf-loader span:nth-child(1) { animation-delay: 0s; }
.basf-loader span:nth-child(2) { animation-delay: 0.2s; }
.basf-loader span:nth-child(3) { animation-delay: 0.4s; }
.basf-loader span:nth-child(4) { animation-delay: 0.6s; }
.basf-loader span:nth-child(5) { animation-delay: 0.8s; }
.basf-loader span:nth-child(6) { animation-delay: 1s; }
.basf-loader span:nth-child(7) { animation-delay: 1.2s; }

@keyframes blink {
    0%   { opacity: 0.2; transform: scale(1); }
    50%  { opacity: 1;   transform: scale(1.15); }
    100% { opacity: 0.2; transform: scale(1); }
}

.loading-text {
    margin-top: 15px;
    font-size: 20px;
    color: #0f1a16;
    font-weight: 600;
}

/* Captcha region */
#captcha_region {
    display: flex;
    background-color: rgb(250, 250, 250);
    border: 1px solid rgb(224, 224, 224);
    border-radius: 4px;
    cursor: pointer;
    height: 74px;
    width: 300px;
}

.captcha_input label {
    display: block;
    padding-top: 10px;
    font-weight: normal;
}

#input_captcha_code {
    width: 40%;
    margin-top: 5px;
}

/* Thank-you / error page headings */
.form-container-thankyou h1,
.form-container-thankyous h1 {
    text-align: center;
    font-size: 30px;
    margin-top: 20px;
    color: #004795;
    font-weight: 500;
}

.form-container-thankyou > center > h1 {
    font-size: 30px;
    color: #004795;
}

.thank-you-page-comfirm-text {
    color: #004795;
    font-size: 20px;
    font-weight: bold;
}

/* Form container utility variants (e.g. embedded / no-header usage) */
.form-container--only-form {
    margin-block: 20px !important;
    box-shadow: none;
}

.form-container--only-form > form > p {
    font-size: 11.5px;
}

.form-container--only-form h2 {
    font-size: 40.5px;
}

.form-container--no-header {
    margin-top: 20px;
}