@tailwind base;

@tailwind components;

@tailwind utilities;

.grid {
  display: grid;
  grid-template-columns: repeat(5, 54px); /* Increase cell width */
  grid-gap: 3px; /* Add space between cells */
  padding: 5px; /* Padding around the grid */
  justify-content: center; /* Center the grid */
}

.grid input {
  width: 56px; /* Increase cell width */
  height: 56px; /* Increase cell height */
  font-size: 15px; /* Make text larger */
  text-align: center;
  margin-bottom: 0px;
}

.grid input:disabled {
  background-color:  #dde0e5eb;
  color: black;
  cursor: not-allowed;
}


.grid input.error {
  border: 2px solid red;
  background-color: #ffdddd;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.live-cell {
  background-color: #0284C7;
}

.dead-cell {
  background-color: #f77b72;
}

.bg-custom {
  background: url('/logo/login.jpg') no-repeat center center;
  background-size: cover;
}

.dashboard-custom {
  background: url('/logo/dashboard.jpg') no-repeat center center;
  background-size: cover;
}

.login-block {
  background-color: #4da8d7;
}

.login-block-button {
  background-color: #99cde8;
}

.ag-input-field-input {
  padding: 1px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}
.modal-content {
  margin: 0 auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
}
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #bbb;
}


.image-wrapper {
  position: relative;
  display: inline-block;
  width: 96px;  /* Tailwind's w-24 */
  height: 96px; /* Tailwind's h-24 */
  margin: 5px;
  text-align: center;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.preview-image:hover {
  opacity: 0.75;
}

.delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background-color: #dc2626;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.2s ease;
}

.image-wrapper:hover .delete-btn {
  opacity: 1;
}

.delete-btn:hover {
  background-color: #b91c1c; /* Darker red on hover */
}


.zoom-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zoom-controls button {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 10px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 5px;
  width: 40px;
  text-align: center;
  transition: background 0.3s;
}


.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

.image-url-preview {
  margin-top: 10px;
  padding: 4px;
  background-color: #f0f0f0;
  border-radius: 5px;
  text-align: center;
}

.image-url-text {
  font-size: 12px;
  color: #333;
  word-wrap: break-word;
  display: block;
}


.ag-input-wrapper::before {
  display: none !important;
}


.live-annotation .a9s-inner {
  stroke: green !important;
  stroke-width: 4px !important;
}
.dead-annotation .a9s-inner {
  stroke: red !important;
  stroke-width: 4px !important;
}
.default-annotation-color .a9s-inner {
  stroke: blue !important;
  stroke-width: 4px !important;
}

/* Also ensure outlines are styled consistently if desired */
.live-annotation .a9s-outline {
  stroke: green !important;
}
.dead-annotation .a9s-outline {
  stroke: red !important;
}
.default-annotation-color .a9s-outline {
  stroke: blue !important;
}

/* Default fallback */
.default-annotation-color {
stroke: #999;
stroke-width: 2;
fill: rgba(255, 255, 255, 0.2);
}

/* For live cells */
.live-annotation {
stroke: green;
stroke-width: 2;
fill: rgba(0, 255, 0, 0.15);
}

/* For dead cells */
.dead-annotation {
stroke: red;
stroke-width: 2;
fill: rgba(255, 0, 0, 0.15);
}

.a9s-toolbar {
display: flex;
flex-direction: column; /* vertical layout */
gap: 6px; /* or center, based on your layout */
}

.a9s-toolbar .a9s-tool {
margin: 0; /* remove default spacing if any */.ag-cell {
overflow: visible !important;
position: relative !important;
z-index: 1;
}
}

.openseadragon-container .openseadragon-controls {
display: flex !important;
flex-direction: column !important;
gap: 8px;
top: 10px !important;  /* optional tweak */
left: 10px !important; /* optional tweak */
}

   .openseadragon-container >  div > div > div {
          display: flex !important;            
          flex-direction: column !important;   
          align-items: flex-start !important;  
          
          /* top: 0px !important;
          left: 0px !important;
          right: unset !important;
          bottom: unset !important; */

          gap: 5px !important; /* Space between buttons */
      }

      #image-modal .modal-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* Optional: set a max size for modal */
        max-width: 90vw;
        max-height: 90vh;
        background: #fff;
        padding: 16px;
        border-radius: 8px;
    }
    
    #modal-image {
        max-width: 80vw;
        max-height: 80vh;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        /* Remove any default transform! */
        transform: scale(1);
        transition: transform 0.2s;
        box-shadow: 0 2px 24px rgba(0,0,0,0.18);
        background: #f8f8f8;
    }
    

    #image-modal .modal-content {
      overflow: auto;
  }