.scheduler-popup{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    background-color: #fff;
    border: none;
    z-index: 9999;
    resize: none;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    border-radius: 6px;
}


.popup-container{
  display:flex;
  flex-direction: column;
}


.popup-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background-color: #c8d7f8;
    cursor: move;
    order: 1;
    user-select: none;
}

.popup-content{
  order:2;
  flex-grow: 4;
  height: 100%;
  margin:1px;
 
  border: none;
}

.popup-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px;
 
  cursor: move;
  order: 3;
}

.popup-header>.close-button {
  border: none;
  background-color: transparent;
  font-size: 24px;
  cursor: pointer;
 
}

.scheduler-popup-btn{ 
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    margin: 5px; 
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
    width: 100px;
    height: 30px;
    border: none;
    transition: 0.4s;
  
}
.scheduler-popup-btn:hover{
    background-color: #e0e0e0;
}

#popup-btn-save {
    background-color: #c8d7f8;
}
#popup-btn-save:hover {
    background-color: #a8bff0;
}

.tab {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
  }
  
 
.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 6px 14px;
    transition: 0.3s;
    font-size: 13px;
}
  
 
.tab button:hover {
    background-color: #ddd;
}
  

.tab button.active {
    background-color: #ccc;
  }
  
  
.tabcontent {
    height: 310px;
    overflow-y: auto;
    display: none;
    padding: 4px 6px;
    border-top: none;
  }
  .tabcontent.active {
    display: block;
   
  }

  .scheduler-popup .tabcontent textarea{
    width: 100%;
    height: calc(100% - 50px);
    resize: none;
    border: none;
    overflow:auto;
    overflow-wrap:unset;
    overflow-x: scroll;
    text-wrap: nowrap;
   
  }
  .scheduler-popup .tabcontent .formgroup
  {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1px 2px;
    margin: 3px 1px;
  }
  .scheduler-popup .tabcontent .formgroup-inline
  {
    gap: 6px;
  }
  .formgroup-inline > label {
    width: auto;
    flex-shrink: 0;
  }
  .formgroup-inline > .taskinput {
    width: 0;
    flex: 1;
    min-width: 0;
  }
  .formgroup>label{
    width: 18%;
    text-align: right;
    margin-right: 6px;
    color: #797979;
    font-size: 13px;
    white-space: nowrap;
  }
  .taskinput{
    margin: 0;
    padding: 4px 6px;
    width: 82%;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 3px;
  }

  /* ── Color field ─────────────────────────────────────── */
  .color-field-wrapper {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 72%;
  }
  .color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    flex-shrink: 0;
    /* checkered "transparent" pattern */
    background-color: #fff;
    background-image:
      linear-gradient(45deg, #d1d5db 25%, transparent 25%),
      linear-gradient(-45deg, #d1d5db 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #d1d5db 75%),
      linear-gradient(-45deg, transparent 75%, #d1d5db 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    transition: box-shadow 0.15s;
  }
  .color-swatch:hover { box-shadow: 0 0 0 2px #6366f1; }
  .color-swatch.has-color {
    background-image: none;
  }
  .color-field-label {
    flex: 1;
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
  }
  .color-swatch.has-color ~ .color-field-label {
    color: #334155;
    font-family: monospace;
    font-style: normal;
  }
  .color-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
  }
  .color-clear-btn:hover { color: #ef4444; }

/* ── ContextMenuPlugin ────────────────────────────────────── */
.schedula-ctx-menu {
    display: none;
    position: fixed;
    z-index: 9999;
    min-width: 180px;
    padding: 4px 0;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
/* Dark theme override */
.theme-dark .schedula-ctx-menu {
    background: #1e293b;
    border-color: #334155;
}
.theme-dark .schedula-ctx-menu .dropdown-item {
    color: #e2e8f0;
}
.theme-dark .schedula-ctx-menu .dropdown-item:hover:not(.disabled) {
    background: #334155;
    color: #f1f5f9;
}
.theme-dark .schedula-ctx-menu .dropdown-divider {
    border-color: #334155;
}