/*// Sticky step bar*/
#trial-step-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 14px 0 10px;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    min-width: 80px;
    max-width: 100px;
    cursor: default;

    .step-bubble {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 2px solid #8f9091;
        background: #fff;
        color: #86888a;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 0.85rem;
        transition: all 0.25s ease;
        position: relative;
    }

    .step-check { display: none; }
    .step-number { display: block; }

    .step-label {
        font-size: 0.7rem;
        color: #86888a;
        text-align: center;
        margin-top: 5px;
        line-height: 1.2;
        transition: color 0.25s ease;
    }

/*// Active step*/
&.active {
    .step-bubble {
        border-color: #3d5a8a;
        background: #3d5a8a;
        color: #fff;
        box-shadow: 0 0 0 3px rgba(61, 90, 138, 0.2);
    }
    .step-label {
        color: #3d5a8a;
        font-weight: 600;
    }
}

/*// Completed step*/
&.completed {
    .step-bubble {
        border-color: #1caea4;
        background: #2fb0a7;
        color: #fff;
    }
    .step-check { display: block; }
    .step-number { display: none; }
    .step-label { color: #256557; }
}
}

/*// Connector line between bubbles*/
   .step-connector {
       flex: 1;
       height: 2px;
       background: #dee2e6;
       margin-top: 17px; // vertically center with bubbles
   transition: background 0.25s ease;
       min-width: 20px;

       &.completed {
           background: #198754;
       }
   }

/*// Responsive — hide labels on small screens*/
@media (max-width: 575px) {
    .step-label { display: none; }
    .step-item { min-width: 36px; }
}

.min-200-height {
    min-height: 200px;
}

/*Pagination styles*/
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #334195;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pagination .current {
    color: #232323;
    border: 2px solid #022360;
    padding: 3px 10px 3px 10px;
    border-radius: 4px;
}

.pagination a:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #011839;
}

.pagination .current:hover {
    background: #ededed;
    color: #04285c;
}

.pagination .disabled {
    color: #cfcdcd;
    border-color: #dee2e6;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .gap span {
    border: none;
    background: transparent;
    color: #adb5bd;
}


.colored-chk-box { border-color: #334195}

/* ── Trial registration form panel ── */
#new_trial_form,
#edit_trial_form {
  background: #ffffff !important;
  border-color: #d4dce8 !important;
  box-shadow: 0 2px 10px rgba(61, 90, 138, 0.08);
  border-radius: 0.5rem;
}

/* Section headings inside form */
#new_trial_form h4,
#edit_trial_form h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #3d5a8a;
  padding-left: 0.714rem;
  border-left: 3px solid #3d5a8a;
  margin-bottom: 1rem;
}

/* Form labels */
#new_trial_form .form-label,
#edit_trial_form .form-label {
  font-weight: 500;
  color: #3a4a5c;
  font-size: 0.857rem;
}

/* Admin-only fieldset */
.admin-fieldset {
  background: #f5f7fb;
  border: 1px solid #d4dce8;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-top: 1.5rem;
}

.admin-fieldset h4 {
  color: #6b7a8d !important;
  border-left-color: #9aafc7 !important;
  font-size: 0.857rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Admin feedback box — shown on returned trials ── */
.admin-feedback-box {
  display: flex;
  align-items: flex-start;
  gap: 0.429rem;
  background: var(--color-warning-bg);
  border-left: 3px solid var(--color-warning-border);
  color: var(--color-warning-text);
  border-radius: 0 0.286rem 0.286rem 0;
  padding: 0.429rem 0.714rem;
  margin-bottom: 0.5rem;
  font-size: 0.857rem;
}

.admin-feedback-box__icon {
  flex-shrink: 0;
  margin-top: 0.071rem;
}

.admin-feedback-box__text {
  white-space: pre-wrap;
}

/* ── Admin feedback on show page (admin read-only) ── */
.show-feedback-box {
  background: #fff8e1;
  border-left: 3px solid var(--color-warning-border);
  border-radius: 0 0.286rem 0.286rem 0;
  padding: 0.357rem 0.571rem;
  font-size: 0.8rem;
}

.show-feedback-box__header {
  font-size: 0.714rem;
  font-weight: 600;
  color: var(--color-warning-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.214rem;
}

.show-feedback-box__body {
  white-space: pre-wrap;
  color: #5a4000;
  font-size: 0.8rem;
}

.show-feedback-attribution {
  font-size: 0.686rem;
  color: #8a6800;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── File upload — step 5 ── */
.upload-section {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.upload-section-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

.upload-drop-area {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: #0d6efd;
    color: #fff;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
    transition: background 0.15s;
}

.upload-btn:hover {
    background: #0b5ed7;
    color: #fff;
}

.upload-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.upload-hint {
    font-size: 0.8rem;
    color: #adb5bd;
}

.upload-files-table {
    margin-bottom: 0;
    border-top: 1px solid #e9ecef;
}

.upload-files-table thead th {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 600;
    padding: 6px 16px;
}

.upload-files-table tbody td {
    padding: 8px 16px;
    font-size: 0.85rem;
    vertical-align: middle;
}

.upload-files-table tbody tr:first-child td {
    border-top: 1px solid #e9ecef;
}

/* ── Tom Select country select ── */
.ts-country-select {
    position: relative;
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    min-height: 38px;
}

.ts-country-select .ts-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px 36px 4px 8px;
    min-height: 38px;
    cursor: text;
    position: relative;
}

.ts-country-select .ts-control input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 120px;
    font-size: 0.9rem;
    padding: 2px 0;
}

.ts-country-select .ts-control .item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e7f0ff;
    border: 1px solid #b8d0ff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.82rem;
    color: #0d47a1;
    white-space: nowrap;
}

.ts-country-select .ts-control .item .remove {
    cursor: pointer;
    color: #0d47a1;
    font-size: 0.9rem;
    line-height: 1;
}

.ts-country-select .clear-button {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
    font-size: 1rem;
    z-index: 1;
}

.ts-country-select .ts-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
}

.ts-country-select .ts-dropdown .option {
    padding: 3px 12px;
    font-size: 0.88rem;
    cursor: pointer;
}

.ts-country-select .ts-dropdown .option:hover,
.ts-country-select .ts-dropdown .option.active {
    background: #f0f4ff;
    color: #0d47a1;
}

.ts-country-select .ts-dropdown .optgroup-header {
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    background: #f8f9fa;
    letter-spacing: 0.05em;
}

.ts-country-select .ts-dropdown .divider {
    border-top: 1px solid #e9ecef;
    margin: 3px 0;
}

.ts-country-select:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* Date field with inline calendar icon */
.date-input-wrapper {
    position: relative;
}

.date-input-wrapper .form-control {
    padding-right: 2.143rem;
}

.date-picker-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: #6b7a8d;
    cursor: pointer;
    font-size: 0.857rem;
    line-height: 1;
}

.date-picker-btn:hover {
    color: var(--color-brand-navy, #3d5a8a);
}

.date-picker-btn:focus {
    outline: none;
}

.date-picker-btn:disabled {
    color: #adb5bd;
    cursor: default;
}

/* Password visibility toggle */
.password-toggle-btn {
    border-color: #dee2e6;
    color: #6b7a8d;
    background: #fff;
}

.password-toggle-btn:hover {
    color: var(--color-brand-navy, #3d5a8a);
    background: #f8f9fa;
    border-color: #dee2e6;
}

.password-toggle-btn:focus {
    box-shadow: none;
    outline: none;
    border-color: #dee2e6;
}