/*
 * Header "Recruitment"/"Login" buttons and the shared .ifd-modal chrome
 * used by both the recruitment modal (site-wide, header.php) and the
 * purchasing-disabled modal on course pages (assets/css/course-detail.css
 * defines the same classes there for pages that don't load this file).
 */

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
}

.header-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding);
  font-family: var(--font-primary);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-white);
  background-color: var(--color-green-darkest);
  border: var(--btn-border-width) solid var(--color-green-darkest);
  border-radius: var(--btn-border-radius);
  transition: var(--transition-base);
  cursor: pointer;
  width: max-content;
  white-space: nowrap;
}

.header-action-btn:hover {
  color: var(--color-green-darkest);
  background-color: var(--color-white);
  border-color: var(--color-green-darkest);
  text-decoration: none;
}

@media (min-width: 768px) {
  .home .header-action-btn {
    font-size: small;
  }
}

/* =============================================
   Shared modal chrome
   ============================================= */
.ifd-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ifd-modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.ifd-modal-content {
  position: relative;
  background-color: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
}

.ifd-modal-content a {
  color: #50991f;
}

.ifd-modal-content--form {
  max-width: 560px;
  text-align: left;
}

@media only screen and (min-width: 1000px) {
  .ifd-modal-content--form {
    width: 900px;
    max-width: 900px;
  }
}

.ifd-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #aaa;
}

.ifd-modal-close:hover {
  color: #000;
}

/* =============================================
   Recruitment form
   ============================================= */
.ifd-form-row {
  display: flex;
  gap: 16px;
}

.ifd-form-row .ifd-form-field {
  flex: 1;
}

.ifd-form-field {
  margin-bottom: 16px;
}

.ifd-form-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.ifd-form-field sup {
  color: #c00;
}

.ifd-form-field input[type="text"],
.ifd-form-field input[type="tel"],
.ifd-form-field input[type="email"],
.ifd-form-field input[type="file"],
.ifd-form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}

.ifd-form-field textarea {
  resize: vertical;
}

.ifd-form-status {
  font-size: 14px;
  margin: 0 0 12px;
}

.ifd-form-status.is-error {
  color: #c00;
}

.ifd-form-status.is-success {
  color: #50991f;
}

.ifd-form-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.ifd-form-field--cv {
  flex: 1;
  margin-bottom: 0;
}

.ifd-form-submit {
  flex-shrink: 0;
}

.ifd-form-submit:disabled {
  background-color: #d3d3d3;
  border-color: #d3d3d3;
  color: #8a8a8a;
  cursor: not-allowed;
}
