@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

/* Global helper */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Background Section */
.cosmic-bg {
  background: url('/front/images/job_form_images/applybg.avif') no-repeat center center;
  background-size: cover;
  min-height: 100vh;
  padding: 60px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
}

.cosmic-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* overlay opacity */
  z-index: 1;
}

/* Glassmorphic Form Card */
.cosmic-card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  color: #fff;
  padding: 40px;
  width: 100%;
  max-width: 720px;
  margin: 0 16px; /* safe spacing on tiny screens */
}

.cosmic-card h2 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1rem;
  text-shadow: 0 1px 2px #d50333;
}

/* Input & Select Styling (Bootstrap-like fields) */
.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.15);
  color: #f1f1f1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: #e9e6e6;
}

.form-select option {
  color: #000;
}

/* Focus State */
.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: #36f;
  box-shadow: 0 0 0 0.2rem rgba(54, 102, 255, 0.25);
  color: #fff;
  outline: none;
}
/* =========================
   Custom dropdown arrow
   ========================= */

.cosmic-card select,
.cosmic-card .form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center; /* move arrow left/right as you like */
  background-size: 12px 8px;
  padding-right: 40px; /* space so text doesn’t overlap arrow */
}

/* Hide old IE arrow just in case */
.cosmic-card select::-ms-expand,
.cosmic-card .form-select::-ms-expand {
  display: none;
}


/* Buttons - Submit */
.btn-submit,
.cosmic-btn {
  background: linear-gradient(135deg, #d50333, #611010);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  padding: 10px 24px;
  box-shadow: 0 4px 20px rgba(197, 42, 43, 0.4);
  transition: all 0.3s ease;
}

.btn-submit:hover,
.cosmic-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #d50333, #c52a2b);
  box-shadow: 0 4px 28px #d50333;
}

.same_as_otr {
  margin-top: -5px;
}

/* === Toggle Switch === */
.toggle-switch .label {
  color: #fff;
  font-size: 14px;
  margin-left: 10px;
}

.form-check-input:checked {
  background-color: var(--success-color, #16a34a);
  border-color: var(--primary-color, #0d6efd);
}

/* === intl-tel-input Fix === */
.iti {
  display: block !important;
  width: 100% !important;
}

.iti__country-list {
  background-color: rgba(75, 73, 73) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.iti__country-list li {
  color: #eee;
}

.iti__country-list li:hover,
.iti__country-list .iti__highlight {
  background-color: #d50333 !important;
}

.iti__flag-container,
.iti__selected-flag {
  background-color: transparent !important;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.iti__country-name {
  color: #f5f5f5;
}

.iti input {
  background-color: rgba(255, 255, 255, 0.12);
  color: #f1f1f1;
}

/* intl-tel-input dropdown chevron */
.iti__arrow {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #f1f1f1;
  margin-left: 6px;
  margin-top: 4px;
  transition: transform 0.3s ease;
}

.iti--open .iti__arrow {
  transform: rotate(180deg);
}

/* === reCAPTCHA Wrapper === */
.recaptcha-wrapper {
  transform: scale(1);
  transform-origin: top left;
  transition: transform 0.3s ease-in-out;
  width: 304px;
  height: 78px;
  overflow: visible;
}

/* === Misc Utility === */
.mb-3 {
  margin-bottom: 15px;
}

/* ===================== RESPONSIVE BREAKPOINTS ===================== */

/* Tablets and down */
@media (max-width: 991.98px) {
  .cosmic-bg {
    padding: 40px 0;
    align-items: flex-start; /* let the card scroll instead of hard centering */
    min-height: auto;
  }

  .cosmic-card {
    padding: 28px;
    margin: 20px 12px;
  }

  .recaptcha-wrapper {
    transform: scale(0.85);
    width: 260px;
    height: 66px;
    margin-left: -10px;
  }
}

/* Small devices */
@media (max-width: 575.98px) {
  .cosmic-bg {
    padding: 30px 12px;
  }

  .cosmic-card {
    padding: 22px;
    border-radius: 16px;
  }

  .btn-submit,
  .cosmic-btn {
    width: 100%;
    text-align: center;
  }

  .recaptcha-wrapper {
    transform: scale(0.75);
    width: 228px;
    height: 59px;
    margin-left: -15px;
  }
}
