/* HTML elements */

* {
    margin: 0px;
    padding: 0px;
}

/** COLOR THEMES **/
/* Light Mode */

:root {
    --bg-color: #ffffff; /* background color */
    --text-color: #000000; /* text color */
    --challenge-background-color: #f1f9fd; /* background color of challenges */
    --challenge-email-color: #faecca; /* background color email column in interactive challenge */
    --challenge-email-input-color: #f0f0f0; /* background color email column in interactive challenge */
    --challenge-placeholder-hover-color: #d9d9d9;
    --progress-modal-nav-background-color: #f0f0f0; /* background color of progress modal */
    --progress-modal-nav-color: #4a4a4a; /* text color of progress modal */
}

/* Dark Mode */
[data-bs-theme="dark"] {
    --bg-color: #212121; /* background color */
    --text-color: #ffffff; /* text color */
    --challenge-background-color: #666b6c; /* background color of challenges */
    --challenge-email-color: #806933; /* background color email column in interactive challenge */
    --challenge-email-input-color: #9a9a9a; /* background color email column in interactive challenge */
    --challenge-placeholder-hover-color: #b8b8b8;
    --progress-modal-nav-background-color: #4a4a4a; /* background color of progress modal */
    --progress-modal-nav-color: #f0f0f0; /* text color of progress modal */
}
/** COLOR THEMES **/

a {
    text-decoration: none;
}

body {
    font-size: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
}

html{
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
} 

/* Classes */

#admin-mode-controls {
    position: fixed;
    z-index: 10;
    padding: 1rem;
    left: 2rem;
    top: 6rem;
    bottom: 6rem;
    overflow-y: scroll;
    border-style: solid;
    border-width: 1px;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#admin-mode-controls p {
    margin-bottom: 0rem;
}

#admin-mode-controls div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.as_hyperlink {
    background: none!important;
    border: none;
    padding: 0!important;
    /*input has OS specific font-family*/
    color: var(--bs-link-color);
    cursor: pointer;
}

.bd-toc {
    position:-webkit-sticky;
    position: sticky;
    top: 5rem;
    right: 0;
    z-index: 2;
    height: calc(100vh - 7rem);
    overflow-y: auto;
}

.callout {
    padding: 1.25rem;
    color: var(--bd-callout-color, inherit);
    background-color: var(--bd-callout-bg, var(--bs-gray-100));
    border-left: 0.25rem solid var(--bd-callout-border, var(--bs-gray-300));
}

.callout-success{
    --bd-callout-color: var(--bs-success-text-emphasis);
    --bd-callout-bg: var(--bs-success-bg-subtle);
    --bd-callout-border: var(--bs-success-border-subtle);
}

.callout-error {
    --bd-callout-color: var(--bs-danger-text-emphasis);
    --bd-callout-bg: var(--bs-danger-bg-subtle);
    --bd-callout-border: var(--bs-danger-border-subtle);
}

.challenge-container {
    background-color: var(--challenge-background-color);
    border-radius: 10px;
    border-style: solid; /*groove*/
   /*border-color: #c0d7fa;  border-color: #acbbd2;*/
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding: 20px;
}

.wifi-container {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 65vw;
}

.intro-container {
    background-color: var(--bg-color)
}

.credentials {
    width: 30%;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.credentials-form {
width: 100%;
}

.hidden {
    visibility: hidden;
}

.highlight-link.pointer {
    cursor: default;
}

.incorrect {
    border-color: red;
}

.main-text-container {
    padding-left:   min(10rem, 15%);
    padding-right:  min(10rem, 15%);
    padding-bottom: min(10rem, 20%);
}

.messages{
    margin-bottom: 0;
}

.nav-link.progress-nav-link {
    color: var(--progress-modal-nav-color);
    background-color: var(--progress-modal-nav-background-color);
    border: none;
}

.nav-link.progress-nav-link:hover {
    color: #40c4ff;
}

.nav-link.progress-nav-link.active {
  color: #ffffff;
  background-color: #008EC6;
  border: none;
}

.progress-modal-content {
  height: 800px;
  overflow-y: auto;
}

.quiz-answer {
    text-align: center;
}

.sidelink {
    display: block;
    padding: 0.125rem 0 0.125rem 0.75rem;
    color: inherit;
    text-decoration: none;
    border-left: 0.125rem solid transparent;
    padding-top: 7px;
    margin-right: 5px;
}

.sidelink:hover, .sidelink.active {
    color: var(--bd-toc-color);
    border-left-color: var(--bd-toc-color);
}

.sign-up {
    width: 70%;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tutorial-highlight {
    box-sizing: border-box;
    outline: 3px solid red;
    border-radius: 3px;
}

.tutorial-highlight {
    box-sizing: border-box;
    outline: 3px solid red;
    border-radius: 3px;
}

.highlight-link.pointer {
    cursor: default;
}

/* Ids */

#index_main_container {
    background:         
        linear-gradient(
        rgba(0, 0, 0, 1), 
        rgba(0, 0, 0, 0)
        ),url("../img/pexels-mikhail-nilov-6963944-Xlowres.jpeg"), url("../img/pexels-mikhail-nilov-6963944-lowres.jpeg");
    background-size: cover;
    background-blend-mode: saturation;
    height: 100vh;
}

#reg_reset{
    font-size: 0.8em;
}

#sidebar {
    width: 15%;
}

/* Necessary for image to be visible in dark-mode */
#table img {
    background: rgba(255, 255, 255, 0.8); /* semi-transparent white */
}

/*Style feedback pop-up */

.modal-content {
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e3f2fd; /* Original blå färg */
    color: black;
    padding: 15px 20px;
    border-bottom: none;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-body {
    padding: 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: none;
    background-color: var(--bg-color);
}

.btn-primary {
    background-color: #007bff; /* Original blå färg */
    border-color: #007bff;
    transition: background-color 0.3s, border-color 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #0056b3; /* Original grå färg */
    border-color: #0056b3;
    transition: background-color 0.3s, border-color 0.3s;
}

.btn-secondary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

#phishing-test-container {
    padding: 1rem;
}

#phising-test-input-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-content: center;
    gap: 2rem;
}

.hidden-mail {
    display: none;
}

.hidden-button {
    opacity: 0;
    pointer-events: none;
}

.phishing-test-email-container {
    border-style: solid;
    border-radius: 6px;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 2rem;
    padding-bottom: 0.2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.phishing-email-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-content: center;
    height: 56px;
}

.phishing-test-email-sender-info {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-content: start;
}

.phishing-email-header-img {
    align-self: flex-end;
    background-color: #9e9e9e;
	border-radius: 50%;
	color: #fff;
	display: inline-block;
	font-size: 1.625rem;
	font-weight: 300;
	height: 2.875rem;
	line-height: 2.875rem;
	text-align: center;
	width: 2.875rem;
}

.phishing-email-header-text {
	display: inline-block;
	padding-left: .75rem;
	padding-top: 2px;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow-x: hidden;
}

.phishing-email-header-text > p {
    margin: 0px;
}

.phishing-email-from-name {
	color: #212121;
	font-weight: 500;
    line-height: 20px;
	font-family: Roboto, "Helvetica Neue", sans-serif;
	font-size: .875rem;
}

.phishing-email-from-address {
	font-weight: 400;
	line-height: 20px;
	font-family: Roboto, "Helvetica Neue", sans-serif;
	font-size: .875rem;
	letter-spacing: normal;
    margin-left: .25rem;
	opacity: .5;
}

.phishing-email-to-me {
	font-weight: 400;
	line-height: 20px;
	font-family: Roboto, "Helvetica Neue", sans-serif;
	font-size: .875rem;
	letter-spacing: normal;
	opacity: .5;
}

.phishing-test-email-time-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: 400;
	line-height: 20px;
	font-family: Roboto, "Helvetica Neue", sans-serif;
	font-size: .875rem;
	letter-spacing: normal;
	opacity: .6;
}

.phishing-email-body {
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    background-color: #f5f5f5;
}

.shared-file-email {
    background-color: white;
    margin-left: 2rem;
    margin-right: 2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.drive-button {
	clear: both;
	background-color: #4d90fe;
	border: 1px solid #3079ed;
	border-radius: 2px;
	color: #fff;
	display: inline-block;
	font-family: Roboto,Arial,Helvetica,sans-serif;
	line-height: 29px;
	min-width: 54px;
	outline: 0px;
	font-size: 12px;
	font-weight: 400;
	padding: 2px 12px;
	letter-spacing: .05em;
	text-align: center;
	text-decoration: none;
    margin-top: 0.4rem;
    cursor: pointer;
}

.shared-file-filename {
	display: inline-block;
	font-size: 21px;
	line-height: 1.45em;
	color: #448aff;
	font-weight: 300;
	margin: 8px 0;
	cursor: pointer;
	text-decoration: none;
}

#fake-hover-address {
    position: fixed;
    left: 0px;
    bottom: 0px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding-left: 0.3rem;
    padding-right: 0.4rem;
    font-size: 11px;
	line-height: 1.6em;
    border-top-right-radius: 0.25rem;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 100ms;
    transition-delay: 200ms;
    opacity: 0;
}

.show-fake {
    opacity: 1 !important;
}

.reason-popup {
    position: absolute;
    font-weight: normal;
    color: black;
    text-decoration: none;
    min-width: 250px;
    max-width: 300px;
    padding: 0.5rem;
    background-color: white;
    font-size: 16px;
    z-index: 10;
    border: 1px solid gray;
    border-radius: 4px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.rank-list-container {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.5rem;
    list-style-type: none;
}

.rank-list-container > li {
    border: solid;
    border-width: 1px;
    padding: 6px;
    border-radius: 4px;
    background-color: var(--challenge-email-color);
    cursor: pointer;
}

.correct-rank-list-position {
    color: green;
    border-color: green;
}

.incorrect-rank-list-position {
    color: red;
    border-color: red;
}

#password-options-container {
    padding: 6px;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#password-options-container > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.sorting {
    display: flex;
    justify-content: space-around;
    margin-top: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 10px;
}

.deck, .pile {
    width: 300px;
    background-color:var(--bg-color);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.deck__content, .pile__content {
    min-height: 100px;
    padding: 10px;
}

.playing-card {
    background-color:var(--bg-color);
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pile__title {
    font-weight: bold;
    margin-bottom: 10px;
}

.dragging {
    opacity: 0.5; /* Gör kortet halvgenomskinligt när det dras */
}

.pile-hover {
    background-color: var(--progress-modal-nav-color) /* Bakgrundsfärg när man drar över en hög */
}

.leader-line {
    z-index: 1030; /* Make sure lines are over header */
}

.sms-card {
    width: 280px;
    margin: 16px;
    margin-left: auto;
    margin-right: auto;
}

#smishing-challenge-container {
    min-height: 0px;
}

.hidden-email {
    display: inline-block;
    background-color: var(--challenge-email-input-color);
    width: 128px;
    height: 24px;
    vertical-align: middle;
}

.bi {
    display:inline-block;
    vertical-align:-.125em;
    fill:currentcolor;
    width:1em;
    height:1em;
}

.sticky-message {
    position: fixed;
    width: 100%;
    z-index: 9999;  
}

.weak-password {
    background-color: #f8d7da !important;
    color: #721c24 !important;          
}

.moderate-password {
    background-color: #fff3cd !important; 
    color: #856404 !important; 
}

.strong-password {
  background-color: #d4edda !important;
  color: #155724 !important;            
}

.cracking-speed-table {
    font-size: 0.8em !important;
    padding: .0rem .0rem !important;
    text-align: center !important;
    border: 2px solid #444 !important;
}

.cracking-speed-table th,
.cracking-speed-table td {
  padding: 0.25rem 0.25rem; 
}

.dotted-underline {
  text-decoration: underline dotted;
  text-decoration-thickness: 2px;
  cursor: help;
}

.progress-toggle-btn {
  transition: min-width 0.3s ease-out, width 0.3s ease-out;
  min-width: 60px;
  width: 60px;
  height: 60px;
  padding: 0;
  overflow: visible;
  background: none;
  border: none;
  position: relative;
}

.progress-circle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 12px; top: 12px; right: 12px; bottom: 12px;
  width: 36px; height: 36px;
  transition: all 0.3s ease-out;
  z-index: 2;
  opacity: 1;
}

.progress-circle {
  transform: rotate(-90deg);
  transition: all 0.3s ease-out;
}

.progress-pill-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 6px; top: 16px; right: 6px; bottom: 16px;
  width: 48px; height: 28px;
  transition: all 0.3s ease-out;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.progress-pill {
  transition: all 0.3s ease-out;
}

.progress-pill rect {
  transition: all 0.3s ease-out;
}

.progress-bg {
  stroke: #e9ecef;
  transition: all 0.3s ease-out;
}

.progress-fg {
  stroke: #0d6efd;
  transition: all 0.3s ease-out;
}

.progress-fill-bg {
  fill: #d1d5db;
  transition: all 0.3s ease-out;
}

.progress-fill-fg {
  fill: #0d6efd;
  transition: all 0.3s ease-out;
}

.progress-circle-label {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  color: #ffffff;
  z-index: 3;
  transition: all 0.3s ease-out;
}

.progress-pill-label {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: #ffffff;
  z-index: 3;
  transition: all 0.3s ease-out;
}

/* Individual Module Progress Circles */
.module-progress-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease-out;
  margin: 0 12px; /* Add custom margin for better spacing */
  border-radius: 50%;
  padding: 4px;
}

.module-progress-circle:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  background-color: rgba(13, 110, 253, 0.1);
}



.module-progress-circle:active {
  transform: scale(1.05);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.module-progress-circle.completed {
  filter: drop-shadow(0 0 4px rgba(40, 167, 69, 0.3));
}

/* Highlight effect for clicked module */
.module-progress-fg.highlight {
  stroke: #ffc107;
  stroke-width: 4;
  animation: pulse 1s ease-in-out;
}

@keyframes pulse {
  0% { stroke-width: 3.5; }
  50% { stroke-width: 5; }
  100% { stroke-width: 3.5; }
}

/* Custom spacing for progress circles container */
.progress-circles-container {
  display: flex;
  align-items: center;
  gap: 0; /* Remove gap since we're using connection lines */
}

/* Module connection lines */
.module-connection-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 24px;
}

.connection-line-bg {
  stroke: #e9ecef;
  transition: all 0.3s ease-out;
}

.connection-line-fg {
  stroke: #e9ecef;
  transition: all 0.3s ease-out;
}

.connection-line-fg.active {
  stroke: #0d6efd;
}

.connection-line-fg.completed {
  stroke: #28a745;
}

.module-progress-bg {
  stroke: #e9ecef;
  transition: all 0.3s ease-out;
}

.module-progress-fg {
  stroke: #0d6efd;
  transition: all 0.3s ease-out;
}

.module-progress-fg.completed {
  stroke: #28a745;
  animation: completedPulse 0.5s ease-out;
}

@keyframes completedPulse {
  0% { stroke-width: 3.5; }
  50% { stroke-width: 4.5; }
  100% { stroke-width: 3.5; }
}

.module-progress-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: #0d6efd;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}

.module-progress-circle:hover .module-progress-label {
  opacity: 1;
  pointer-events: auto;
}

/* Show percentage for current module */
.module-progress-circle.current-module .module-progress-label {
  opacity: 1;
  pointer-events: auto;
}

/* Highlight current module progress circle */
.module-progress-circle.current-module {
  transition: all 0.3s ease-in-out;
}

.module-progress-circle.current-module .module-progress-fg {
  stroke-width: 4;
}

.module-progress-circle.current-module .module-progress-bg {
  stroke-width: 4;
}

/* Make non-current modules smaller */
.module-progress-circle:not(.current-module) {
  transform: scale(0.45);
  transition: all 0.3s ease-in-out;
}

/* Override hover for non-current modules */
.module-progress-circle:not(.current-module):hover {
  transform: scale(1.1) !important;
}

.module-progress-circle:not(.current-module):not(:hover) {
  transform: scale(0.45) !important;
}

/* Enhanced highlight for completed current module */
.module-progress-circle.current-module.completed {
  border-color: #28a745;
}

.module-progress-label.completed {
  color: #28a745;
}

.progress-toggle-btn:hover,
.progress-toggle-btn:focus {
  min-width: 200px;
  width: 200px;
  height: 60px;
}

.progress-toggle-btn:hover .progress-circle-container,
.progress-toggle-btn:focus .progress-circle-container {
  opacity: 0;
  pointer-events: none;
}

.progress-toggle-btn:hover .progress-pill-container,
.progress-toggle-btn:focus .progress-pill-container {
  width: 120px;
  height: 24px;
  left: -30px;
  top: 18px;
  opacity: 1;
  pointer-events: auto;
}

.progress-toggle-btn:hover .progress-pill,
.progress-toggle-btn:focus .progress-pill {
  width: 180px;
  height: 24px;
}

.progress-toggle-btn:hover .progress-bg,
.progress-toggle-btn:focus .progress-bg {
  width: 176px;
  x: 2px;
}

.progress-toggle-btn:hover .progress-fg,
.progress-toggle-btn:focus .progress-fg {
  width: 176px;
  x: 2px;
}

.progress-toggle-btn:hover .progress-fill-bg,
.progress-toggle-btn:focus .progress-fill-bg {
  /* Width handled by JavaScript */
}

.progress-toggle-btn:hover .progress-fill-fg,
.progress-toggle-btn:focus .progress-fill-fg {
  /* Width handled by JavaScript */
}

.progress-toggle-btn:hover .progress-pill-label,
.progress-toggle-btn:focus .progress-pill-label {
  font-size: 0.9rem;
  transform: translateX(0);
}

/* Component list styling for progress modal dropdowns */
.component-list {
  margin-top: 10px;
}

.component-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  background-color: #f8f9fa;
  border-left: 4px solid #dee2e6;
  transition: all 0.2s ease;
}

.component-item.completed {
  background-color: #d1ecf1;
  border-left-color: #28a745;
}

.component-item.completed .component-name {
  color: #155724;
  font-weight: 500;
}

.component-item.completed .component-status {
  color: #28a745;
}

.component-item:not(.completed) {
  background-color: #f8f9fa;
  border-left-color: #6c757d;
}

.component-item:not(.completed) .component-name {
  color: #6c757d;
}

.component-item:not(.completed) .component-status {
  color: #6c757d;
}

.component-name {
  flex: 1;
  font-size: 0.9rem;
  margin-right: 10px;
}

.component-status {
  font-size: 0.8rem;
  font-weight: 500;
}

.component-icon {
  margin-right: 8px;
  font-size: 1rem;
}

.component-item.completed .component-icon {
  color: #28a745;
}

.component-item:not(.completed) .component-icon {
  color: #6c757d;
}

/* Progress modal dropdown button styling */
.progress-modal-content .btn-outline-info {
  border-color: #17a2b8;
  color: #17a2b8;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.progress-modal-content .btn-outline-info:hover {
  background-color: #17a2b8;
  border-color: #17a2b8;
  color: white;
}

.progress-modal-content .btn-outline-info:focus {
  box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

/* Card styling for component details */
.progress-modal-content .card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-modal-content .card-body {
  padding: 15px;
}

.progress-modal-content .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 10px;
}

/* Progress bar completion styling */
.progress-bar.completed {
  background-color: #28a745 !important;
  animation: progressCompleted 0.5s ease-out;
}

.progress-modal-content .progress-bar.bg-info.completed {
  background-color: #28a745 !important;
  animation: progressCompleted 0.5s ease-out;
}

@keyframes progressCompleted {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 1; }
}

/* Progress status text completion styling */
.progress-modal-content .text-info.completed {
  color: #28a745 !important;
  font-weight: 600;
}

/* Progress row completion styling */
.progress-modal-content .row {
  border-radius: 8px;
  padding: 8px;
  margin: 4px 0;
  transition: all 0.3s ease;
}

.progress-modal-content .row.completed {
  background-color: rgba(40, 167, 69, 0.05);
}

.progress-modal-content .row.completed:hover {
  background-color: rgba(40, 167, 69, 0.1);
}

/* Completion merge animation */
.progress-circles-container.completed {
  animation: mergeCircles 2s ease-in-out forwards;
}

.progress-circles-container.completed .module-progress-circle {
  animation: fadeOutCircles 1.5s ease-in-out forwards;
}

/* Use data attribute instead of nth-child for animation target */
.progress-circles-container.completed .module-progress-circle[data-animation-target="merge"] {
  animation: mergeToMiddle 2s ease-in-out forwards;
}

.progress-circles-container.completed .module-connection-line {
  animation: fadeOutLines 1s ease-in-out forwards;
}

/* Final merged circle */
.merged-completion-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: finalPulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(40, 167, 69, 0.5));
}

.merged-completion-circle svg {
  width: 64px;
  height: 64px;
  animation: scaleUp 2s ease-in-out forwards;
}

.merged-completion-circle .module-progress-bg {
  stroke: #e9ecef;
  stroke-width: 4;
  fill: none;
}

.merged-completion-circle .module-progress-fg {
  stroke: #28a745;
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 125.6;
  stroke-dashoffset: 0;
}

.merged-completion-circle .module-progress-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  color: #28a745;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}

.merged-completion-circle:hover .module-progress-label {
  opacity: 1;
  pointer-events: auto;
}

/* Show percentage for current module in merged state */
.merged-completion-circle.current-module .module-progress-label {
  opacity: 1;
  pointer-events: auto;
}

/* Animations */
@keyframes mergeCircles {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes fadeOutCircles {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

@keyframes mergeToMiddle {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1.5);
  }
}

@keyframes fadeOutLines {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes scaleUp {
  0% {
    transform: scale(0.5);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes finalPulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(40, 167, 69, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(40, 167, 69, 0.8));
  }
}

/* Completion message styling */
.completion-message {
  text-align: center;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  animation: slideInUp 0.5s ease-out;
  font-size: 0.9rem;
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced merged circle styling */
.merged-completion-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: finalPulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(40, 167, 69, 0.5));
  margin: 0 auto;
}

.merged-completion-circle svg {
  width: 48px;
  height: 48px;
  animation: scaleUp 2s ease-in-out forwards;
  filter: drop-shadow(0 0 4px rgba(40, 167, 69, 0.3));
}

.merged-completion-circle .module-progress-bg {
  stroke: #e9ecef;
  stroke-width: 4;
  fill: none;
}

.merged-completion-circle .module-progress-fg {
  stroke: #28a745;
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 125.6;
  stroke-dashoffset: 0;
  animation: drawCircle 2s ease-in-out forwards;
}

@keyframes drawCircle {
  0% {
    stroke-dashoffset: 125.6;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes glow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(40, 167, 69, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(40, 167, 69, 0.6));
  }
}

/* Modal module row highlight animation */
.modal-row-highlight {
  border: 2px solid rgba(13, 110, 253, 0.6) !important;
  box-shadow: 0 0 8px rgba(13, 110, 253, 0.3) !important;
  background-color: rgba(13, 110, 253, 0.05) !important;
  transition: all 0.3s ease;
}

/* Ensure highlight works for completed rows too */
.progress-modal-content .row.completed.modal-row-highlight {
  border: 2px solid rgba(13, 110, 253, 0.6) !important;
  box-shadow: 0 0 8px rgba(13, 110, 253, 0.3) !important;
  background-color: rgba(13, 110, 253, 0.05) !important;
}


