.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: #007dff;
}

.btn-primary {
    background-color: #007DFF;
    border-color: #007DFF;
    font-family: 'DM Sans', system-ui;
    font-weight: 600;
}

.badge-success {
    background-color: #1db954;
} 
.badge-outline-primary {
    background-color: #007bff00;
    border-width: 1px !important;
    border-style: solid;
    border-color: #007DFF;
    border-radius: .25rem !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#canvas {
    background: #232323;
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 1;
  }

#position-id {
    position:relative;
    z-index: 10;
}

.form {
    margin-top: 50px;
}

.danger {
    color:#ff4500;
}

.success {
    color:#11b911;
}

.btn-success {
  background-color: #1DB954 !important;
  border-color: #1DB954 !important;
}

.alert-danger {
    background-color: #fb0404 !important;
    color: #ffff !important; 
    font-weight: 700;
}

.alert-success {
  color: #ffffff;
  background-color: #1DB954;
  border-color: #1DB954;
  font-weight: 600;
}

.alert-warning {
  color: #a45800;
  background-color: #ffc1076b;
  font-weight: 600;
}

.card {
  border: 0px !important;
  border-radius: 8px !important;
}

.shadow {
  box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .1) !important;
}

.overview-card-h3 {
    font-size: 1.05rem !important;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: var(--wizard-text);
    display: flex;
    align-items: center; /* Joondab sisu vertikaalselt keskpaika */
    min-height: 40px;
}

.sidebar .sidebar-brand {
    text-transform: none !important;
    font-weight: 650;
    font-size: 1.35rem;
}
/* Questionnare styles BEGINS */
:root {
    --wizard-primary: #087cff;
    --wizard-primary-soft: #eff6ff;
    --wizard-text: #263449;
    --wizard-muted: #99a5b4;
    --wizard-border: #e3eaf2;
}

.section-explanation {
    color: var(--wizard-text) !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
}

.wizard-form-container,
.wizard-form-container * { box-sizing: border-box; }

.wizard-form-container {
    width: calc(100% - 32px);
    max-width: 920px;
    margin: 26px auto 60px;
    padding: 40px;
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 18px;
    box-shadow: 0 12px 42px rgba(33, 47, 74, .055);
    color: var(--wizard-text);
    font-family: 'DM Sans', system-ui;
    font-size: 15px;
    line-height: 1.5;
}

.wizard-form-container .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    clip-path: inset(50%) !important;
}

/* Compact progress bar */
.wizard-progress-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--wizard-muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
.wizard-progress-header #stepCount { 
    color: var(--wizard-primary); 
}

.wizard-progress-bar {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 36px;
}
.wizard-progress-step {
    flex: 1 1 0;
    height: 7px;
    background: #e9edf3;
    border-radius: 99px;
    transition: background .2s;
}
.wizard-progress-step.active { background: var(--wizard-primary); }
.wizard-progress-step.completed { background: #1DB954; }

/* Section headings */
.wizard-step-heading { margin-bottom: 10px; }
.wizard-step-heading h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: var(--wizard-text);
    margin: 0 0 8px;
}
.wizard-step-heading p {
    color: var(--wizard-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 4px;
}
.wizard-step-heading .scale-hint { margin-top: 10px; }
.wizard-form-container .text-danger { color: #fb0404; }

/* Show only active step. */
.wizard-form-container .form-step { display: none; }
.wizard-form-container .form-step.active { display: block; }

/* Question sections */
.wizard-form-container .form-group {
    margin: 0;
    padding: 24px 0;
    border-bottom: 1px solid #edf0f5;
}
.wizard-form-container .form-group:last-child { 
    border-bottom: none; 
}

.wizard-form-container .question-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}
.wizard-form-container .question-label,
.wizard-form-container .form-group > label {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    color: var(--wizard-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.55;
}

/* Standard fields */
.wizard-form-container .form-group input:not([type='radio']),
.wizard-form-container .form-group select {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    padding: 11px 14px;
    color: var(--wizard-text);
    background: #fff;
    border: 1px solid #cdd6e2;
    border-radius: 9px;
    font: inherit;
    transition: box-shadow .18s, border-color .18s;
}
.wizard-form-container .form-group input:not([type='radio']):focus,
.wizard-form-container .form-group select:focus {
    border-color: var(--wizard-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(8,124,255,.14);
}

/* Selectable answer cards */
.wizard-form-container .likert-scale {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 19px;
}
.wizard-form-container .likert-scale--4 {
    grid-template-columns: repeat(4, minmax(0, 155px));
    justify-content: center;
}
.wizard-form-container .likert-scale--7 {
    grid-template-columns: minmax(0, 1.45fr) repeat(5, minmax(0, 1fr)) minmax(0, 1.45fr);
    gap: 8px;
}
.wizard-form-container .likert-option {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: 110px;
    gap: 5px;
    padding: 12px 7px;
    margin: 0;
    text-align: center;
    color: var(--wizard-text);
    background: #fff;
    border: 1px solid var(--wizard-border);
    border-radius: 11px;
    cursor: pointer;
    transition: background .16s, border-color .16s, box-shadow .16s;
}
/* Visually hidden, but still keyboard-accessible and submitted with the form. */
.wizard-form-container .likert-option input[type='radio'] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    overflow: hidden;
}
.wizard-form-container .likert-option::before {
    content: '';
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-bottom: 2px;
    border: 2px solid #b4c0d0;
    border-radius: 50%;
    background: white;
    transition: background .16s, border-color .16s;
}
.wizard-form-container .likert-number {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    color: #4b5d75;
}
.wizard-form-container .likert-text {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
    color: #5b6c82;
    overflow-wrap: break-word;
}
.wizard-form-container .likert-option:hover {
    background: #f8fbff;
    border-color: #84b9ff;
}
.wizard-form-container .likert-option:has(input:checked) {
    background: var(--wizard-primary-soft);
    border: 2px solid var(--wizard-primary);
    box-shadow: 0 2px 6px rgba(8,124,255,.08);
}
.wizard-form-container .likert-option:has(input:checked)::before {
    border-color: var(--wizard-primary);
    background: var(--wizard-primary);
    box-shadow: inset 0 0 0 3px white;
}
.wizard-form-container .likert-option:has(input:checked) .likert-number {
    color: #075cc5;
}
.wizard-form-container .likert-option:has(input:focus-visible) {
    outline: 3px solid #70adff;
    outline-offset: 3px;
}

/* Footer navigation */
.wizard-form-container .form-buttons {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    margin-top: 22px;
    border-top: 1px solid #e6eaf1;
}
.wizard-form-container .form-buttons .btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.wizard-form-container .btn-prev {
    color: #41556f;
    background: #fff;
    border: 1px solid #ced8e4;
}
.wizard-form-container .btn-prev:not(:disabled):hover { background: #f4f7fb; }
.wizard-form-container .btn-primary {
    color: #fff;
    background: var(--wizard-primary);
    border: 1px solid var(--wizard-primary);
}
.wizard-form-container .btn-primary:hover { background: #0568d7; }
.wizard-form-container .btn:focus-visible {
    outline: 3px solid #91bfff;
    outline-offset: 2px;
}
.wizard-form-container .btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 780px) {
    .wizard-form-container { padding: 26px; }
    .wizard-form-container .likert-scale--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wizard-form-container .likert-scale--7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .questionnaire-page-header { margin-top: 24px; }
    .wizard-form-container { padding: 20px 16px; border-radius: 14px; margin-top: 18px; }
    .wizard-form-container .wizard-progress-bar { margin-bottom: 26px; }
    .wizard-step-heading h2 { font-size: 22px; }
    .wizard-form-container .question-label, .wizard-form-container .form-group > label { font-size: 15px; }
    .wizard-form-container .likert-scale--6,
    .wizard-form-container .likert-scale--4,
    .wizard-form-container .likert-scale--7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wizard-form-container .likert-option { min-height: 95px; }
    .wizard-form-container .likert-scale--7 .likert-option:last-child { grid-column: 1 / -1; }
    .wizard-form-container .form-buttons .btn { flex: 1 1 0; }
}
@media (prefers-reduced-motion: reduce) {
    .wizard-form-container *, .wizard-form-container *::before { transition: none !important; }
}

/* Phone Usage Ranking BEGINS */
.phone-ranking-description {
    font-size: 14px;
    line-height: 1.6;
    color: #667085;
    margin: 8px 0 20px;
}

.phone-ranking-hint {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #667085;
}

.phone-ranking {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.phone-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: grab;
    user-select: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.phone-ranking-item:hover {
    background: #f8fbff;
    border-color: #b9d7ff;
}

.phone-ranking-item:active {
    cursor: grabbing;
}

/* Drag and drop */
.phone-ranking-item.is-dragging {
    opacity: 0.45;
    background: #eff6ff;
    border: 1px dashed #007bff;
}

.phone-ranking-item.is-drop-target {
    background: #eff6ff;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Drag handle */
.ranking-handle {
    font-size: 23px;
    line-height: 1;
    color: #98a2b3;
    cursor: grab;
    flex-shrink: 0;
}

/* Ranking number */
.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: #f2f4f7;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #344054;
}

/* Category text */
.ranking-label {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #344054;
}

/* Arrow buttons */
.ranking-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.phone-ranking .ranking-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 18px;
    color: #667085;
    cursor: pointer;
    transition: all 0.2s ease;
}

.phone-ranking .ranking-btn:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #007bff;
    color: #007bff;
}

.phone-ranking .ranking-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.phone-ranking .ranking-btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.phone-ranking-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .phone-ranking-item {
        padding: 12px 10px;
        gap: 8px;
    }

    .ranking-handle {
        font-size: 19px;
    }

    .ranking-number {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .ranking-label {
        font-size: 13px;
    }

    .phone-ranking .ranking-btn {
        width: 32px;
        height: 36px;
        font-size: 16px;
    }

    .ranking-actions {
        gap: 4px;
    }
}
/* Phone Usage Ranking ENDS */
/* Questionnare styles ENDS */

.save-btn {
    display: block;
    width: 50%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #ffffff;
    background-clip: padding-box;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }


/* Filled questionnares styles BEGINS */
.nowrap {
  white-space: nowrap ;
  display: inline;
}

.questionnares-list a {
  color: #212529;
  text-decoration: none;
}

.questionnares-list a:hover {
    text-decoration: underline;
    color: #007dff;
    transition: 0.5s;
}

.number-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background-color: #e5e5e5;
    border-radius: 50%;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}
/* Filled questionnares styles ENDS */

  /* Loaderi stiil algab */
.loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border-top: 3px solid #007dff;
  border-right: 3px solid transparent;
  box-sizing: border-box;
  display: inline-block;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
} 
/* Loaderi stiil lõppeb */

.disabled {
    pointer-events: all !important;
  }

.create-btn-tooltip {
    float: right; 
    margin-bottom: 15px;
}

.label-center {
    display: block;
    text-align: center;
}

.form-control-select {
    border-radius: 10rem;
}

/* Input fieldid algab */
.form__group {
    position: relative;
    padding: 15px 0 0;
    margin-top: 10px;
    width: 100%;
  }
  
.form__field {
    font-family: inherit;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #007dff;
    border-radius: 5px;
    outline: 0;
    font-size: 1rem;
    padding: 7px 0;
    background: transparent;
    transition: border-color 0.2s;
}
.form__field::placeholder {
    color: transparent;
}
.form__field:placeholder-shown ~ .form__label {
    font-size: 1rem;
    cursor: text;
    top: 25px;
}

.form__label {
    position: absolute;
    top: 0;
    display: block;
    transition: 0.2s;
    font-size: 1rem;
}
  
.form__field:focus {
padding-bottom: 6px;
font-weight: 400;
border-width: 2px;
border-image-slice: 1;
}
.form__field:focus ~ .form__label {
position: absolute;
top: 0;
display: block;
transition: 0.2s;
font-size: 1rem;
font-weight: 400;
}
  
/* reset input */
.form__field:required, .form__field:invalid {
box-shadow: none;
}
/* Input fieldid lõppeb */
