

.eservice-navigation-module-box {
    display: flex;
    align-items: center;     /* vertical centering */
    justify-content: center; /* horizontal centering */
    height: 45px;           /* full height of viewport */
    width: 145px;
    padding: 5px;
    box-sizing: border-box;
    white-space: normal;     /* allows wrapping if used in textarea or multiline input */
    word-wrap: break-word;   /* ensures word wrapping */
    text-align: center;
}
.eservice-navigation-workflow-box{
    display: flex;
    align-items: center;     /* vertical centering */
    justify-content: center; /* horizontal centering */
   height: 75px;           /* full height of viewport */
    width: 280px;
    padding: 5px;
    box-sizing: border-box;
    white-space: normal;     /* allows wrapping if used in textarea or multiline input */
    word-wrap: break-word;   /* ensures word wrapping */
    text-align: center;
}
.eservice-add-field-box:hover{
    background-color:#ccc;
}
    
.eservice-formula-builder-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 8px;
    background: #f2f2f2;
    border: 1px dashed #bbb;
    margin-top: 5px;
    position: relative;
}

.eservice-formula-builder-preview:empty::before {
    content: "No formula defined. Start building your formula.";
    color: #888;
    font-style: italic;
    font-size: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: pre-line;
    pointer-events: none;
}

.eservice-formula-token {
    display: flex;
    align-items: center;
    background: #d9f3ff;
    border: 1px solid #90caf9;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    position: relative;
}

.eservice-token-label {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    background-color: #f2f2f2;
    color: #333;
    font-weight: 500;
    font-size: 18px;
    border-radius: 6px;
    border: 1px solid #ccc;
    cursor: default;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
}

.eservice-token-label:hover {
    background-color: #e6e6e6;
}

.eservice-operator-token {
    background: #fff3cd;
    border-color: #ffecb5;
}

.eservice-remove-token {
    margin-left: 8px;
    color: #c00;
    cursor: pointer;
    font-weight: bold;
    font-size: 28px;
}

.eservice-operator-button {
    display: inline-block;
    background: #e0e0e0;
    border: 1px solid #ccc;
    padding: 5px 12px;
    margin: 3px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.eservice-operator-button:hover {
    background: #d0d0d0;
}

.eservice-formula-result-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px;
    background: #f2f2f2;
    border: 1px dashed #bbb;
    margin-top: 5px;
}

.applications-revenue{
    background: #DDDDDD;
    padding:5px;
    color: #E53B2D;
    font-weight: bolder;
    padding:5px;
    position:absolute;
    margin-top:-28px;
}

/* Toolbar */
.eservice-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1px;              /* more spacing between buttons */
  align-items: center;
  justify-content: flex-start;

  position: sticky;
  top: 0;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  background: #e9ecef; 
  border: 2px solid #b0b0b0;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
  box-sizing: border-box; 
  z-index: 100;
}

.eservice-content-wrapper {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
    position: relative;
    flex-wrap: nowrap;
}

.eservice-transaction-fields {
    width: clamp(250px, 30%, 400px); /* slightly wider min width */
    height: 100%;
    max-height: 1123px; /* match canvas height */
    overflow-y: auto;  /* scroll if fields overflow */
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* top align content */
}

.eservice-a4canvas {
    width: 210mm;
    height: 297mm;
    flex-shrink: 0;
    position: relative;

    background: #ffffff;
    background-size: cover;
    border: 2px solid #d1d5db;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;

    margin: 0 auto;
    padding: 0;
}

.eservice-canvas-text {
  position: absolute;
  bottom: 10px;    
  right: 10px;  
  font-size: 10px;
  font-family: inherit;
  font-style: italic;
  color: #333;
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
  text-align: right;
  white-space: nowrap; 
}

.eservice-canvas-text-left {
  position: absolute;
  top: 50%;     
  left: 14px;     
  transform: rotate(-90deg) translateY(-50%);  
  transform-origin: left top; 
  
  font-size: 10px;
  font-family: inherit;
  color: #333;
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}


.eservice-active-canvas {
    border: 2px solid #f5e1d3; /* Soft orange */
    transition: border 0.2s ease, box-shadow 0.2s ease;
}


/* Draggable Elements */
.eservice-draggable {
  position: absolute;
  cursor: grab;
  padding: 6px 12px;

  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.eservice-draggable:active {
  cursor: grabbing;
}

.eservice-draggable.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* When hovering a contenteditable cell, show text cursor */
.eservice-draggable td[contenteditable="true"] {
  cursor: text;
}

.eservice-draggable div[contenteditable] * {
    all: unset;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    color: inherit;
    white-space: inherit;
}

/* Resizable Handles */
.eservice-resize-handle {
  display: none;
  position: absolute;
  width: 12px;
  height: 12px;
  background: #3b82f6;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Show only when parent is active */
.active-element .eservice-resize-handle {
  display: block;
}

/* Positioning */
.eservice-resize-handle.br { bottom: -6px; right: -6px; cursor: se-resize; }
.eservice-resize-handle.bl { bottom: -6px; left: -6px; cursor: sw-resize; }
.eservice-resize-handle.tr { top: -6px; right: -6px; cursor: ne-resize; }
.eservice-resize-handle.tl { top: -6px; left: -6px; cursor: nw-resize; }


/* Lines & Shapes */
.eservice-line {
  height: 2px;
  background: #374151;
}
.eservice-connector-line {
  position: absolute;
  height: 2px;
  background: #ef4444;
  transform-origin: 0 0;
}
.eservice-shape {
  border: 1px solid #d1d5db;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}

/* Images */
.eservice-image-box {
  max-width: 240px;
  max-height: 240px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

/* Tables */
.eservice-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

.eservice-table td,
.eservice-table th {
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
}


/* Controls with custom class */
.eservice-button, 
.eservice-color, 
.eservice-file, 
.eservice-select, 
.eservice-number {
  margin: 3px;
  padding: 10px 16px;  
  border-radius: 10px;  
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 1.1rem;     
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover states */
.eservice-button:hover, 
.eservice-select:hover, 
.eservice-color:hover, 
.eservice-number:hover {
  border-color: #f07726;
  box-shadow: 0 0 0 3px rgba(240, 119, 38, 0.3);
}

/* Active / pressed states */
.eservice-button:active, 
.eservice-select:active {
  transform: scale(0.97);  
}

/* Rotate Handle */
.eservice-rotate-handle {
  display: none;
  position: absolute;
  right: -20px;
  top: -20px;
  width: 18px;
  height: 18px;
  background: orange;
  border-radius: 50%;
  cursor: grab;
  font-size: 10px;
  color: white;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Show only when the parent has .active-element */
.active-element .eservice-rotate-handle {
  display: flex;
}

#a4canvas.exporting .eservice-resize-handle,
#a4canvas.exporting .eservice-rotate-handle {
    display: none !important;
}

.eservice-static {
  position: relative;  /* keeps structure */
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  cursor: default;
}

.eservice-draggable b,
.eservice-draggable strong {
    font-weight: bold !important;
}

.eservice-draggable i,
.eservice-draggable em {
    font-style: italic !important;
}

.eservice-doc-frame {
  width: 90%;
  max-width: 1000px;
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.eservice-doc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #404141, #2e2e2e);
  color: #fff;
  padding: 12px 16px;
  font-size: 16px;
}

.eservice-doc-toolbar .eservice-doc-actions button {
  margin-left: 10px;
  background: #ffffff22;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
}

.eservice-doc-toolbar .eservice-doc-actions button:hover {
  background: #ffffff44;
}

.eservice-doc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eservice-doc-actions button {
  background: #404141;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  transition: background 0.2s ease;
}

.eservice-doc-actions button:hover {
  background: #2d2d2d;
}

.eservice-doc-actions .action-icon {
  height: 14px;
  width: 14px;
  margin-right: 6px;
}

.eservice-zoom-controls {
  display: flex;
  align-items: center;
  background: #404141;
  border-radius: 6px;
  gap: 0;
  overflow: hidden;
}

.eservice-zoom-controls button {
  background: #e5e7eb;
  border: none;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.eservice-zoom-controls button:hover {
  background: #d1d5db;
}

#eservice-zoom-level {
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
}

.eservice-page-indicator {
    background: #404141; 
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-left: 12px;
    min-width: 60px; 
    text-align: center;    
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    user-select: none;        
    transition: background 0.2s;
}



.bigger-radio input[type="radio"]{width:20px;height:20px;}