/* ========================================
   HR Application Form - Modern Layout
   Fully responsive, CSS Grid + Flexbox
   Scoped under .hr-app-form only
   ======================================== */

/* CSS Variables */
.hr-app-form {
  --hr-accent: #005497;
  --hr-border: #d9e2ef;
  --hr-text: #1b1f24;
  --hr-muted: #6b7280;
  --hr-bg: #fff;
  --hr-bg-muted: #f8fafc;
  
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Reset inside form */
.hr-app-form * {
  box-sizing: border-box;
}

.hr-app-form img,
.hr-app-form input,
.hr-app-form select,
.hr-app-form textarea,
.hr-app-form button {
  max-width: 100%;
}

/* Main container */
.hr-app-form .hr-form-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .hr-app-form .hr-form-wrap {
    padding: 0 8px;
  }
}

/* Section structure */
.hr-app-form .hr-section {
  margin-bottom: 24px;
}

.hr-app-form .hr-section-title {
  width: 100%;
  background: var(--hr-accent);
  color: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 18px 0;
  box-sizing: border-box;
}

.hr-app-form .hr-section-title span {
  display: block;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
}

.hr-app-form .hr-section-body {
  width: 100%;
  padding: 0 0;
  box-sizing: border-box;
}

/* Make section title wider than body on desktop */
@media (min-width: 769px) {
  .hr-app-form .hr-section-title {
    margin-left: -22px;
    margin-right: -22px;
    width: calc(100% + 44px);
    padding-left: 22px;
    padding-right: 22px;
  }
  
  .hr-app-form .hr-section-body {
    padding: 0;
  }
}

/* Legacy support for existing titles */
.hr-app-form .form-type-title.hr-section-title {
  width: 100%;
  background: var(--hr-accent);
  color: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 18px 0;
  box-sizing: border-box;
}

/* Grid system */
.hr-app-form .hr-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.hr-app-form .hr-grid-1 {
  grid-template-columns: 1fr;
}

.hr-app-form .hr-grid-2 {
  grid-template-columns: repeat(2, minmax(200px, 1fr));
}

.hr-app-form .hr-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 768px) {
  .hr-app-form .hr-grid-2,
  .hr-app-form .hr-grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Field wrapper */
.hr-app-form .hr-field {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Fields with radio/checkbox options should span full width in grids - only when explicitly marked */
.hr-app-form .hr-field-full {
  grid-column: 1 / -1;
}

/* Labels */
.hr-app-form label {
  font-size: 15px;
  margin-bottom: 6px;
  font-weight: 600;
  display: block;
  color: var(--hr-text);
  line-height: 1.4;
}

.hr-app-form .help-block {
  font-size: 13px;
  opacity: 0.85;
  margin: 6px 0 0;
  color: var(--hr-muted);
  font-weight: normal;
}

/* Form controls */
.hr-app-form .hr-control,
.hr-app-form input.hr-control,
.hr-app-form select.hr-control,
.hr-app-form textarea.hr-control,
.hr-app-form .form-control,
.hr-app-form input[type="text"]:not(.hr-control):not(.form-control),
.hr-app-form input[type="email"]:not(.hr-control):not(.form-control),
.hr-app-form input[type="tel"]:not(.hr-control):not(.form-control),
.hr-app-form select:not(.hr-control):not(.form-control),
.hr-app-form textarea:not(.hr-control):not(.form-control) {
  padding: 10px 12px;
  border: 1px solid var(--hr-border);
  border-radius: 10px;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  color: var(--hr-text);
  background: var(--hr-bg);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hr-app-form textarea.hr-control,
.hr-app-form textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.hr-app-form .hr-control:focus,
.hr-app-form .form-control:focus,
.hr-app-form input:focus,
.hr-app-form select:focus,
.hr-app-form textarea:focus {
  border-color: var(--hr-accent);
  box-shadow: 0 0 0 3px rgba(0, 84, 151, 0.1);
}

/* File input styling */
.hr-app-form input[type="file"].hr-control {
  padding: 8px 12px;
  cursor: pointer;
}

.hr-app-form input[type="file"].hr-control::-webkit-file-upload-button {
  padding: 6px 12px;
  background: var(--hr-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
  font-weight: 600;
}

.hr-app-form input[type="file"].hr-control::-webkit-file-upload-button:hover {
  opacity: 0.9;
}

/* Date select groups */
.hr-app-form .hr-date-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hr-app-form .hr-date-group select {
  width: 100%;
}

@media (max-width: 768px) {
  .hr-app-form .hr-date-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Legacy input-group support */
.hr-app-form .input-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hr-app-form .input-group-btn {
  min-width: 0;
}

.hr-app-form .input-group-btn select {
  width: 100%;
}

@media (max-width: 768px) {
  .hr-app-form .input-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Radio/Checkbox options */
.hr-app-form .hr-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  width: 100%;
}

.hr-app-form .hr-options label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
}

.hr-app-form .hr-options input[type="radio"],
.hr-app-form .hr-options input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

/* Legacy radio/checkbox support */
.hr-app-form input[type="radio"],
.hr-app-form input[type="checkbox"] {
  width: auto;
  margin-right: 6px;
  margin-top: 0;
  vertical-align: middle;
  cursor: pointer;
}

.hr-app-form .gender_m,
.hr-app-form .gender_f,
.hr-app-form .askerlik_e,
.hr-app-form .askerlik_h,
.hr-app-form .askerlik_m,
.hr-app-form .ehliyet_e,
.hr-app-form .ehliyet_h,
.hr-app-form .checkbox-inline,
.hr-app-form .yiletisim1_e,
.hr-app-form .yiletisim1_h,
.hr-app-form .yiletisim2_e,
.hr-app-form .yiletisim2_h,
.hr-app-form .yiletisim3_e,
.hr-app-form .yiletisim3_h,
.hr-app-form [class^="diloku_"],
.hr-app-form [class^="dilyaz_"],
.hr-app-form [class^="dilkonus_"] {
  display: inline-flex;
  align-items: center;
  margin: 6px 14px 6px 0;
  font-weight: 500;
  color: var(--hr-text);
  cursor: pointer;
}

/* Work Experience Section */
/* Desktop: Grid layout with label column + 3 workplace columns */
.hr-app-form .hr-workplace-grid {
  display: grid;
  grid-template-columns: 200px repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}

.hr-app-form .hr-workplace-grid .hr-workplace-label {
  font-weight: 600;
  color: var(--hr-text);
  padding-top: 10px;
  font-size: 14px;
}

.hr-app-form .hr-workplace-grid .hr-workplace-col {
  display: contents;
}

.hr-app-form .hr-workplace-grid input {
  width: 100%;
}

/* Mobile: Each workplace becomes a card */
@media (max-width: 768px) {
  .hr-app-form .hr-workplace-grid {
    display: block;
  }
  
  .hr-app-form .hr-workplace-card {
    background: var(--hr-bg-muted);
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .hr-app-form .hr-workplace-card-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--hr-accent);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hr-border);
  }
  
  .hr-app-form .hr-workplace-card .hr-field {
    margin-bottom: 12px;
  }
  
  .hr-app-form .hr-workplace-grid .hr-workplace-label {
    display: none;
  }
}

/* Languages Section */
/* Desktop: Grid table-like layout */
.hr-app-form .hr-language-grid {
  display: grid;
  grid-template-columns: 150px repeat(3, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.hr-app-form .hr-language-grid .hr-language-header {
  font-weight: 700;
  color: var(--hr-text);
  padding: 10px 0;
  font-size: 14px;
  text-align: center;
}

.hr-app-form .hr-language-grid .hr-language-row {
  display: contents;
}

.hr-app-form .hr-language-grid .hr-language-name {
  font-weight: 600;
  color: var(--hr-text);
  padding: 10px 0;
  font-size: 14px;
}

.hr-app-form .hr-language-grid .hr-language-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.hr-app-form .hr-language-grid .hr-language-skills label {
  margin: 0;
  font-weight: 500;
  font-size: 13px;
}

/* Mobile: Each language becomes a card */
@media (max-width: 768px) {
  .hr-app-form .hr-language-grid {
    display: block;
  }
  
  .hr-app-form .hr-language-card {
    background: var(--hr-bg-muted);
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .hr-app-form .hr-language-card-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--hr-accent);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hr-border);
  }
  
  .hr-app-form .hr-language-card .hr-language-skill-group {
    margin-bottom: 16px;
  }
  
  .hr-app-form .hr-language-card .hr-language-skill-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--hr-text);
    margin-bottom: 8px;
    display: block;
  }
  
  .hr-app-form .hr-language-card .hr-language-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .hr-app-form .hr-language-grid .hr-language-header {
    display: none;
  }
}

/* Consent checkbox */
.hr-app-form .hr-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  border: 1px solid var(--hr-border);
  background: var(--hr-bg-muted);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 20px 0;
  box-sizing: border-box;
}

.hr-app-form .hr-consent input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
}

.hr-app-form .hr-consent label {
  flex: 1;
  margin: 0;
  font-weight: normal;
  cursor: pointer;
  line-height: 1.5;
}

.hr-app-form .hr-consent a {
  color: var(--hr-accent);
  text-decoration: underline;
  word-break: break-word;
}

.hr-app-form .hr-consent a:hover {
  text-decoration: none;
}

/* Legacy checkbox-layer support */
.hr-app-form .checkbox-layer {
  border: 1px solid var(--hr-border);
  background: var(--hr-bg-muted);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  box-sizing: border-box;
}

.hr-app-form .checkbox-layer label {
  display: flex;
  align-items: flex-start;
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

.hr-app-form .checkbox-layer input[type="checkbox"] {
  margin-right: 10px;
  margin-top: 4px;
  flex-shrink: 0;
}

.hr-app-form .checkbox-layer a {
  color: var(--hr-accent);
  text-decoration: underline;
  word-break: break-word;
}

/* Buttons */
.hr-app-form .btn,
.hr-app-form .btn-primary,
.hr-app-form .btn-default,
.hr-app-form .custom-primary {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease, transform 0.05s ease;
  box-sizing: border-box;
  text-align: center;
  display: inline-block;
}

.hr-app-form .btn-primary,
.hr-app-form .custom-primary {
  background: var(--hr-accent);
  color: #fff;
}

.hr-app-form .btn-primary:hover,
.hr-app-form .custom-primary:hover {
  opacity: 0.9;
}

.hr-app-form .btn-default {
  background: #f3f5f7;
  border: 1px solid var(--hr-border);
  color: var(--hr-text);
}

.hr-app-form .btn-default:hover {
  background: #e8eaed;
}

.hr-app-form .btn:active {
  transform: translateY(1px);
}

.hr-app-form .form-group.center p {
  margin: 16px 0 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .hr-app-form .btn,
  .hr-app-form .btn-primary,
  .hr-app-form .btn-default {
    width: 100%;
  }
  
  .hr-app-form .form-group.center p {
    flex-direction: column;
  }
}

/* Utility classes */
.hr-app-form .form-group {
  margin-bottom: 16px;
}

.hr-app-form .hidden {
  display: none !important;
}

.hr-app-form .mt20 {
  margin-top: 20px;
}

/* File input */
.hr-app-form input[type="file"] {
  padding: 8px;
  border: 1px solid var(--hr-border);
  border-radius: 10px;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  background: var(--hr-bg);
}

/* Prevent horizontal overflow */
.hr-app-form,
.hr-app-form .hr-form-wrap {
  overflow-x: hidden;
  max-width: 100%;
}

/* Remove inline color styles that might interfere */
.hr-app-form input[style*="color: rgb(0, 0, 0)"] {
  color: var(--hr-text) !important;
}

/* Legacy grid classes - hide when using new structure */
.hr-app-form .col-lg-12,
.hr-app-form .col-md-12,
.hr-app-form .col-sm-12,
.hr-app-form .col-xs-12,
.hr-app-form .padding0 {
  display: block;
  width: 100%;
  float: none;
  padding: 0;
  margin: 0;
}

/* ========================================
   Work Experience Section
   Desktop: Grid with 3 workplace cards side by side
   Mobile: Stacked cards (each workplace is a card)
   ======================================== */
.hr-app-form .hr-workplace-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (min-width: 1024px) {
  .hr-app-form .hr-workplace-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hr-app-form .hr-workplace-card {
  border: 1px solid var(--hr-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevent grid overflow */
  width: 100%;
  box-sizing: border-box;
}

.hr-app-form .hr-workplace-card-header {
  background: var(--hr-accent);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.hr-app-form .hr-workplace-card-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
  color: #fff;
  flex: 1;
  min-width: 0;
}

.hr-app-form .hr-remove-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.hr-app-form .hr-remove-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hr-app-form .hr-workplace-card-body {
  padding: 18px;
  min-width: 0; /* Prevent grid overflow */
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.hr-app-form .hr-workplace-card-body .hr-grid {
  min-width: 0; /* Prevent grid overflow */
  width: 100%;
  box-sizing: border-box;
}

.hr-app-form .hr-workplace-card-body .hr-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hr-app-form .hr-workplace-card-body .hr-field {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.hr-app-form .hr-workplace-card-body .hr-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hr-app-form .hr-workplace-card-body .hr-options {
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.hr-app-form .hr-workplace-card-body .hr-field > label {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hr-app-form .hr-add-more {
  margin-top: 16px;
  text-align: center;
}

/* Mobile: Stack cards vertically */
@media (max-width: 768px) {
  .hr-app-form .hr-workplace-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .hr-app-form .hr-workplace-card-body .hr-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Languages Section
   Desktop: Grid with language cards side by side
   Mobile: Stacked cards (each language is a card)
   ======================================== */
.hr-app-form .hr-language-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.hr-app-form .hr-language-card {
  border: 1px solid var(--hr-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hr-app-form .hr-language-card-header {
  background: var(--hr-accent);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hr-app-form .hr-language-card-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
  color: #fff;
}

.hr-app-form .hr-language-card-body {
  padding: 18px;
}

/* Mobile: Stack cards vertically */
@media (max-width: 768px) {
  .hr-app-form .hr-language-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .hr-app-form .hr-language-card-body .hr-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Ciner Group Section
   Desktop: Grid with ciner cards side by side
   Mobile: Stacked cards (each entry is a card)
   ======================================== */
.hr-app-form .hr-ciner-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.hr-app-form .hr-ciner-card {
  border: 1px solid var(--hr-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hr-app-form .hr-ciner-card-header {
  background: var(--hr-accent);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hr-app-form .hr-ciner-card-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
  color: #fff;
}

.hr-app-form .hr-ciner-card-body {
  padding: 18px;
}

/* Mobile: Stack cards vertically */
@media (max-width: 768px) {
  .hr-app-form .hr-ciner-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .hr-app-form .hr-ciner-card-body .hr-grid {
    grid-template-columns: 1fr;
  }
}

/* Date group styling */
.hr-app-form .hr-date-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hr-app-form .hr-date-group select {
  width: 100%;
}

@media (max-width: 768px) {
  .hr-app-form .hr-date-group {
    grid-template-columns: 1fr;
  }
}

/* reCAPTCHA - correct native behavior */
.hr-app-form .hr-recaptcha{
    width:100%;
    margin:24px 0;
    display:flex;
    justify-content:center;
  }
  
  /* DO NOT constrain or hide overflow */
  .hr-app-form .hr-recaptcha,
  .hr-app-form .hr-recaptcha *{
    overflow:visible !important;
    transform:none !important;
  }