/*
  Visual redesign for the "Create Account" wizard (apps/home/views.py:company_details,
  template home/company_details.html, layout layouts/base-new-reg-flow.html).

  This file is only ever linked from company_details.html, so every rule here is
  implicitly scoped to that page. All new selectors use a "cdr-" (company details
  redesign) prefix and are added ALONGSIDE the existing classes/ids the page's inline
  script depends on (form-field-1, form-field-2, input-demo, terms-check, terms, etc.)
  - none of those are renamed or removed.
*/

.cdr-page-bg {
  position: relative;
  min-height: 100vh;
  background: #f6f6f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Branded header */
.cdr-header {
  position: relative;
  width: 100%;
}
.cdr-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 260px;
  overflow: hidden;
  z-index: 0;
}
.cdr-header-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.cdr-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 0px;
  padding-bottom: 0px;
}
.cdr-brand-logo {
  width: 140px;
  height: 72px;
  flex-shrink: 0;
}
.cdr-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cdr-brand-divider {
  background: rgba(255, 255, 255, 0.3);
  height: 62px;
  width: 2px;
  border-radius: 36px;
  flex-shrink: 0;
}
.cdr-brand-text {
  display: flex;
  flex-direction: column;
  color: #ffffff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}
.cdr-brand-title {
  font-size: 26px;
  font-weight: 600;
  font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
}
.cdr-brand-subtitle {
  font-size: 17px;
  font-weight: 400;
  font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
}

/* Card */
.cdr-card {
  position: relative;
  z-index: 1;
  background: #ffffff !important;
  border-radius: 16px;
  box-shadow: 1px 4px 20.2px 0px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  padding-top: 6px;
  margin: 0 auto 40px;
  width: 961px;
  max-width: calc(100vw - 24px);
}

.cdr-card-title {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0px;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}
.cdr-card-title-text {
  color: #0b66c3;
  font-size: 20px;
  font-weight: 600;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
}
.cdr-card-subtitle-text {
  color: #6b6b6b;
  font-size: 14px;
  font-weight: 400;
  font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
  margin: 0;
}

.cdr-form-fields {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Inner bordered card */
.cdr-inner-card {
  border-radius: 18px;
  border: 2px solid #f6f6f6;
  overflow: hidden;
  width: 913px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0px;
  padding-bottom: 20px;
}

/* Section */
.cdr-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
  width: 100%;
}
.cdr-section-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding-left: 24px;
  padding-right: 24px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}
.cdr-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  font-family: 'Inter', sans-serif;
  margin: 0;
  white-space: nowrap;
}
.cdr-section-desc {
  font-size: 14px;
  font-weight: 600;
  color: #6c6c6c;
  font-family: 'Segoe UI', sans-serif;
  width: 489px;
  max-width: 100%;
  margin: 0;
}
.cdr-progress-track {
  height: 3px;
  border-radius: 18px;
  overflow: hidden;
  width: 100%;
  background: #e6e6e6;
}
.cdr-progress-fill {
  background: #0b66c3;
  height: 100%;
}
.cdr-progress-fill.cdr-full {
  width: 100%;
}

.cdr-section-divider {
  height: 2px;
  width: 100%;
  background: #f6f6f6;
}

/* Fields */
.cdr-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px;
  width: 100%;
}
.cdr-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.cdr-field.cdr-flex-col {
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.cdr-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.cdr-row.cdr-align-start {
  align-items: flex-start;
}

.cdr-label {
  font-size: 14px;
  font-weight: 500;
  color: #000000;
  padding: 0 4px;
  font-family: 'Inter', sans-serif;
  display: block;
  margin-bottom: 0px;
}
.cdr-required {
  color: #d0342c;
}

.cdr-input {
  width: 100%;
  height: 33px !important;
  padding: 6px 12px;
  font-size: 14px;
  color: #222222;
  background: #ffffff;
  outline: none;
  border-radius: 8px;
  border: 1px solid #c3c4c4;
  font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
}
.cdr-input::placeholder {
  color: #777777;
}
.cdr-input:focus {
  border-color: #0b66c3;
}
/* Neutralise the browser's own autofill background (Chrome/Edge/Safari paint
   recognized email/tel/address fields with a light blue/yellow tint, even
   with autocomplete="off" - this keeps them matching the rest of the form) */
.cdr-input:-webkit-autofill,
.cdr-input:-webkit-autofill:hover,
.cdr-input:-webkit-autofill:focus,
.cdr-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
  box-shadow: 0 0 0px 1000px #ffffff inset;
  -webkit-text-fill-color: #222222;
  transition: background-color 5000s ease-in-out 0s;
}

/* Phone field */
.cdr-phone-row {
  border: 1px solid #c3c4c4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 8px;
  height: 35px;
}
.cdr-phone-code {
  color: #111111;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cdr-phone-divider {
  background: #c3c4c4;
  height: 22px;
  width: 1px;
  flex-shrink: 0;
}
.cdr-phone-row .cdr-input.cdr-phone-input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0;
  height: auto;
}

/* Hint / error text */
.cdr-hint-text {
  font-size: 12px;
  color: #636363;
  padding-left: 6px;
  font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
  margin: 0;
}
.cdr-hint-grey {
  color: #7e7e7e;
  padding: 0 4px;
}
.cdr-hint-grey.cdr-hint-error {
  color: red;
}
.cdr-error {
  font-size: 12px;
  display: block;
  margin-top: 2px;
}
.cdr-link {
  color: #0b66c3;
  font-weight: 600;
  font-size: 12px !important;
  cursor: pointer;
}
.cdr-link:hover {
  text-decoration: underline;
}

/* Terms notice */
.cdr-terms-box {
  position: relative;
  background: #eff6ff;
  border-radius: 8px;
  width: 100%;
  border: 1px dashed rgba(11, 102, 195, 0.51);
  padding: 4px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.cdr-terms-checkbox {
  margin-top: 3px;
  flex-shrink: 0;
}
.cdr-terms-text {
  font-size: 12px;
  color: #636363;
  font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
  margin: 0;
}

/* Loading / success panel */
.cdr-loading-panel {
  width: 100%;
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cdr-success-title {
  font-size: 22px;
  font-weight: 600;
  color: #0b66c3;
  font-family: 'Segoe UI', sans-serif;
  display: block;
}
.cdr-success-sub {
  font-size: 15px;
  color: #6b6b6b;
  display: block;
}
.cdr-go-back-row {
  margin-top: 8px;
}

/* Footer */
.cdr-footer {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 36px 24px;
}
.cdr-btn {
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 14px;
  cursor: pointer;
  border: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  transition: background-color 0.15s ease;
}
.cdr-btn-secondary {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.11);
  color: #0b66c3;
}
.cdr-btn-secondary:hover {
  background: #f9fafb;
}
.cdr-btn-primary {
  background: #0b66c3;
  color: #ffffff;
}
.cdr-btn-primary:hover {
  background: #0a5ab0;
}
.cdr-btn-primary:disabled {
  background: #7fa8d6;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 980px) {
  .cdr-card { width: 96vw; }
  .cdr-inner-card { width: 100%; }
}
@media (max-width: 640px) {
  .cdr-row { flex-direction: column; }
  .cdr-section-heading, .cdr-section-desc { width: 100%; }
  .cdr-header-bg { height: 180px; }
  .cdr-brand { flex-wrap: wrap; justify-content: center; text-align: center; padding: 24px 12px; }
  .cdr-footer { justify-content: center; flex-wrap: wrap; padding: 0 16px 16px; }
}
