@import url('../../../../../projects/gbhost/public/gbstyle/gbcommonstyle.scss');

/* View toggle buttons — no longer absolute; sits in normal flow above the step indicator */
.view-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 1rem;
  margin-bottom: 0.75rem;
  z-index: 10;

  button {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: white;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    &.active {
      background: var(--action-primary-default);
      color: white;
      border-color: var(--action-primary-default);
    }
    &:hover:not(.active) {
      background: #f9fafb;
    }
  }
}

/* Step Indicator */
.step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0 1.5rem 0;
  padding: 0 1rem;
  margin-top: -5px;
}

.Toggle {
  margin-top: 7px;
  display: flex;
  gap: 10px;
}

.step-item {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
  cursor: pointer;

  &:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 60px);
    right: calc(-50% + 60px);
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
  }
  &.completed::after { background: var(--action-primary-default); }
}

.step-circle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 12px;
  font-size: 16px;
  position: relative;
  z-index: 1;
  &.active    { background: var(--action-primary-default); color: white; }
  &.completed { background: var(--action-primary-default); color: white; }
}

.step-info {
  h4 { margin: 0; font-size: 14px; font-weight: 600; color: #111827; }
  p  { margin: 0; font-size: 12px; color: #6b7280; }
}

/* ─── Wizard Layout ─────────────────────────────────────────────────────── */
.wizard-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
  /* 
   * Everything above this grid in the page:
   *   page-title bar   ~48px
   *   formaction bar   ~48px
   *   toggle row       ~40px
   *   step indicator   ~70px
   *   ─────────────────────
   *   total            ~206px  →  use 220px for a little breathing room
   * 
   * Locking the grid itself to the remaining viewport height keeps
   * the sidebar sticky AND lets only the form-content column scroll.
   */
  height: calc(100vh - 220px);
}

.form-content {
  min-width: 0;
  /* scroll ONLY this column; height fills the grid row */
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

/* ─── Actions Sidebar ───────────────────────────────────────────────────── */
.actions-sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  position: sticky;
  top: 1rem;

  h3 { font-size: 18px; font-weight: 600; margin: 0 0 1.25rem 0; color: #111827; }

  button {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    &.primary   { background: var(--action-primary-default); color: white; border: none; }
    &.secondary { background: white; color: #374151; border: 1px solid #d1d5db; }
  }

  .step-counter {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    h4 { font-size: 14px; font-weight: 600; margin: 0 0 0.5rem 0; color: #111827; }
    p  { font-size: 14px; color: #6b7280; margin: 0; }
  }
}

/* ─── Wizard step display ───────────────────────────────────────────────── */
.wizard-view {
  .step1, .step2, .step3, .step4 { display: none; }
  &[data-step="1"] .step1 { display: block; }
  &[data-step="2"] .step2 { display: block; }
  &[data-step="3"] .step3 { display: block; }
  &[data-step="4"] .step4 { display: block; }
}

/* Common step card styling */
.step1, .step2, .step3, .step4 {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  h3  { font-size: 20px; font-weight: 600; margin: 0 0 0.5rem 0; color: #111827; }
  > p { color: #6b7280; font-size: 14px; margin: 0 0 1.5rem 0; }
}

/* ─── Form view (all steps stacked) ─────────────────────────────────────── */
.form-view {
  /* reuse the same scroll container behaviour as form-content */
  height: calc(100vh - 220px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;

  .step1, .step2, .step3, .step4          { display: block !important; margin-bottom: 1.5rem; }
  .step1 > p, .step2 > p, .step3 > p, .step4 > p { display: none; }
}

/* ─── Lightbox / Modal styles ───────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  justify-content: center;
  background-color: #fefefe;
  margin: auto;
  padding: 0px 20px 20px 20px;
  border: 1px solid #888;
  width: 960px;
  height: 400px;
  border-radius: 10px;
}

.modal-header {
  position: sticky;
  top: 0;
  background-color: #fefefe;
  padding: 10px 0;
  z-index: 10;
  border-bottom: 1px solid #ccc;
}

.TabName {
  font-family: 'Helvetica';
  font-style: normal;
  margin-left: 400px;
  width: 800px;
  font-weight: 700;
  font-size: 20px;
  line-height: 10px;
  background-color: #FFFFFF;
}

.TabNameKRA {
  font-family: 'Helvetica';
  font-style: normal;
  margin-left: 630px;
  width: 800px;
  font-weight: 700;
  font-size: 20px;
  line-height: 10px;
  background-color: #FFFFFF;
}

.TabNameSkill {
  font-family: 'Helvetica';
  font-style: normal;
  margin-left: 450px;
  width: 800px;
  font-weight: 700;
  font-size: 20px;
  line-height: 10px;
  background-color: #FFFFFF;
}

.TabNameRecurement {
  font-family: 'Helvetica';
  font-style: normal;
  margin-left: 550px;
  width: 800px;
  font-weight: 700;
  font-size: 20px;
  line-height: 10px;
  background-color: #FFFFFF;
}

.closeicon {
  width: 935px;
  display: flex;
  justify-content: right;
  cursor: pointer;
  margin-bottom: 20px;
  margin-top: -27px;
}

.Addbtn {
  cursor: pointer;
  margin-top: 10px;
  margin-right: 30px;
  margin-bottom: 10px;
  display: inline-flex;
  justify-content: center;
  align-content: center;
  box-shadow: 0px 2px 2px 0px #0000000F;
  border-radius: 6px;
  padding-top: 7px;
  color: #FFFFFF;
  width: 120px;
  height: 32px;
  background-color: #6E3AB6;
  font-family: Helvetica;
  font-size: 12px;
  font-weight: 500;
  line-height: 19px;
}

.caption-med-12-type-primary {
  font-weight: 700;
  line-height: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-right: 16px;
}

.save, .text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  min-width: 120px;
  height: 32px;
  border-radius: 4px;
  font-size: 14px;
}

.text    { border: 0.5px solid #6E3AB6; color: #6E3AB6; }
.maticon { font-size: 18px;}