.ctx_author_dashboard{
  min-height: 100vh;
}

/* ---------- Global elements ---------- */

hr{
  border: none;
  border-top: 1px solid #c7c7c7;
  margin-top:10px;
  margin-bottom:10px;
}

th, td {
  padding: 4px 8px;
}

/* The Modal (background) */
.ctxmodal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 99999; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.ctxmodal-content {
  background-color: #fefefe;
  margin: 6% auto; /* 6% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  border-radius: 5px;
  width: 80%; /* Could be more or less, depending on screen size */
}

/* The Close Button */
.ctxmodal_close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.ctxmodal_close:hover,
.ctxmodal_close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* ---------- Layout ---------- */

.col-md-12 {
  border-top-left-radius: 8px;
  padding: 15px;
}

.ctxa_flex {
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0;
}

.ctxa_flex_right{
  margin-left: auto;
  order: 2;
}

.ctxdg_float_right{ float:right;
padding-top:10px }
.ctxdg_float_left{ float:left; }
.ctxdg_clear_both{ clear:both; }

/* ---------- Headings / text ---------- */

.ctxa_page_heading{
  font-weight: var(--font-h1-weight);
    font-size: var(--font-h1-size);
    font-family: var(--font-h1-family);
    line-height: var(--font-h1-line-height);
  margin-top:-2px;
  padding-left: 5px;
}

.ctxa_logo{
  width:32px;
}

.ctxa_author{
  padding:5px;
  padding-top:12px;
}

.ctxa_date{
  padding:5px;
  padding-top:12px;
}

/* ---------- Search ---------- */

#ctxa_search_box{
  margin-bottom: 10px;
  border: 2px solid #dde1e5;
  border-radius: 4px;
  min-width:300px;
}

.ctxa_search_box {
  position: relative;
  max-width: 300px;
}

.ctxdg_search_box {
  width: 100%;
  padding: 6px 16px 6px 44px;
  border-radius: 6px;
  border: 1px solid #999;
  background-color: #fff;
  outline: none;
  margin-bottom:0!important;
}

.ctxdg_search_box:focus {
  border-color: #666;
}

.ctxa_search_box::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.6;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E");
}

.ctxa_search_box::before {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #666;
  pointer-events: none;
}

/* ---------- Menu ---------- */

.ctxdg_menu_item {
  display: flex;
  align-items: center;
  color:black;
}

.ctxdg_menu_item>img {
  width: 32px;
  height: 32px;
  margin-right: 16px;
  border-radius: 3px;
}

.ctxdg_menu_heading { font-weight:500; }
.ctxdg_menu_desc { font-size: 12px; }

.ctxa_menu_item {
  min-width: 333px;
  background: white;
  border: 1px solid #dde1e5;
  border-radius: 5px;
  height:45px;
}

.ctxa_menu_item:hover {
  border: 1px solid black;
}

.ctxa_menu_item>a {
  text-decoration: none;
}

.ctxa_menu_item_vert{
  margin-top:8px;
  width:280px;
}

/* ---------- Folder / category ---------- */

.ctxdg_folder_item {
  display: flex;
  align-items: center;
}

.ctxdg_current_folder {
  display: flex;
  align-items: center;
  color:black;
}

.ctxdg_folder_desc,
.ctxdg_folder_desc_selected {
  padding: 8px 16px;
}

.ctxdg_folder_desc { color:black; }
.ctxdg_folder_desc_selected { color:white; }
.ctxdg_folder_desc:hover { color:white; }

.ctxa_cat_folder {
  margin: 4px;
  border-radius: 20px;
}

.ctxa_cat_folder_back {
  font-weight: bold;
  font-size: large;
}

.ctxa_cat_folder_selected {
  background-color: var(--color-state);
  color:white;
}

.ctxa_cat_folder:hover {
  box-shadow: none;
    background-color: var(--color-state);

}

.ctxa_cat_folder>a {
  text-decoration: none;
}

.ctxa_folder_item>h4 {
  font-size: 12px;
}

.ctxdg_folder_picker{
  width:max-content;
  white-space: nowrap;  
}

/* ---------- Catalogue items ---------- */

.ctxdg_aicatalogue_item {
  height: 100%;
  justify-self: stretch;
  display: flex;
  align-items: center;
  border: 1px solid #dde1e5;
  border-radius: 5px;
  padding: 5px;
}

.ctxdg_aicatalogue_item>h4 {
  color: whitesmoke;
}

.ctxdg_ci_img_container {
  margin: 4px;
}

.ctxdg_ci_img_container>img {
  width: 215px;
  height: auto;
  object-fit: cover;
  border: 1px solid #dde1e5;
  border-radius: 5px;
}

/* compact card variant */

.ctxdg_aicatalogue_item_1 {
  height: 100%;
  align-items: center;
  border-radius:8px;
  width:298px;
  background-color: white;
}

.ctxdg_aicatalogue_item_1:hover{
  z-index: 1;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.15);
}

.ctxdg_ci_img_container_1{
  margin:4px;
  padding-top:4px;
  position:relative;
}

.ctxdg_ci_img_container_1>img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-right: 16px;
  border: 1px solid #dde1e5;
  border-radius: 8px;
}

/* ---------- Modules ---------- */

.ctxa_cat_module {
  min-width: 300px;
  margin: 4px;
  padding: 8px 0 8px 0;
  flex: 0 0 100%;
}

.ctxa_cat_module_1 {
  flex: 0 0 0;
  flex-basis: content;
  margin-left: 0;
  padding-left: 5px;
  padding-bottom: 30px;
}

.ctxdg_ci_img_container_1 > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}


.ctxa_module_heading,
.ctxa_module_heading_1{
  font-weight: 600;
  font-size: 14px;
  color: white;
  position: absolute;
  top:50%;
  left: 45%;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: pointer;
  user-select: none;
}


.ctxa_module_heading_open{
  font-style: italic;
}

.ctxa_module_heading_1{
  text-overflow: ellipsis;
  overflow: hidden; 
  white-space: nowrap;
  width:100%;
  text-align: center;
}

.ctxa_module_details{
  display:none;
}

/* ---------- Buttons ---------- */

.ctxdg_button_bar,
.ctxdg_button_bar_1 {
  margin: 8px;
  text-align: right;
}

.ctxdg_button_bar>a {
  margin-right: 8px;
  margin-top: 8px;
}

.ctxdg_button_bar_1 {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 4px;
}

.ctxa_button{
  color:var(--color-state);
  border: 1px solid var(--color-state);
  font-weight: normal;
  background-color: white;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  margin-right:8px;
}

#ctxModal_confirm_action_close {
    background-color: var(--color-state);
    color: white;
}

#ctxModal_confirm_action_cancel {
    background-color: #ffffff;
    color: var(--color-state);
    border-color: var(--color-state);
    border: var(--btn-border-width) solid;
}


.ctxa_button:hover,
.ctx_mini_button:hover{
  border-color: var(--color-state);
  color:white;
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-hover);
  background: var(--color-state);
}



.ctx_mini_button>a{
  color:black;
}

.ctx_mini_button>a:hover{
  text-decoration: none;
}

/* ---------- Context menu ---------- */

.ctxdg_context_ctrl{
    padding: 10px;
    border: var(--btn-border-width) solid;
    border-color: var(--color-state);
    border-radius: var(--btn-radius);
}

.ctxdg_context_menu{
  display:none;
  border: 1px solid #dde1e5;
  color:var(--color-state);
  border-radius: 4px;
  background: white;
  padding:6px;
  position: fixed;
  margin-left: 8px;
  min-width: 240px;
  z-index: 99999; 
  box-shadow: 0 4px 8px rgba(0,0,0,.2), 0 6px 20px rgba(0,0,0,.19);
  backdrop-filter: blur(6px);
}

.ctx_mini_button {
  border-radius: 4px;
  border: 1px solid var(--color-state);
  background: #ffffff;
  padding: 6px 10px;
  font-size: 14px;
  color:var(--color-state);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.15s ease;
}

.ctxdg_cm_show{
  display:block;
}

.ctxa_context_item {
    color: #111827;
    text-align: left;
    text-wrap: nowrap;
    transition: background 0.12s ease, transform 0.05s ease;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.ctxa_context_item>a {
  text-decoration: none;
  font-size: 20px;
}

.ctxa_context_item:hover {
  background: #f3f4f6;
  transform: translateX(2px);
}


.ctxdg_context_break {
  border: none;
  height: 1px;
  margin: 6px 4px;
  background: #f0f2f5;
}



/* ---------- Modals ---------- */

.ctxdg_context_modal,
.ctxdg_version_modal{
  display: none; 
  position: fixed; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%;   
}

#ctxModal_create_course_fullname, #ctxModal_create_course_shortname {
  width:stretch;
}

.ctxdg_context_modal{ z-index: 99998; }

.ctxdg_version_modal{
  z-index: 99996; 
  background-color:rgba(0,0,0,0.4);
  overflow: hidden;
}

.ctxmodal-content {
  background-color: #fefefe;
  margin: 8% auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 5px;
}

#ctxModal_move_module_content,
#ctxModal_confirm_action_content,
#ctxModal_create_folder_content,
#ctxModal_rename_folder_content,
#ctxModal_move_folder_content{
  width:fit-content;
}

#ctxModal_create_course_content {
width: 25%;
}

#ctxModal_create_course_coursename{
  width:90%;
}

#ctxModal_rename_folder_newname,
#ctxModal_create_folder_newname {
  width:95%;
}
/* ---------- Version block ---------- */

.ctxa_version_block{
  display:none;
  flex-direction: column;
  align-items: center;
  width:max-content;
  background-color: whitesmoke;
  position:fixed;
  top:10vh;  
  z-index: 99998; 
  border: 1px solid #dde1e5;
  border-radius:5px;
  max-height: 80vh;
  overflow: scroll;
  padding:8px;
}

.ctxdg_ci_img, .ctxdg_ci_img_container_1>img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-right: 16px;
  border: 1px solid #dde1e5;
  border-radius: 8px;
}

/* ---------- Testing ---------- */

.ctxdg_folder_picker {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 8px 36px 8px 12px;
  border-radius: 10px;
  border: 1px solid #e3e6ea;
  background: #ffffff;
  font-size: 14px;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: all 0.15s ease;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.ctxdg_folder_picker:hover {
  border-color: #cfd6dd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ctxdg_folder_picker:focus {
  outline: none;
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}











