/* --- FORM CONTAINER --- */
body {
  background: #f3f4f6;
  font-family: "Poppins", Arial, sans-serif;
  margin: 0;
  padding: 25px;
  color: #111827;
}

form#registrationForm {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px 40px;
  max-width: 1000px;
  margin: 0 auto;
}

/* --- TITLES --- */
h3, h4 {
  color: #1f2937;
  text-align: center;
  margin: 5px 0;
}

h3 {
  font-size: 20px;
  font-weight: 600;
}
h4 {
  font-size: 15px;
  color: #374151;
}

/* --- SECTIONS --- */
.section {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* --- FIELD GROUPS --- */
.field-group {
  margin-bottom: 15px;
}
.field-group label {
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
  color: #111827;
}
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  transition: border 0.2s, box-shadow 0.2s;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
/* === FIX SELECT ALIGNMENT & WIDTH === */
.field-group select {
  width: 100%;
  height: 40px; /* match text input height */
  line-height: 22px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #fff;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/ %3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

/* Optional hover and focus for better UX */
.field-group select:hover {
  border-color: #93c5fd;
}

.field-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  outline: none;
}


/* --- INLINE FIELDS --- */
.inline-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
/* === 3-COLUMN RESPONSIVE GRID FOR APPLICATION DETAILS === */
.application-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: start;
}

.application-grid .field-group {
  margin-bottom: 15px;
}

/* Full-width field (for address, etc.) */
.application-grid .full-width {
  grid-column: 1 / -1;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .application-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  .application-grid {
    grid-template-columns: 1fr;
  }
}


/* --- RADIO / CHECKBOX GROUPS --- */
.field-group-1 {
  font-weight: bold;
}
.field-group-2 {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.field-group-2 label {
  font-weight: normal;
}
.field-group-2 {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}
/* --- RADIO / CHECKBOX GROUPS --- */
.field-group-2 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 25px;
  flex-wrap: nowrap;
}

.field-group-2 label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
}

.field-group-2 input[type="radio"] {
  accent-color: #2563eb; /* modern blue tone */
  width: 16px;
  height: 16px;
  cursor: pointer;
}


/* --- DISCIPLINE LIST --- */
.discipline-list {
  display: grid;
  gap: 15px;
}
.discipline-item {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 12px 15px;
  transition: all 0.2s;
}
.discipline-item:hover {
  background: #f3f4f6;
}
.discipline-head {
  font-weight: 600;
  color: #1f2937;
}
.indent {
  margin-left: 20px;
  padding-left: 15px;
  border-left: 2px solid #d1d5db;
}
.indent.events {
  margin-left: 35px;
}

/* --- PHOTO SECTION --- */
.photo-wrap {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.canvas-frame {
  width: 260px;
  height: 260px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
#photoCanvas {
  width: 100%;
  height: 100%;
}
.photo-controls {
  display: flex;
  gap: 10px;
}
.photo-controls button {
  padding: 8px 12px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}
.photo-controls button:hover {
  background: #1d4ed8;
}

/* --- BUTTONS --- */
button[type="submit"],
#previewButton,
#editButton {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.2s ease-in-out;
}

#previewButton {
  background:#1e40af ;
}
#previewButton:hover {
  background: #fb8c00;
}

button[type="submit"] {
  background: #e53935;
}
button[type="submit"]:hover {
  background:#16a34a ;
}

#editButton {
  background: #6b7280;
}
#editButton:hover {
  background: #4b5563;
}

/* --- DECLARATION BOX --- */
.declaration {
  background: #fefce8;
  border: 1px solid #facc15;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
}

/* --- PREVIEW SECTION --- */
#previewSection {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 10px;
}
#previewContent {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 15px;
  font-size: 14px;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  form#registrationForm {
    padding: 20px;
  }
  .canvas-frame {
    width: 100%;
    height: 240px;
  }
}

/* === MODAL STYLES === */
.modal-overlay {
  display: none; /* hidden by default */
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  width: 95%;
  max-width: 650px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  animation: scaleIn 0.3s ease-in-out;
  overflow-y: auto;
  max-height: 80vh;
}

.modal-content h3 {
  margin-top: 0;
  text-align: center;
  color: #1e3a8a;
}

#modalPreviewContent p {
  margin: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 4px;
}

#modalPreviewContent strong {
  color: #111827;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
}

.modal-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: white;
  transition: background 0.2s;
}

.modal-btn.edit {
  background: #6b7280;
}
.modal-btn.edit:hover {
  background: #4b5563;
}

.modal-btn.confirm {
  background: #16a34a;
}
.modal-btn.confirm:hover {
  background: #15803d;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

