/* Fonts */
@font-face {
  font-family: 'Noto';
  src: url('/fonts/NotoSans-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Noto';
  src: url('/fonts/NotoSans-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

/* @font-face {
  font-family: 'Noto';
  src: url('/fonts/NotoSans-SemiBold.ttf') format('truetype');
  font-weight: 500;
} */

@font-face {
  font-family: 'Noto';
  src: url('/fonts/NotoSans-Light.ttf') format('truetype');
  font-weight: lighter;
  font-style: normal;
}

/* System Colors */
:root {
    --background_image :url(https://cnnect-lite.co.za/images/app-login-background.png);
    --modal_background: white;
    --button-background: #470D74;
    --button-text: white;
    --body-background: #f7f7f7;
    --font: 'Noto', sans-serif;
    --primary_color: #470D74;
    --text-color: #374151;
    --learning-background: #ede4f5;
    --notice-background: #dc9def;
    --process-background: #f6c0b8;
    --install_modal_background: white;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--body-background);
    font-family: var(--font);
}

h2, p, h3 {
    margin: 5px 0;
    padding: 0;
}

h2 {
    font-size: 22px;
}

p, a {
    font-size: 15px;
    color: var(--text-color);
}

.link {
    text-decoration: underline;
}

/* Login Form */
#login-body {
    background-image: var(--background_image);
    background-repeat: no-repeat;
    background-size: contain;
    height: 100vh;
}

.login-form-intro {
    margin: 20px 0 25px;
}

.login-logo {
    display: flex;
    justify-content: center;
    top: 40px;
    position: relative;
}

.login-form-outer {
    display: block;
    background-color: white;
    padding: 20px;
    margin-top: 90px;
    background-color: var(--body-background);
}

.form-question {
    text-align: left;
    margin-bottom: 12px;
}

input {
    width: 90%;
    padding: 12px;
    outline: 0;
    border: 1px solid rgba(105, 105, 105, 0.397);
    border-radius: 10px;
}

.action-button, .w3-btn {
    padding: 12px 30px;
    width: 70%;
    border-radius: 8px;
    border: 0;
    background-color: var(--button-background);
    color: var(--button-text);
}

.action-button:disabled, #downloadBtn:disabled, input[type="submit"]:disabled {
  background-color: #b0b0b0;
  color: #e8e8e8;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
  box-shadow: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.forgot-password-container {
    margin: 15px 0px;
}

/* Popup Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.modal-content {
  background-color: var(--modal_background);
  margin: 15% auto; 
  padding: 20px;
  width: 80%; 
  border-radius: 10px; 
  text-align: center;
  position: relative; 
  top: -100%; 
  transform: translateY(-100%); 
  transition: transform 0.5s ease-in-out;  
}  

.modal.show .modal-content {
  transform: translateY(0); 
}

.modal.shift-down .modal-content {
  top: unset;
}

.notif-modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  color: var(--button_text_color);
}

.notif-modal-content {
  background-color: var(--install_modal_background);
  margin: 15% auto;
  padding: 20px;
  width: 80%;
  max-width: 400px;
  text-align: center;
  border-radius: 8px;
}

.notif-modal-content p, p, .label_space, li, ul {
  color: #373D42;
}

.privacy-outer {
    margin-top: 20px;
    margin-bottom: 100px;
  }

#later-btn, #modal-later {
    filter: grayscale(1);
    background-color: #f0f0f0;
    border: 1px solid #f0f0f0;
    color: #373D42;
}

.notif-modal-content > button, .bttn, .w3-add-answer-button, #install, #modal-later {
    background-color: var(--primary_color);
    color: #F5F5F5;
    border: none;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    border-radius: 12px;
}

.notif-modal-content > button:hover {
  background-color: var(--primary_color_dark);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;  
  bottom: 0;
  width: 260px;
  background: #fff;
  box-shadow: 2px 0 16px rgba(0,0,0,0.15);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  overflow-x: hidden;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.sidebar a {
    text-decoration: none;
    margin: 10px 0;
}

.sidebar-inner .sb-section {
    bottom: 30px;
    position: absolute;
    width: fit-content;
}

#user-name {
    font-weight: bold;
}

.logout {
    margin-top: 30px;
}

.close {
    float: right;
    padding: 6px 12px;
    width: 15px;
}

.lock {
    width: 12px !important;
    border-radius: 0 !important;
    padding-right: 8px;
}

.close img, .open-icon img, .item-icon {
    width: 22px;
}

.open-icon {
    width: fit-content;
    padding: 0;
    margin: 0;
    border: 0;
    background-color: transparent;
}

/* Main Menu */
.menu-logo {
    width: 150px;
}

.menu-container {
    background-color: white;
    box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: 0;
  box-shadow: none;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #374151;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  transform: translateY(-7px) rotate(-45deg);
  margin-top: 6.5px;
}

.profile-avatar {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: #FE7E6A;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.5px;
}

.left {
    display: flex;
    align-items: center;
    padding: 0 11px;
}

.right {
    margin-right: 10px;
}

/* Search bar */
.search_icon{
    align-self: self-end;
    height: 20px;
    width: 20px;
    align-content: center;
    margin-bottom: 4px;
    margin-left: 15px;
    margin-right: 7px;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: #fff;
  padding: 5px;
  border: 1px solid #D9D9D9;
  border-radius: 10px;
  margin-bottom: 20px;
  margin-top: 20px;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 5px 10px;
  font-size: 16px;
  width: 100%;
}

/* Home Page */
#google_translate_element {
    padding: 0 20px;
}

.reports {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: scroll;
}

.list-outer h3, #main-content-display h3 {
    text-align: left;
    margin-top: 30px;
}

.list-outer a {
    text-decoration: none;
}

h3 {
    font-size: 17px;
}

.report-notice {
    min-width: 130px;
    margin-right: 12px;
    min-height: 100px;
    background: #4E0479;
    background: linear-gradient(90deg,rgba(78, 4, 121, 1) 0%, rgba(78, 4, 121, 1) 50%, rgba(91, 4, 141, 1) 100%);
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    margin-right: 10px;
    text-align: left;
}

.report-title {
    width: 100%;
    padding: 10px;
    color: white;
}

.notice-item {
    /* background-color: var(--learning-background); */
    /* background-image: url(../images/notice-background.png);
    background-size: 75%;
    background-repeat: no-repeat;
    background-position-x: 170%; */
}

.learning-item {
    /* background-color: var(--process-background); */
    
}

.process-item {
   /* background-color: var(--notice-background);  */
}

.items {
    display: flex;
    flex-direction: column;
}

.main_card {
    padding: 8px 0px;
    border-radius: 12px;
    background-color: #fcfeff;
    border: 1px solid #f0f0f0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    padding: 13px 0px;
    justify-content: space-between;
}

#main-content-display a {
    text-decoration: none;
}

.main_card div {
    display: flex;
    align-items: center;
}

.item-icon {
    margin: 0 10px 0 15px;
    border-radius: 7px;
}

.alert {
    border-radius: 12px;
    padding: 10px;
}

.alert-warning {
    color: #8a6d3b !important;
    background-color: #fcf8e3 !important;
    border-color: #faebcc !important;
}

.alert-success {
    color: #155724 !important;
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

.alert-primary {
    color: #004085 !important;
    background-color: #cce5ff !important;
    border-color: #b8daff !important;
}

.alert-danger {
    color: #721c24 !important;
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

.arrow-link {
    width: 15px;
    padding-right: 15px;
}

.notices-tiny {
    background: #e9b3fa;
    border-radius: 30px;
    padding: 3px 5px;
    font-size: 11px;
    font-weight: lighter;
    width: fit-content;
    margin-bottom: 6px;
}

.report-title-title {
    font-weight: bold;
    font-size: 16px; 
    color: white;
}

#report-courses, #report-processes, #report-notices, #report-dashboard {
    font-size: 12px;
    color: white;
}

.reports a, .profile-dropdown a {
    text-decoration: none;
}

/* Certificates */
.card-left-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-title {
    margin-bottom: 5px;
    font-weight: bold;
}
.card-left-inner {
    margin: 0;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
}

#spinner {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
  font-size: 18px;
  font-family: sans-serif;
  gap: 16px;
}

#spinner.active {
  display: flex;
}

.spinner-ring {
  width: 25px;
  height: 25px;
  border: 5px solid #761ac0;
  border-top-color: #ede4f5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.xp-container {
    text-align: center;
    opacity: 0; /* start hidden */
}

.xp-container.visible {
    animation: fadeIn 0.5s ease forwards;
}

.download-button-container {
    display: flex;
    justify-content: center;
}

.back-button {
    background-color: white;
    color: #373D42;
    border: none;
    padding: 10px 20px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 12px;
}

/* Leaderboard */
#leaderboard-container {
    margin-top: 20px;
}

.podium-row { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin-bottom: 2rem; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pod-avatar { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 500; color: #fff; font-size: 15px; }
.pod-name { font-size: 13px; font-weight: 500; text-align: center; max-width: 80px; word-break: break-word; }
.pod-xp { font-size: 12px; color: #888; text-align: center; }
.pod-block { display: flex; align-items: center; justify-content: center; border-radius: 6px 6px 0 0; font-size: 20px; width: 80px; font-weight: bold; color: white;}
.crown { font-size: 20px; margin-bottom: 2px; }
.rest-list { display: flex; flex-direction: column; gap: 8px; }
.rest-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; padding: 10px 14px; }
.rest-rank { font-size: 13px; font-weight: 500; color: #888; width: 24px; text-align: center; flex-shrink: 0; }
.rest-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.rest-name { flex: 1; font-size: 14px; font-weight: 500; }
.highlight-row { background: #f9f9f9 !important; border-color: #ccc !important; }
.you-tag { font-size: 11px; color: #aaa; }
.xp-pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #f1f1f1; color: #666; white-space: nowrap; }

/* XP */
.xp-container {
    background-color: #ede4f5;
    border-radius: 12px;
    margin-bottom: 10px;
}

.xp-container img {
    width: 39px;
    margin-top: -10px;
}

.xp-to-next {
    padding-bottom: 20px;
}

.learning-level-title {
    font-weight: bold;
}

.learning-level-xp {
    padding-bottom: 20px;
}

/* Render Content */
.w3-select {
    padding: 10px 15px;
    width: 100%;
    margin-top: 5px;
}

.content-container {
    background-color: #fcfeff;
    border: 1px solid #f0f0f0;
    padding: 20px;
    border-radius: 12px;
}

figure {
    margin: 0;
    padding: 0;
}

/* Render Content */
.form-question{
  margin-bottom: 5px;
  text-align: left;;
}

/* Quiz / Form Styles */

.quiz-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.quiz-dot {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: #e0e0e0;
    transition: background 0.3s;
}

.quiz-dot.active {
    background: #534AB7;
}

.quiz-dot.done {
    background: #AFA9EC;
}

/* Form card wrapper */
.label_space {
    display: block;
    margin: 10px 0;
}


/* Radio and checkbox option rows */
.form-question label:not(.label_space) {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.form-question label:hover:not(.label_space) {
    border-color: #534AB7;
    background: #EEEDFE;
}

.form-question input[type="radio"],
.form-question input[type="checkbox"] {
    accent-color: #534AB7;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Select dropdown */
.w3-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    font-size: 14px;
    background: #ffffff;
    color: #1a1a1a;
    margin-top: 8px;
}

.w3-select:focus {
    outline: none;
    border-color: #534AB7;
}

/* Textarea */
.expanding-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    font-size: 14px;
    background: #ffffff;
    color: #1a1a1a;
    min-height: 90px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.expanding-textarea:focus {
    outline: none;
    border-color: #534AB7;
}

/* Submit button */
.w3-add-answer-button, .logout, #install {
    background: #FE7E6A;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 15px 25px;
    width: fit-content;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

/* Checkbox button override (your existing .checkbox-btn class) */
.checkbox-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 14px;
    color: #1a1a1a;
}

.checkbox-btn:hover {
    border-color: #534AB7;
    background: #EEEDFE;
}

.checkbox-btn input[type="checkbox"] {
    accent-color: #534AB7;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Pagination nav row */
.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0 0.75rem;
}

.pagination-numbers {
    padding: 5px 10px;
    background-color: #eff2f5;
    border-radius: 12px;
}

/* Prev / Next buttons */
.w3-button.w3-black {
    background-color: #534AB7;
    color: white;
    border: 1px solid #534AB7;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
    width: fit-content;
}

.w3-button.w3-black:hover {
    background: #534AB7 !important;
    color: #ffffff !important;
}

/* Dot/number pagination buttons */
.w3-row.w3-center {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 0.5rem;
}

[class^="dots_"] {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ebebeb;
    background: transparent;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    padding: 0;
}

.previous-next-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ce-paragraph {
    margin-bottom: 5px;
}

/* Interactive Video */
/* === OVERLAY === */
#quizResultsModal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* === MODAL BOX === */
#quizResultsModal .modal-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* === HEADER === */
#quizResultsModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#quizResultsModal .modal-header span {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

#quizResultsModal .modal-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #6b7280;
  line-height: 1;
  padding: 0;
}

/* === SCROLLABLE CONTENT === */
#quizResultsModal .modal-body {
  overflow-y: scroll;
  padding: 0 20px 20px;
  flex: 1;
}

/* === FOOTER === */
#quizResultsModal .modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

#quizResultsModal .modal-footer button {
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.w3-display-topright {
    
}