/*
  FT Capital Investment Application Forms
  CSS Stylesheet matching ftcapital.github.io design
  Created: 2026-01-13
*/

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  background-color: #ffffff;
  color: #1c243c;
  font-family: "Source Sans Pro", Helvetica, sans-serif;
  font-size: 16.5pt;
  font-weight: 400;
  line-height: 1.65;
  margin: 0;
  padding: 2em;
}

@media screen and (max-width: 1280px) {
  body {
    font-size: 12pt;
  }
}

@media screen and (max-width: 736px) {
  body {
    padding: 1em;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: #1c243c;
  font-family: Raleway, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0 0 1em 0;
  text-transform: uppercase;
}

h1 {
  font-size: 2em;
  border-bottom: solid 3px rgba(4, 100, 180, 0.95);
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.4em;
  border-bottom: solid 2px rgba(4, 100, 180, 0.95);
  padding-bottom: 0.3em;
  margin-top: 1.5em;
}

h3 {
  font-size: 1.1em;
}

@media screen and (max-width: 736px) {
  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.2em;
  }
}

p {
  margin: 0 0 1.5em 0;
}

strong {
  font-weight: 700;
  color: rgba(4, 100, 180, 0.95);
}

hr {
  border: 0;
  border-top: solid 1px rgba(28, 36, 60, 0.2);
  margin: 2em 0;
}

/* Progress Indicator */
#app-number {
  color: rgba(4, 100, 180, 0.95);
  font-weight: 700;
}

/* Form Container */
form {
  max-width: 800px;
  margin: 0 auto;
  background: #ffffff;
  padding: 0;
}

/* Fieldset Styling */
fieldset {
  border: 2px solid rgba(4, 100, 180, 0.3);
  border-radius: 5px;
  padding: 1.5em;
  margin: 0 0 2em 0;
  background: rgba(107, 209, 246, 0.05);
}

legend {
  color: #1c243c;
  font-family: Raleway, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 0.5em;
}

/* Form Labels and Inputs */
label {
  display: block;
  color: #1c243c;
  font-weight: 600;
  margin-bottom: 1em;
  cursor: pointer;
  transition: color 0.2s ease;
}

label:hover {
  color: rgba(4, 100, 180, 0.95);
}

/* Radio Button and Checkbox Styling */
input[type="radio"],
input[type="checkbox"] {
  margin-right: 0.5em;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: rgba(4, 100, 180, 0.95);
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  align-items: center;
  margin: 0.5em 0 1em 0;
}

.inline-options label {
  display: flex;
  align-items: center;
  margin: 0;
}

.consumer-attributes .inline-options label {
  font-size: 0.9em;
  font-weight: 500;
}

/* Textarea Styling */
textarea {
  width: 100%;
  padding: 0.75em;
  border: 2px solid rgba(28, 36, 60, 0.2);
  border-radius: 5px;
  font-family: "Source Sans Pro", Helvetica, sans-serif;
  font-size: 1em;
  color: #1c243c;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
  min-height: 100px;
}

textarea:focus {
  outline: none;
  border-color: rgba(4, 100, 180, 0.95);
  box-shadow: 0 0 0 3px rgba(107, 209, 246, 0.3);
}

/* Text Input Styling (if needed for future forms) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 0.75em;
  border: 2px solid rgba(28, 36, 60, 0.2);
  border-radius: 5px;
  font-family: "Source Sans Pro", Helvetica, sans-serif;
  font-size: 1em;
  color: #1c243c;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: rgba(4, 100, 180, 0.95);
  box-shadow: 0 0 0 3px rgba(107, 209, 246, 0.3);
}

/* Button Styling */
button {
  display: inline-block;
  padding: 0.9em 2.5em;
  border: 0;
  border-radius: 5px;
  font-family: Raleway, Helvetica, sans-serif;
  font-size: 0.9em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  margin-right: 1em;
  margin-bottom: 1em;
}

/* Primary Button (Next Step) */
button[value="next"],
button[type="submit"]:not([value="save"]) {
  background-color: rgba(4, 100, 180, 0.95);
  color: #ffffff;
}

button[value="next"]:hover,
button[type="submit"]:not([value="save"]):hover {
  background-color: rgba(4, 100, 180, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(4, 100, 180, 0.3);
}

button[value="next"]:active,
button[type="submit"]:not([value="save"]):active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(4, 100, 180, 0.3);
}

/* Secondary Button (Save) */
button[value="save"] {
  background-color: #6bd1f6;
  color: #1c243c;
}

button[value="save"]:hover {
  background-color: #5bc5ea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 209, 246, 0.4);
}

button[value="save"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(107, 209, 246, 0.4);
}

/* Tertiary Button (Previous) */
button[value="previous"] {
  background-color: #e0e0e0;
  color: #1c243c;
}

button[value="previous"]:hover {
  background-color: #d0d0d0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button[value="previous"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Disabled Button */
button:disabled {
  background-color: #e0e0e0;
  color: #999999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:disabled:hover {
  background-color: #e0e0e0;
  transform: none;
  box-shadow: none;
}

/* Action Button — used on both <button> and <a> elements for inline actions
   such as identity verification. Matches primary button style. */
.action-button {
  display: inline-block;
  padding: 0.9em 2.5em;
  border: 0;
  border-radius: 5px;
  font-family: Raleway, Helvetica, sans-serif;
  font-size: 0.9em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  background-color: rgba(4, 100, 180, 0.95);
  color: #ffffff;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  margin-right: 1em;
  margin-bottom: 1em;
}

.action-button:hover {
  background-color: rgba(4, 100, 180, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(4, 100, 180, 0.3);
  color: #ffffff;
}

.action-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(4, 100, 180, 0.3);
}

/* Button Container */
.button-container,
form > button {
  margin-top: 2em;
}

/* Responsive Radio Button Layout */
@media screen and (max-width: 736px) {
  fieldset {
    padding: 1em;
  }

  button {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.75em;
  }

  input[type="radio"],
  input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}

/* Validation States */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
  border-color: #d9534f;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
  border-color: #5cb85c;
}

/* Required Field Indicator */
input:required + label::after,
textarea:required + label::after,
select:required + label::after {
  content: " *";
  color: #d9534f;
}

/* Help Text */
.help-text {
  font-size: 0.85em;
  color: rgba(28, 36, 60, 0.7);
  font-style: italic;
  margin-top: -0.5em;
  margin-bottom: 1em;
}

/* Error Message */
.error-message {
  background-color: rgba(217, 83, 79, 0.1);
  border-left: 4px solid #d9534f;
  padding: 1em;
  margin: 1em 0;
  color: #d9534f;
  border-radius: 3px;
}

/* Success Message */
.success-message {
  background-color: rgba(92, 184, 92, 0.1);
  border-left: 4px solid #5cb85c;
  padding: 1em;
  margin: 1em 0;
  color: #3c763d;
  border-radius: 3px;
}

/* Info Message */
.info-message {
  background-color: rgba(4, 100, 180, 0.1);
  border-left: 4px solid rgba(4, 100, 180, 0.95);
  padding: 1em;
  margin: 1em 0;
  color: #1c243c;
  border-radius: 3px;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading button::after {
  content: "...";
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: "."; }
  40% { content: ".."; }
  60%, 100% { content: "..."; }
}

/* Print Styles */
@media print {
  button {
    display: none;
  }

  fieldset {
    border: 1px solid #000;
    page-break-inside: avoid;
  }

  h1, h2 {
    page-break-after: avoid;
  }
}
