/* Importing Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

/* VAS Logo Colors */
:root {
  --vas-dark-blue: #001a4d;
  --vas-gold: #d4af37;
  --vas-light-blue: #003d99;
  --vas-lighter-blue: #0052cc;
  --text-dark: #001a4d;
  --text-light: #666;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Improved body styling - Using VAS Colors */
body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 10px;
  background: linear-gradient(135deg, var(--vas-dark-blue), var(--vas-light-blue));
  overflow-y: auto; /* Allow scrolling when needed */
}


.container {
  max-width: 700px;
  width: 100%;
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 5px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
  position: relative;
  margin: 20px 0;
  overflow-y: auto; /* Enable scrolling inside container if needed */
}

/* Language selector */
.language-selector {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 10;
}

.language-selector select {
  padding: 8px 12px;
  border: 2px solid var(--vas-gold);
  border-radius: 5px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  min-width: 120px;
  color: var(--vas-dark-blue);
  font-weight: 500;
}

.language-selector select:focus {
  border-color: var(--vas-dark-blue);
  outline: none;
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.language-selector select:hover {
  border-color: var(--vas-light-blue);
}

.container .title {
  font-size: 25px;
  font-weight: 500;
  position: relative;
  margin-bottom: 10px;
  padding-right: 140px;
  color: var(--text-dark);
}
.container .title::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 30px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--vas-gold), var(--vas-light-blue));
}

/* Logo and Header Section */
.logo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--vas-gold);
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.logo-header .title {
  color: var(--vas-dark-blue);
  padding-right: 0;
  margin-bottom: 0;
}

.content form .user-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 20px 0 12px 0;
}
form .user-details .input-box {
  margin-bottom: 15px;
  width: calc(100% / 2 - 20px);
}
form .input-box span.details {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--vas-dark-blue);
}
.user-details .input-box input {
  height: 45px;
  width: 100%;
  outline: none;
  font-size: 16px;
  border-radius: 5px;
  padding-left: 15px;
  border: 1px solid #ddd;
  border-bottom-width: 2px;
  transition: all 0.3s ease;
  color: var(--text-dark);
}
.user-details .input-box input:focus,
.user-details .input-box input:valid {
  border-color: var(--vas-gold);
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

form .gender-details .gender-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--vas-dark-blue);
}
form .category {
  display: flex;
  gap: 30px;
  margin: 10px 0;
}
form .category label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-dark);
}
form .category label .dot {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  margin-right: 10px;
  background: #d9d9d9;
  border: 5px solid transparent;
  transition: all 0.3s ease;
}
#dot-1:checked ~ .category label .one,
#dot-2:checked ~ .category label .two {
  background: var(--vas-dark-blue);
  border-color: var(--vas-dark-blue);
}

form .status-details .status-title {
  font-size: 20px;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
  color: var(--vas-dark-blue);
}
form .status-options {
  display: flex;
  gap: 30px;
  margin: 10px 0;
}
form .status-options label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-dark);
}
form .status-options label .status-dot {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  margin-right: 10px;
  background: #d9d9d9;
  border: 5px solid transparent;
  transition: all 0.3s ease;
}
#status-1:checked ~ .status-options label .one,
#status-2:checked ~ .status-options label .two {
  background: var(--vas-dark-blue);
  border-color: var(--vas-dark-blue);
}

.dynamic-details {
  margin: 15px 0;
}

.datenschutz-details {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid var(--vas-gold);
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(0, 26, 77, 0.02), rgba(212, 175, 55, 0.02));
}
.datenschutz-content p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-dark);
}
.datenschutz-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: var(--vas-dark-blue);
}

form input[type="radio"] {
  display: none;
}

form .button {
  height: 45px;
  margin: 20px 0;
}
form .button input {
  height: 100%;
  width: 100%;
  border-radius: 5px;
  border: none;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--vas-dark-blue), var(--vas-gold));
}
form .button input:hover {
  background: linear-gradient(-135deg, var(--vas-dark-blue), var(--vas-gold));
  box-shadow: 0 8px 16px rgba(0, 26, 77, 0.3);
}

/* FIXED Message placeholder styles */
.message-placeholder {
  margin: 15px 0;
  padding: 15px;
  border-radius: 5px;
  font-weight: 500;
  text-align: center;
  min-height: 20px;
  transition: all 0.3s ease;
  color: #333; /* Default black color */
}

.message-placeholder:empty {
  opacity: 0.7;
}

.message-placeholder:not(:empty) {
  opacity: 1;
}

.message-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.message-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Error modal popup */
.error-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeInOverlay 0.2s ease;
}

.error-modal-overlay[hidden] {
  display: none;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.error-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  max-width: 440px;
  width: 90%;
  animation: slideInModal 0.22s ease;
}

@keyframes slideInModal {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* Error state (default) */
.error-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f5c6cb;
  background: #f8d7da;
  border-radius: 10px 10px 0 0;
}

.error-modal-title {
  font-weight: 700;
  font-size: 15px;
  color: #721c24;
}

.error-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #721c24;
  padding: 0 4px;
  transition: opacity 0.15s;
}

.error-modal-close:hover {
  opacity: 0.6;
}

/* Success state */
.error-modal-header--success {
  background: #d4edda;
  border-bottom-color: #c3e6cb;
}

.error-modal-header--success .error-modal-title {
  color: #155724;
}

.error-modal-close--success {
  color: #155724;
}

.error-modal-body {
  padding: 18px 20px 20px;
}

.error-modal-body p {
  margin: 0 0 6px;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

.error-modal-detail {
  font-size: 12px !important;
  color: #888 !important;
  word-break: break-word;
}

.error-modal-guidance {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  font-size: 13px;
  color: #856404;
  line-height: 1.5;
  display: none;
}

.error-modal-guidance::before {
  content: '💡 ';
}

/* Copyright section */
.copyright {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.copyright p {
  margin-bottom: 5px;
}
.radio-error {
  transition: all 0.3s ease;
}

/* Highlight sections when there's an error */
.gender-details.error .gender-title,
.status-details.error .status-title {
  color: #ff4444;
}

.gender-details.error .category,
.status-details.error .status-options {
  border: 1px solid #ff4444;
  border-radius: 5px;
  padding: 10px;
  background-color: #fff8f8;
}

/* Make required fields more visible */
.gender-title,
.status-title {
  font-weight: 500;
  color: var(--vas-dark-blue);
}

/* Dynamic fields styling - FIXED VERSION */
.dynamic-details {
  margin: 15px 0;
  transition: all 0.3s ease;
  display: none; /* Hidden by default */
}

.dynamic-details.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.dynamic-details .user-details {
  margin: 10px 0 5px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Style for visible dynamic fields */
#studentFields.show,
#workerFields.show {
  border-left: 3px solid var(--vas-gold);
  padding-left: 15px;
  border-radius: 5px;
}

/* Add to your existing CSS */
.input-box.full-width {
  width: 100%;
}

.datenschutz-details h3 {
  color: var(--vas-dark-blue);
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.datenschutz-details .datenschutz-content p {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dark);
}

/* Style for the third gender option */
#dot-3:checked ~ .category label .three {
  background: var(--vas-dark-blue);
  border-color: var(--vas-dark-blue);
}

/* Datenschutz collapsible sections */
.datenschutz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  cursor: pointer;
}

.datenschutz-header h3 {
  margin: 0;
  color: var(--vas-dark-blue);
  font-size: 18px;
  font-weight: 600;
}

.toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
  color: var(--vas-gold);
  transition: all 0.3s ease;
}

.toggle-btn:hover {
  color: var(--vas-dark-blue);
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.toggle-btn.active .toggle-icon {
  transform: rotate(180deg);
}

.datenschutz-text {
  margin-bottom: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
  border-left: 3px solid var(--vas-gold);
  animation: fadeIn 0.3s ease;
}

.datenschutz-text p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dark);
}

.datenschutz-text p:last-child {
  margin-bottom: 0;
}


/* Make the entire header clickable area larger */
.datenschutz-header {
  padding: 10px 0;
  border-bottom: 1px solid var(--vas-gold);
}

.datenschutz-header:hover {
  background-color: rgba(212, 175, 55, 0.05);
  border-radius: 5px;
  padding: 10px;
}

.important_to_do{
  color: var(--vas-gold);
  margin-left: -10px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Custom country dropdown with flag images */
.country-dropdown {
  position: relative;
  width: 100%;
}
.cd-selected {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: white;
  cursor: pointer;
  text-align: left;
  color: var(--text-dark);
}
.cd-selected:focus {
  outline: none;
  border-color: var(--vas-gold);
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}
.cd-flag-inline {
  width: 20px;
  height: 14px;
  object-fit: cover;
  margin-right: 6px;
}
.cd-list-wrap {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--vas-gold);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 26, 77, 0.15);
  max-height: 260px;
  overflow: auto;
  padding: 8px;
}
.cd-search {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--vas-gold);
  border-radius: 6px;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.cd-search:focus {
  outline: none;
  border-color: var(--vas-dark-blue);
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}
.cd-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 4px;
}
.cd-item:hover,
.cd-item:focus {
  background: rgba(212, 175, 55, 0.1);
  outline: none;
  border-left: 3px solid var(--vas-gold);
  padding-left: 5px;
}
.cd-flag {
  width: 28px;
  height: 18px;
  object-fit: cover;
  border: 1px solid #eee;
}
.cd-name {
  font-size: 14px;
  color: var(--text-dark);
}

@media(max-width: 584px) {
  .cd-list-wrap { max-height: 200px; }
}
/* Enhanced Responsive media queries */
@media(max-width: 768px) {
  body {
    padding: 15px 8px;
    align-items: flex-start;
  }
  
  .container {
    padding: 20px 25px;
    margin: 10px 0;
  }
  
  .logo-header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .logo {
    width: 60px;
    height: 60px;
  }
  
  .container .title {
    padding-right: 0;
    font-size: 22px;
    text-align: center;
  }
  
  .language-selector {
    position: static;
    margin-bottom: 15px;
    text-align: center;
  }
  
  .language-selector label {
    display: block;
    margin-bottom: 5px;
  }
}

@media(max-width: 584px) {
  .container {
    max-width: 100%;
    padding: 15px 20px;
  }
  
  form .user-details .input-box {
    margin-bottom: 15px;
    width: 100%;
  }
  
  form .category,
  form .status-options {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  
  .content form .user-details {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0 10px 0;
  }
  
  .user-details::-webkit-scrollbar {
    width: 4px;
  }
  
  .user-details::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
  }
  
  .datenschutz-details {
    margin: 15px 0;
    padding: 12px;
  }
  
  form .button {
    margin: 15px 0;
  }
  
  .copyright {
    margin-top: 20px;
    padding-top: 15px;
    font-size: 11px;
  }
}

@media(max-width: 459px) {
  body {
    padding: 10px 5px;
  }
  
  .container {
    padding: 15px;
  }
  
  .container .title {
    font-size: 20px;
  }
  
  .content form .user-details {
    max-height: 350px;
  }
  
  .message-placeholder {
    margin: 10px 0;
    padding: 12px;
    font-size: 14px;
  }
  
  .message-placeholder.show {
    padding: 12px;
    margin: 10px 0;
  }
  
  .copyright {
    margin-top: 15px;
    padding-top: 12px;
  }
}