// gridster {
//     display: block;
//     height: 100vh;
//   }
.my-gridster {
  // background: #f0f0f0;
  background: var(--bg-page);
  border: 2px solid #ccc;
  padding: 10px;
  height: 525px; // or as needed
  overflow-y: scroll;
  overflow-x: scroll;
}

.my-gridster-item {
  // background: white;
  background-color: var(--bg-surface);

  // border: 1px solid #ddd;
  // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  // background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  justify-content: center;
  background-color: var(--bg-surface);
  margin: auto;
  padding: 0px 20px 20px 20px;
  border: 1px solid var(--border-subtle);
  height: 560px;
  width: 280px;
  border-radius: 10px;
  position: relative;
  right: 517px;
}


.dashboard-wrapper {
  display: flex;
  flex-direction: row;
  /* arrange items row-wise */
  flex-wrap: wrap;
  /* wrap to new row if space runs out */
  // gap: 10px;            /* spacing between boxes */
}

.PortletName {
  // font-size: 16px;
  // text-align: center;
  // font-size: 16px;
  // display: flex;
  color: var(--text-brandPrimary);
  // align-items: center;
  // justify-content: center;
  font-weight: bold;
  // padding: 16px 0px 0px 0px;
}

.NoPortlet {
  text-align: center;
  position: relative;
  top: 200px;
}





::ng-deep .formbuttons .material-icons {
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--action-primary-default);
}

.Emptypage {
  color: var(--text-primary);
  font-size: 14px;
  font-family: hal;
}


.CreatePage {
  color: var(--action-primary-default);
}

.addportlet {
  color: #FFFFFF;
}






.grid-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-subtle);
  width: 96px;
  height: 80px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  text-align: center;
  margin: 0px 8px 8px 8px;
}

.grid-item span {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

// .widget-header {
//   display: flex;
//   justify-content: space-between;
//   align-items: center;
//   padding: 4px 8px;
//   font-weight: 500;
//   font-size: 14px;
// }

.widget-header {
  display: flex;
  // justify-content: flex-end; /* push items to the right */
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding: 4px 8px;
  // border: 1px solid #1A1A1A99;
  background-color: var(--bg-muted);
  border-radius: 6px;
  /* optional spacing */
}

.menu-icon {
  cursor: pointer;
  font-size: 22px;
  color: #A8A8A8;
  height: 24px;
  // padding-top: 6px;
}

.Naviconcontainer {
  width: 18px;
  height: 18px;
  background-color: var(--bg-surface);
  margin-left: 220px;
  position: relative;
  bottom: 20px;
}

.Navicon {
  color: var(--button-secondary-text-default);
  width: 10px;
  height: 8px;
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  // font-size: 18px;
  position: relative;
  cursor: pointer;
  left: 3px;
  top: 0px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  // -moz-font-feature-settings: 'liga';
}

.navsidebarcontainer {
  margin: 8px 12px 12px 12px;
  height: 18px;
}

.selected-widget {
  border: 2px solid var(--border-focus);
  /* Must include border style */
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
  border-radius: 6px;
}

.menu-container {
  position: relative;
  height: 24px;
  display: flex;
}

.widget-menu {
  position: absolute;
  top: 24px;
  /* below the icon */
  right: 0;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  // border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: 150px;
}

.widget-menu-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  // color: var(--action-primary-default);
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.widget-menu-item:hover {
  background-color: var(--bg-hover);
}

::ng-deep gb-filter .filterbutton {
  width: 35px !important;
  height: 30px !important;
  border: none !important;
}









.gridster-wrapper {
  width: 100%;
  height: calc(100vh - 150px);
  overflow: auto !important;
  position: relative;
  scrollbar-gutter: stable;
  // padding-bottom: 40px !important; /* <<< Add this */
}

// ::ng-deep gridster > div {
//   padding-bottom: 40px !important;
//   background-color: red !important;  /* TEST COLOR */
// }
::ng-deep gridster.fixed.display-grid {
  padding-bottom: 50px !important;
  background-color: rgba(0, 0, 255, 0.3) !important;
}

gridster {
  min-width: 100% !important;
  min-height: 100% !important;
  background: greenyellow;
  position: relative;
  padding-bottom: 40px !important;
  /* <<< Add this */
}

gridster-item {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  padding: 8px;
  box-sizing: border-box;
}

// ADD ONLY THESE NEW STYLES FOR CURSOR FIX
::ng-deep {
  .gridster {
    min-width: 100% !important;
    min-height: 100% !important;
    position: relative;
  }

  .gridster-container {
    min-width: 100% !important;
    min-height: 100% !important;
  }

  // Fix cursor pointer for all resize handles
  .gridster-item-resizable-handler {
    z-index: 100 !important;
    background: transparent !important;
  }

  .gridster-item-resizable-handler.handle-s {
    cursor: ns-resize !important;
    height: 10px !important;
  }

  .gridster-item-resizable-handler.handle-e {
    cursor: ew-resize !important;
    width: 10px !important;
  }

  .gridster-item-resizable-handler.handle-se {
    cursor: nwse-resize !important;
  }

  .gridster-item-resizable-handler.handle-n {
    cursor: ns-resize !important;
    height: 10px !important;
  }

  .gridster-item-resizable-handler.handle-w {
    cursor: ew-resize !important;
    width: 10px !important;
  }

  .gridster-item-resizable-handler.handle-ne {
    cursor: nesw-resize !important;
  }

  .gridster-item-resizable-handler.handle-nw {
    cursor: nwse-resize !important;
  }

  .gridster-item-resizable-handler.handle-sw {
    cursor: nesw-resize !important;
  }
}

// Keep your existing styles
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lbl {
  width: 150px;
  font-weight: 600;
}

.ctl {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.resize-box {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 4px;
  font-size: 12px;
}

.resize-box select {
  padding: 4px;
  margin-left: 6px;
}

// Filter button styles
.filter-details {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  max-width: 18px !important;
  height: 18px !important;
  margin-left: auto;
  margin-right: 0px !important;
}

::ng-deep .filter-details .filterbutton:hover {
  box-shadow: none !important;
}

::ng-deep .filter-details .filterbutton {
  box-shadow: none !important;
  margin-right: 0px !important;
  margin-left: auto;
  background-color: inherit !important;
  height: 24px !important;
}

::ng-deep .filterbutton mat-icon {
  font-size: 22px !important;
}

// lightbox styles

.expand-icon {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;

  mat-icon {
    font-size: 22px;
    color: var(--button-secondary-text-default);
  }
}

.portlet-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portlet-lightbox-content {
  background: var(--bg-page);
  width: 95vw;
  height: 95vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}

.lightbox-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
}

.close-icon {
  color: var(--button-secondary-text-disabled);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
}

.close-icon:hover {
  color: var(--border-error);
}

.lightbox-body {
  flex: 1;
  padding: 12px;
  overflow: hidden;
}