/* Gym trainer form — extras on top of styles.css */

.sports-dropdown {
  position: relative;
  width: 100%;
}

.sports-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: calc(2.25rem + 2px);
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid #e0d6c8;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.sports-dropdown-toggle:hover,
.sports-dropdown-toggle:focus {
  border-color: #c9a05c;
  outline: none;
}

.sports-dropdown-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.sports-dropdown-caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.25rem;
  border-top: 0.35rem solid #6c757d;
  border-right: 0.35rem solid transparent;
  border-left: 0.35rem solid transparent;
  flex-shrink: 0;
}

.sports-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #e0d6c8;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sports-dropdown-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.25rem 0.5rem;
  padding: 0.75rem;
}

.sports-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0;
  font-weight: 400;
  transition: background-color 0.15s ease;
}

.sports-dropdown-item:hover {
  background-color: #f7f2eb;
}

.sports-dropdown-check {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0;
  flex-shrink: 0;
  accent-color: #c9a05c;
  cursor: pointer;
}

.sports-dropdown-label {
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
}

@media (max-width: 576px) {
  .sports-dropdown-list {
    grid-template-columns: 1fr;
  }

  .sports-dropdown-menu {
    max-height: 280px;
  }
}

/* --- Repeatable staff cards ------------------------------------------------- */

.staff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.staff-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.staff-remove-btn:hover,
.staff-remove-btn:focus {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.15);
  outline: none;
}

.staff-attachments {
  padding: 1rem;
  background-color: #fbf8f3;
  border: 1px dashed #e0d6c8;
  border-radius: 8px;
}

.staff-attachments-title {
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #8a6a32;
}

.add-staff-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.add-staff-btn {
  color: #8a6a32;
  background-color: #fff;
  border: 2px dashed #c9a05c;
  border-radius: 8px;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
}

.add-staff-btn:hover:not(:disabled),
.add-staff-btn:focus:not(:disabled) {
  color: #fff;
  background-color: #c9a05c;
  border-color: #c9a05c;
}

.add-staff-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.file-list {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.file-list li {
  word-break: break-all;
}

@media (max-width: 576px) {
  .add-staff-btn {
    width: 100%;
  }
}

/* Freelance link shown on the invalid / expired link screen */
.freelance-hint {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.freelance-hint a {
  font-weight: 600;
  color: #8a6d3b;
}

/* Licence number pre-filled from the invitation: read-only. */
.form-control.locked-field {
  background-color: #f4f0ea;
  color: #5a5048;
  cursor: not-allowed;
}

/* Establishment's freelance trainers link + QR (form card and success screen). */
.freelance-share-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.freelance-share-qr {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e0d6c8;
  border-radius: 8px;
}

.freelance-share-qr canvas,
.freelance-share-qr img {
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
}

#successFreelanceShare {
  color: #212529;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

/* --- Toast notifications (success / error), same look as the admin dashboard --- */
.toast-container {
  z-index: 1060;
}

#formToast {
  min-width: 300px;
  max-width: 460px;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(61, 61, 59, 0.18);
}

#formToast .toast-header {
  background: #8a6d3b;
  color: #fff;
  border-bottom: none;
  padding: 0.75rem 1rem;
}

#formToast .toast-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.9;
}

#formToast .toast-body {
  padding: 1rem;
  font-size: 0.95rem;
  white-space: pre-line;
}

#formToast.toast-success .toast-header { background: #2f7d4f; }
#formToast.toast-error .toast-header { background: #b91c1c; }

@media (max-width: 576px) {
  .toast-container {
    left: 0;
    right: 0;
  }

  #formToast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}
