/* ===========================
   Individual Artist Form CSS
=========================== */

/* ===== Global Styles ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: #33577a; /* light text color for contrast */
  line-height: 1.6;

  /* Dark Modern Botswana Background */
  background: linear-gradient(
      160deg,
      #001f3f 7%,      /* deep navy/black-blue */
      #003366 35%,     /* darker Botswana blue */
      #0055a5 65%,     /* brighter Botswana flag blue */
      #002244 100%     /* navy fade */
    );
  background-attachment: fixed;
  background-size: cover;
  position: relative;
}


main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ===== Headings ===== */
h1 {
  font-weight: 700;
  font-size: 2.8rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #111827;
}

h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 2.1rem;
  color: #1f2937;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.3rem;
}

h3 {
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

/* ===== Form Sections ===== */
.form-section {
  margin-bottom: 2rem;
}

/* ===== Passport Photo Section ===== */
.passport-upload-section {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.photo-box {
  width: 196px;
  height: 196px;
  border: 3px dashed #9ca3af;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
}

.photo-box .placeholder-text {
  color: #6b7280;
  font-size: 0.84rem;
  text-align: center;
  position: absolute;
  pointer-events: none;
}

.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: 8px;
}

.photo-box input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Responsive Passport Photo */
@media (max-width: 768px) {
  .passport-upload-section {
    justify-content: center;
  }
  .photo-box {
    width: 133px;
    height: 133px;
  }
}

/* ===== Web Media Links Row: Column Alignment ===== */
.web-media-link-row {
  display: grid;
  grid-template-columns: 1fr 1.8fr; /* match proportion of labels vs inputs */
  gap: 0.75rem;
  align-items: center;
}

/* Dropdown (left column) */
.web-media-link-row select.media-platform {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background: #f9fafb;
  color: #374151;
  transition: all 0.2s ease-in-out;
}

.web-media-link-row select.media-platform:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

/* URL input (right column) */
.web-media-link-row input.media-url {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
}

.web-media-link-row input.media-url:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
  .web-media-link-row {
    grid-template-columns: 1fr;
  }

  .web-media-link-row select.media-platform,
  .web-media-link-row input.media-url {
    width: 100%;
  }
}


/* ===== Grid Form: Asymmetric Two Columns ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 1.5rem 2rem;
}

.form-grid label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #4b5563;
}

.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid input[type="tel"],
.form-grid input[type="number"],
.form-grid input[type="date"],
.form-grid input[type="url"],
.form-grid select,
.form-grid textarea,
.form-grid input[type="file"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== Toggle Buttons ===== */
.category-group {
  margin-bottom: 1.5rem;
}

.toggle-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.toggle-buttons button {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease-in-out;
}

.toggle-buttons button:hover {
  background: #e0e7ff;
  border-color: #2563eb;
}

.toggle-buttons button.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* ===== Responsive: Toggle Buttons on Small Screens ===== */
@media (max-width: 768px) {
  .toggle-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Error Highlighting ===== */
.error {
  border: 2px solid #e74c3c !important; /* red border for error */
}

/* Preserve preview image visibility */
.photo-box.error,
.signature-box.error {
  border: 2px dashed #e74c3c !important; /* red border for file boxes */
  background-color: #fdecea; /* light red background */
  position: relative; /* ensure img inside is visible */
}

.photo-box.error img,
.signature-box.error img {
  display: block;   /* ensures image renders */
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* keeps image aspect ratio */
}

/* Optional: smooth focus highlight */
.error:focus {
  outline: 3px solid #e74c3c;
  outline-offset: 2px;
}


/* ===== Gender Toggle ===== */
.gender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.gender-toggle button {
  width: 100%;
  padding: 0.85rem 0;
}

/* ===== Checkbox ===== */
input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

input[type="checkbox"] + label {
  display: inline;
  font-weight: 500;
  color: #374151;
}

/* Error styling for checkboxes */
input[type="checkbox"].error {
  outline: 2px solid #e74c3c;
  outline-offset: 2px;
}



/* ===== Submit Button (Full Width) ===== */
button[type="submit"] {
  display: block;
  width: 100%;
  padding: 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: #2563eb;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  margin-top: 3.5rem;
  text-align: center;
}

button[type="submit"]:hover {
  background: #1e40af;
}

/* Declaration Section: flipped columns (label wider than input) */
.declaration-grid {
  display: flex;
  flex-direction: column; /* stack rows vertically */
  gap: 1.5rem; /* vertical spacing between rows */
}

/* Each row: label + input inline */
.declaration-grid .form-group {
  display: grid;
  grid-template-columns: 2.1fr 1.41fr; /* flipped proportions: label wider */
  align-items: center;
  gap: 2rem; /* horizontal spacing */
}

/* Checkbox row: label next to checkbox */
.declaration-grid .checkbox-group {
  grid-template-columns: auto 1fr; /* keep checkbox width auto */
  align-items: center;
}

/* Inputs styling (same as rest of form) */
.declaration-grid input[type="text"],
.declaration-grid input[type="file"],
.declaration-grid input[type="date"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
}

.declaration-grid input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

#individual_signature_upload {
  height: 91px; /* triple the default input height (~35px) */
  padding: 0.85rem 1rem;
  display: block;
}

/* Signature Upload Styling: mimic passport photo box */
.signature-box {
  width: 100%;
  height: 105px; /* keep the triple height */
  border: 3px dashed #9ca3af;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
}

.signature-box .placeholder-text {
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
  position: absolute;
  pointer-events: none;
}

.signature-box img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* keeps proportions of signature */
  display: none;
  border-radius: 8px;
}

.signature-box input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}


/* Responsive: labels stack above inputs on small screens */
@media (max-width: 768px) {
  .declaration-grid .form-group {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .declaration-grid .checkbox-group {
    grid-template-columns: 1fr;
  }
  
}
