/* BNP Paribas – Quiz / Lokata */
:root {
  --green-dark: #0A5F45;
  --green-dark-alt: #09503E;
  --green-accent: #1A8C5B;
  --green-accent-hover: #158a55;
  --white: #fff;
  --black: #1a1a1a;
  --gray: #666;
  --gray-light: rgba(255, 255, 255, 0.85);
  --gray-border: #ccc;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

.screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

/* Header & Logo – biały pasek z logo */
.header {
  padding: 1rem 1.5rem;
  background: var(--white);
  flex-shrink: 0;
}

.header-quiz {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-quiz .logo-wrap {
  display: inline-block;
  background: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.logo {
  height: 40px;
  width: auto;
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-dark-alt);
  border-color: var(--green-dark-alt);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline {
  background: var(--white);
  color: var(--black);
  border-color: var(--black);
}

.btn-outline:hover {
  background: #f5f5f5;
}

/* Quiz layout */
.quiz-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.quiz-panel {
  padding: 1.5rem;
}

/* Lewy panel – zielone tło (fon.png) */
.quiz-question-panel {
  background: var(--green-dark);
  background-image: url('fon.png');
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.step-indicator {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-light);
  margin: 0 0 1rem 0;
}

.quiz-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  color: var(--white);
}

.quiz-instruction {
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  color: var(--gray-light);
  opacity: 0.95;
}

.progress-wrap {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-bottom: 0.25rem;
}

.progress-segments {
  display: flex;
  gap: 6px;
  width: 100%;
}

.progress-segments .segment {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s;
}

.progress-segments .segment.done {
  background: var(--white);
}

.progress-segments-full .segment {
  background: var(--white);
}

/* Prawy panel – białe tło */
.quiz-answers-panel {
  background: var(--white);
  flex: 1;
  display: flex;
  flex-direction: column;
}

#answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  margin-bottom: 1.5rem;
}

/* Opcje odpowiedzi – kwadratowy checkbox + zielona obwódka gdy wybrane */
.answer-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--gray-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  background: var(--white);
}

.answer-option:hover {
  border-color: var(--gray);
}

.answer-option.selected {
  border-color: var(--green-accent);
}

.answer-checkbox {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-border);
  border-radius: 6px;
  background: var(--white);
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.answer-option.selected .answer-checkbox {
  border-color: var(--green-accent);
  background: var(--green-accent);
}

.answer-option.selected .answer-checkbox::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.answer-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
}

.answer-option.selected .answer-label {
  color: var(--black);
}

.quiz-nav {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.quiz-nav .btn {
  flex: 1;
}

.quiz-nav .btn-primary {
  flex: 1.1;
}

/* Contact form */
.contact-form {
  margin-bottom: 1rem;
}

.form-limit-msg {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.form-limit-msg--reached {
  color: #c41a21;
  font-weight: 600;
}

.input-label {
  display: block;
  margin-bottom: 1rem;
}

.input-label input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  border: 2px solid var(--gray-border);
  border-radius: 8px;
  box-sizing: border-box;
}

.input-label input::placeholder {
  color: var(--gray);
}

.input-label input:focus {
  outline: none;
  border-color: var(--green-accent);
}

.phone-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.phone-row .country-code,
.phone-row .input-phone input {
  height: 3rem;
  min-height: 3rem;
  box-sizing: border-box;
}

.country-code {
  flex-shrink: 0;
  padding: 0 1rem;
  font-family: var(--font);
  font-size: 1rem;
  border: 2px solid var(--gray-border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--black);
}

.country-flag {
  flex-shrink: 0;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.country-chevron {
  font-size: 0.7rem;
  color: var(--gray);
}

.country-code:hover {
  border-color: var(--green-accent);
}

.input-phone {
  flex: 1;
  display: flex;
}

.input-phone input {
  width: 100%;
  height: 3rem;
  min-height: 3rem;
}

/* ========== Desktop ========== */
@media (min-width: 768px) {
  body {
    overflow: hidden;
    height: 100vh;
  }

  .screen.active {
    height: 100vh;
    overflow: hidden;
  }

  .header {
    padding: 1.25rem 2rem;
  }

  .logo {
    height: 48px;
  }

  .quiz-layout {
    flex-direction: row;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .quiz-question-panel {
    width: 42%;
    padding: 2rem 3rem;
    justify-content: center;
  }

  .quiz-answers-panel {
    width: 58%;
    padding: 2rem 3rem;
    justify-content: center;
  }

  .quiz-title {
    font-size: 1.75rem;
  }

  .answer-option {
    padding: 1.25rem 1.5rem;
  }

  .progress-wrap {
    margin-top: auto;
  }
}
