

.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;}

.eservice-directory-block{
    width:145px!important;
    height:40px!important;
    border-radius: 5px;
    border-bottom: 2px solid grey;
    float:left;
    background-color: #ecf0f1;
    color: grey;
    margin:1%;
    padding:1%;
     text-align: center;
    display: table;
    vertical-align: middle;
    text-wrap: wrap;
    word-wrap: break-word;

}
.eservice-directory-block .item-content{
    height: 40px;
    width:145px!important;
    display: flex;
    align-items: center;
    margin: auto;
    justify-content: center;
    text-wrap: wrap;
    word-wrap: break-word;
    word-break: break-all;
}


.eservice-directory-block .tippy-menu{
    position: relative;
    left: -10px;
    top: 5px;
    cursor: pointer;
}

.eservice-directory-block .tippy-menu-items a, .eservice-directory-block .tippy-menu-items a:hover{
    text-align: left;
    width:100%;
    display: inline-block;
    padding:2px;
    text-transform: none;
    text-decoration: none;
}

/** SEARCH FACILITY */
.eservice-search-wrapper{
    margin-top:-1px;
    display: flex;  
    justify-content: center;  
    align-items: center;  
    flex-direction:row; /*default value is row*/
    width:100%;
    background-color: #f0eeeb;
    padding:5px;
    border-radius: 0 0 10px 10px;
}
.eservice-search-wrapper .eservice-search-results{
    z-index:9999999;
    display:none;
    margin-left:1px;
    margin-top:48px;
    padding:8px;
    border-radius:5px;
    background:#f0f3f7;
    color:#000000;
    position:absolute;
    border:1px solid #f0eeeb;
    box-shadow: 5px 5px #e7ecf2;
}
.eservice-search-wrapper .eservice-form-data{
    width:75%;
    margin:5px;
}
.eservice-search-wrapper .eservice-form-data .eservice-search-box{
    float: left; width: calc(100% - 120px);
    height:45px;
}
.eservice-search-wrapper .eservice-form-data .eservice-search-box .search-input{
    height:32px;
    border:1px solid #cccccc!important;
    border-radius: 10px;
     width: calc(100% - 35px);
     
}
.eservice-search-wrapper .eservice-form-data .eservice-search-box .search-input{outline: none!important;}
.eservice-search-wrapper .eservice-form-data .eservice-search-button{
    float: left; 
    height:45px;
    width: 110px!important;
}
.eservice-search-wrapper .eservice-form-data .eservice-search-button button{
    border-radius: 10px;
    border:0px solid #cccccc!important;
    height:45px!important;
    background: #bdab89;
    outline: none;
    cursor: pointer;
    color: #FFF;text-align: left;
    font-size: 100%;
    width:110px;
    padding:0 10px;
}
.eservice-search-wrapper .eservice-form-data .eservice-search-button button .eservice-search-icon:before{
    
    content: "\2315";
    float:right;
    color:#ffffff;
    font-size:30px;
}

.eservice-audio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.eservice-audio-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

@media screen and (max-width: 1024px) {
    .eservice-audio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .eservice-audio-grid {
        grid-template-columns: 1fr;
    }
}

.eservice-audio-brand {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.eservice-audio-name {
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
}

.eservice-audio-frequency {
    color: #777;
    margin: 8px 0 15px;
}

.eservice-audio-controls button {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eservice-play-btn {
    background: #3fbf4c;
    color: white;
}

.eservice-pause-btn {
    background: #e03d3d;
    color: white;
}

.eservice-hidden-player {
    display: none;
}
.eservice-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #e60000;
}

.eservice-live-dot {
    width: 10px;
    height: 10px;
    background: #e60000;
    border-radius: 50%;
    opacity: 1;
    transform: scale(0.8);
    animation: none; /* important */
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.6; }
}

.eservice-volume-slider {
    width: 80%;
    height: 4px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    border: none;
}

.eservice-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: #474747; /* active color */
    border-radius: 5px;
}

.eservice-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border: 3px solid #474747;
    border-radius: 50%;
    margin-top: -5px;
}

.eservice-volume-slider::-moz-range-track {
    height: 4px;
    background: #ffffff;
    border-radius: 5px;
}

.eservice-volume-slider::-moz-range-progress {
    height: 4px;
    background: #ffffff;
    border-radius: 5px;
}

.eservice-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ffffff;
    border: 8px solid #ffffff;
    border-radius: 50%;
}

.eservice-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-top: 10px;
}

@media screen and (max-width: 600px) {
    .eservice-volume-wrapper {
        display: none;
    }
}

.eservice-volume-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10px;
}

.eservice-audio-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.eservice-audio-card.is-playing {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.25);
    border: 1px solid rgba(40, 167, 69, 0.4);
    animation: pulseCard 1.5s infinite;
}

@keyframes pulseCard {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.eservice-audio-card.is-playing .eservice-live-dot {
    animation: pulse 0.8s infinite;
    background: #e03d3d;
}

.eservice-audio-card.is-playing .eservice-live-dot {
    animation: pulse 1s infinite;
    opacity: 1;
}

.eservice-document-verification-wrap {
    max-width: 720px;
    margin: 60px auto;
    padding: 20px;
}

.eservice-document-verification-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.eservice-document-verification-header {
    text-align: center;
    margin-bottom: 20px;
}

.eservice-document-verification-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.eservice-document-verification-ok {
    background: #e7f8ee;
    color: #16794c;
}

.eservice-document-verification-bad {
    background: #fde8e8;
    color: #b42318;
}

.eservice-document-verification-warn {
    background: #fff7e6;
    color: #b26a00;
}

.eservice-document-verification-title {
    font-size: 22px;
    font-weight: 700;
    margin-top: 12px;
}

.eservice-document-verification-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.eservice-document-verification-item {
    background: #f9fafb;
    padding: 14px;
    border-radius: 10px;
}

.eservice-document-verification-label {
    font-size: 12px;
    color: #6b7280;
}

.eservice-document-verification-value {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.eservice-document-verification-footer {
    margin-top: 25px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.eservice-document-verification-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.eservice-document-verification-success-icon { color: #16a34a; }
.eservice-document-verification-fail-icon { color: #dc2626; }
.eservice-document-verification-warn-icon { color: #d97706; }

@media(max-width: 600px){
    .eservice-document-verification-grid { grid-template-columns: 1fr; }
}