#kanban-root {
    /* Some themes/plugins inject layout rules that can cause siblings to sit side-by-side on mobile.
       Force normal block flow so the Activity Log stays UNDER the board on every device. */
    display: block !important;
    padding: 20px;
    overflow-x: hidden;
}

/* ---------------- BOARD LAYOUT ---------------- */

#kanban-board {
	background: #bdbbbb;
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
    overflow-x: auto;
    padding: 10px 0 20px;
}




/*
.kanban-column {
    width: 280px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 16px;
    flex-shrink: 0;
}
*/

/* ---------------- COLUMNS ---------------- */

.kanban-column {
    background: #d9d4d4;
    border-radius: 12px;
    padding: 12px;
    min-width: 260px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
}

.kanban-column h3 {
    margin: 0 0 10px;
    font-size: 18px;
}



/*
.kanban-cards { min-height: 120px; }

.kanban-card {
    background: #fff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
}
*/


/* ---------------- CARDS ---------------- */

.kanban-cards {
    min-height: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Drag placeholder */
.kanban-placeholder {
    height: 40px;
    background: #e0e0e0;
    border-radius: 6px;
}


/* ---------------- ADD BUTTON ---------------- */

.kanban-add {
    margin-top: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: #444;
}



/* ---------------- SIDEBAR ---------------- */
#kanban-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 480px;
    height: 100%;
    background: #fff;
    z-index: 99999;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-body{
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

#sidebar-title { flex: 1; font-size: 18px; }

/* Icon buttons (Delete + Close) */
.sidebar-icon-btn{
  border: 0;
  background: transparent;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-icon-btn:hover{
  background: #f2f2f2;
}
.sidebar-icon-btn svg{ display:block; }

/* Keep the bin visually separated from the close button */
#sidebar-delete{ margin-left: 6px; }
#sidebar-close{ margin-left: 2px; 
 width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;      /* makes the X bigger */
  line-height: 1;
  font-weight: 700;

  /*background: #111827; */ /* dark background */
  background:	#5174e8;
  color: #ffffff;       /* X color */
  border-radius: 10px;  /* rounded */
  cursor: pointer;

  /* optional: make it feel clickable */
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
#sidebar-close:hover {
  opacity: 0.9;
}
#sidebar-delete svg{ stroke: #2840c6; }

/* Space the bin away from close button a bit */
#sidebar-delete{ margin-right: 10px; }

/* Scrollable body, buttons stick at bottom */
.sidebar-body{
  flex: 1 1 auto;
  overflow-y: auto;
}

#sidebar-desc {
    min-height: 260px;
    margin-bottom: 12px;
}

#sidebar-files .file {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f5f5f5;
    padding: 6px;
    border-radius: 6px;
}

#sidebar-files img {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.kanban-sidebar-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
    background: #fff;
}

.kanban-btn{
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.kanban-btn.ok{
  background: #2271b1; /* WP admin blue */
  color: #fff;
}

.kanban-btn.cancel{
  background: #e5e5e5;
  color: #222;
}

#kanban-sidebar.open {
    right: 0;
}

#sidebar-files .remove {
    cursor: pointer;
    color: red;
}


/* ---------------- ACTIVITY LOG ---------------- */


/* Activity log (below the board) */
.kanban-activity {
  width: 100%;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 10px;
  max-height: 190px; /* ~5 rows */
  overflow-y: auto;
}

.kanban-activity-title{
  margin: 6px 0 10px;
  font-weight: 700;
  font-size: 28px;
  display: block;
  width: 100%;
}

.kanban-activity-wrap{
  width: 100%;
  max-width: 100%;
  display: block;
}

/* --- FIX: card title wrapping --- */
.kanban-card{
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

/* --- Activity log: ensure one row per line --- */
.kanban-activity .log-row{
  display: flex;
  gap: 8px;
  padding: 4px 6px;
  border-bottom: 1px solid #e9e9e9;
  white-space: normal;
}
.kanban-activity .log-time{
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  opacity: 0.85;
}
.kanban-activity .log-msg{
  flex: 1 1 auto;
  font-size: 13px;
}

/* Mobile: stack time + message vertically so the list stays under the title */
@media (max-width: 600px){
  .kanban-activity .log-row{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Add a bit more spacing between attachments preview and the +Add button */
#sidebar-files{
  margin-bottom: 12px;
}
#sidebar-add-attachment{
  /*margin-top: 18px;*/
	margin-top: 14px;   /* pushes it down away from preview list */
}

/* --- Sidebar mobile/tablet --- */
@media (max-width: 900px){
  #kanban-sidebar{
    width: 100% !important;
    max-width: 100% !important;
    right: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    border-left: none !important;
  }
  #kanban-board{
    padding-right: 0 !important;
  }
}

/* --- Mobile / tablet sidebar --- */
@media (max-width: 900px){
  #kanban-sidebar{
    width: 92vw;
    max-width: 92vw;
    right: 4vw;
    left: 4vw;
    top: 8vh;
    bottom: auto;
    height: 84vh;
    overflow-y: auto;
  }
  #kanban-board{
    padding-right: 0;
  }
}



/* each attachment row */
.sidebar-file {
  display: flex;
  align-items: center;
  gap: 10px;              /* general spacing */
  padding: 8px 10px;
  border-radius: 12px;
  background: #f3f4f6;
}

/* thumbnail gap from Open (extra space) */
.sidebar-file-thumb,
.sidebar-file-generic {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  margin-right: 6px;      /* extra gap before Open */
}

/* Open button styling */
.sidebar-file-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;

  background: #2563eb;    /* blue */
  color: #fff !important;
  text-decoration: none !important;

  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

/* push remove X to the far right */
.sidebar-file-remove {
  margin-left: auto;      /* <-- this moves it to the right side */
}

/* Remove X button styling */
.sidebar-file-remove {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #ef4444;    /* red */
  color: #fff;

  border-radius: 10px;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}

/* optional hover effects */
.sidebar-file-open:hover { opacity: 0.9; }
.sidebar-file-remove:hover { opacity: 0.9; }

