/* Applies to all elements in the project */
* {
       /* Firefox */
       scrollbar-width: thin;
       /* auto | thin | none */
       scrollbar-color: #888 #f1f1f1;
       /* thumb | track */
}

/* WebKit browsers (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
       width: 8px;
       /* vertical scrollbar width */
       height: 8px;
       /* horizontal scrollbar height */
}

*::-webkit-scrollbar-track {
       background: #f1f1f1;
       /* track color */
}

*::-webkit-scrollbar-thumb {
       background-color: #888;
       /* scrollbar thumb */
       border-radius: 4px;
       border: 2px solid #f1f1f1;
       /* space around thumb */
}

*::-webkit-scrollbar-thumb:hover {
       background-color: #555;
       /* hover color */
}

.hidden {
       display: none !important;
 }

 .login-content {
        visibility: hidden;
 }

 .js-loaded .login-content {
        visibility: visible;
 }

 .nav-link {
       cursor: pointer;
 }

 .paybill-alert.center-screen {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
    z-index: 99999;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 400px;
}

.signing_up {
      max-height: 50vh;
      height:50vh;
      overflow-y: auto;
      padding: 1rem;
}


.paybill-alert.permanent {
    animation: none;
    backdrop-filter: blur(5px);
}

.paybill-alert-overlay {
       position: fixed;
       top: 0;
       left: 0;
       right: 0;
       bottom: 0;
       background: rgba(0, 0, 0, 0.5);
       z-index: 99998;
       cursor: pointer;
}

.paybill-alert.permanent::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}


.paybill-alert {
       position: fixed;
       min-width: 300px;
       max-width: 400px;
       padding: 15px;
       border-radius: 4px;
       box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
       z-index: 99999;
}
.highlight-field {
       border-color: #ffc107 !important;
       box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}
.alert-content {
       display: flex;
       flex-direction: column;
       gap: 8px;
}

.alert-header {
       display: flex;
       justify-content: space-between;
       align-items: center;
}
.alert-title-wrapper {
       display: flex;
       align-items: center;
       gap: 8px;
}

.alert-icon {
       font-size: 16px;
}
.alert-title {
       margin: 0;
       font-size: 16px;
       font-weight: 600;
}

.alert-body {
       display: flex;
       align-items: center;
}

.alert-message {
       flex: 1;
}

.alert-close {
       background: none;
       border: none;
       font-size: 20px;
       cursor: pointer;
       padding: 0 5px;
}

 .paybill-alert.top-right {
        top: 20px;
        right: 20px;
 }

 .paybill-alert-success {
        background: #dff6dd;
        border-left: 4px solid #1e8449;
        color: #145632;
 }

 .paybill-alert-error {
        background: #ff0318;
        border-left: 4px solid #dc3545;
        color: #ffffff;
 }

.paybill-alert-danger {
       background: #f1a009;
       border-left: 4px solid #dc3545;
       color: #000000;
}

 .paybill-alert-warning {
        background: #fff3cd;
        border-left: 4px solid #ffc107;
        color: #664d03;
 }

 .paybill-alert-info {
        background: #cff4fc;
        border-left: 4px solid #0dcaf0;
        color: #055160;
 }

.modal {
       z-index: 99998 !important;
       overflow-y: hidden;
}

.modal-content { 
       overflow: auto;
}

.boq-modal .modal-content {
       height: 98vh;
}

.modal-dialog {
       margin: 1vh auto;
}

.modal-header .close {
       width: 50px;
       height: 50px;
       background: transparent;
       border: 0;
}

.modal.msgprint-dialog {
       z-index: 99999 !important;
}
.modal-body {
       overflow: auto;
}
.msgprint-dialog .msgprint {
       color: red;
}

.modal-footer.hidden {
       display: none;
}

.control {
       border-radius: 5px;
       background-color: #ddd;
       padding: 10px 5px !important;
       max-width: 100px;
       width: 100% !important;
       text-align: center;
}

.no-control {
       border-radius: 5px;
       background-color: #ddd;
       padding: 10px 3px !important;
       border: none !important;
       max-width: 100px;
       width: 100% !important;
       text-align: center;
}

#loader-wrapper {
       position: fixed;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       z-index: 9999;
       background: var(--mytask-theme-color, #6238B3);
       display: flex;
       flex-direction: column;
       align-items: center;
       justify-content: center;
       transition: all 0.3s ease;
}

.loader-text {
       font-size: 3rem;
       font-weight: bold;
       color: #fff;
       margin-top: 20px;
       letter-spacing: 0.5em;
}

.loader-text span {
       display: inline-block;
       animation: wave 1.5s infinite;
}

.attachments-grid {
       display: grid;
       grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
       gap: 15px;
       padding: 15px;
}

.attachment-thumbnail {
       cursor: pointer;
       text-align: center;
       border: 1px solid #ddd;
       padding: 8px;
       border-radius: 4px;
}

.preview-image {
       height: 80px;
       background-size: cover;
       background-position: center;
       display: flex;
       align-items: center;
       justify-content: center;
       margin-bottom: 5px;
}

.file-name {
       font-size: 12px;
       overflow: hidden;
       text-overflow: ellipsis;
       white-space: nowrap;
}

.file-preview-modal {
       position: fixed;
       top: 0;
       left: 0;
       right: 0;
       bottom: 0;
       width: 100vw;
       height: 100vh;
       background: rgba(0, 0, 0, 0.8);
       z-index: 99999;
       display: flex;
       align-items: center;
       justify-content: center;
}

.preview-content {
       width: 100%;
       height: 100%;
}

.preview-content img,
.preview-content iframe {
       max-width: 95vw;
       max-height: 95vh;
       width: 90vw;
       height: 90vh;
       margin: auto;
}

.close-preview {
       position: absolute;
       top: 20px;
       right: 20px;
       background: white;
       border: none;
       font-size: 24px;
       cursor: pointer;
       padding: 5px 10px;
       border-radius: 50%;
}

@keyframes wave {

       0%,
       100% {
              transform: translateY(0);
       }

       50% {
              transform: translateY(-20px);
       }
}

.loader {
       width: 50px;
       height: 50px;
       border: 5px solid #f3f3f3;
       border-top: 5px solid #3498db;
       border-radius: 50%;
       animation: spin 1s linear infinite;
}

@keyframes spin {
       0% {
              transform: rotate(0deg);
       }

       100% {
              transform: rotate(360deg);
       }
}

.hidden {
       display: none;
}

/* Hide toggler on larger screens */
@media (min-width: 769px) {
       .navbar-toggler {
              display: none;
       }

       #sidebar-menu {
              display: block !important;
       }
}

@media (max-width: 768px) {
       .sidebar {
              position: fixed;
              top: 0;
              left: 0;
              z-index: 1000;
              width: 100%;
              height: auto;
       }

       .navbar-collapse {
              background: inherit;
       }

       .navbar-toggler {
              float: right;
              font-size: 20px;
              margin-bottom: 5px;
       }

       .main {
              margin-top: 90px;
       }
}

.loader-text {
       font-size: clamp(2rem, 5vw, 4rem);
       letter-spacing: 0.2em;
}

/* Adjust spacing between letters on smaller screens */
@media (max-width: 480px) {
       .loader-text {
              letter-spacing: 0.1em;
       }
}

#logo img {
       width: clamp(200px, 50vw, 300px);
}

.paybill-confirm {
       position: fixed;
       top: 50%;
       left: 50%;
       transform: translate(-50%, -50%);
       z-index: 99999;
       background: white;
       border-radius: 8px;
       box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
       min-width: 320px;
       max-width: 90%;
}

.confirm-content {
       padding: 20px;
}

.confirm-header {
       display: flex;
       justify-content: space-between;
       align-items: center;
       margin-bottom: 15px;
}

.confirm-title {
       margin: 0;
       font-size: 1.2rem;
       font-weight: 600;
}

.confirm-close {
       background: none;
       border: none;
       font-size: 1.5rem;
       cursor: pointer;
       padding: 0;
       color: #666;
}

.confirm-body {
       margin-bottom: 20px;
       max-height: 400px;
}

.confirm-footer {
       display: flex;
       justify-content: flex-end;
       gap: 10px;
}

.confirm-btn {
       min-width: 80px;
}

.cancel-btn {
       min-width: 80px;
}

 .paybill-loader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 99999;
 }

 .loader-content {
        background: white;
        padding: 20px;
        border-radius: 8px;
        text-align: center;
 }

 .loader-message {
        margin-top: 10px;
        color: #333;
 }

 .ql-toolbar {
       background: #fff !important;
 }

 .ql-container {
       height: 300px !important;
       overflow: auto;
 }

 .ql-container img {
       max-width: 300px !important;
       max-height: 300px !important;
 }

 .parallel-milestone {
        border-left: 3px solid #3498db;
 }

 .parallel-milestone::before {
        content: '⟷';
        color: #3498db;
        position: absolute;
        left: -15px;
 }

 .v-hide {
       visibility: hidden;
 }

 .paybill-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999999;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 400px;
    max-width: 90%;
}

.dialog-content {
    padding: 20px;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dialog-title {
    margin: 0;
    font-size: 1.25rem;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.dialog-body {
    margin-bottom: 20px;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 38px; /* Match the height of other form controls */
}

.progress-container .approval-badge {
    margin: 0;
    padding: 8px 12px;
}

.progress-container .progress {
    width: 100%;
    text-align: center;
}

.signature-pad {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    height: 150px;
    background-color: #fff;
    margin-bottom: 10px;
}

.transfer-card {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.transfer-status {
    font-weight: bold;
}

.transfer-status.in-transit {
    color: #ffc107;
}

.transfer-status.received {
    color: #28a745;
}

.transfer-status.cancelled {
    color: #dc3545;
}


.signature-pad {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    height: 150px;
    background-color: #fff;
    margin-bottom: 10px;
}

#transferItemsTable {
    margin-bottom: 0.5rem;
}

.transfer-item-row .available-qty {
    display: inline-block;
    padding: 0.375rem 0;
    color: #666;
}

.transfer-item-row .transfer-qty {
    max-width: 120px;
}

.signature-pad-readonly canvas {
    opacity: 0.8;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.signature-pad-readonly:after {
    content: "(Read Only)";
    display: block;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.signature-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    background: #f8f9fa;
}

.signatures h6 {
    margin-bottom: 10px;
    font-weight: 600;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

.company-info {
    margin-bottom: 20px;
}

#companyLogoDisplay {
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#companyLogoDisplay img {
    max-width: 100%;
    height: auto;
}
    

.signature-img {
    max-width: 200px;
    max-height: 100px;
    border: 1px solid #ddd;
    margin-top: 10px;
}

   .card-body {
        padding: 1rem;
        overflow: auto;
    }

    .table-responsive {
        width: 100%;
        margin-bottom: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        margin-bottom: 0;
        white-space: nowrap;
    }

    /* Optional: Add horizontal scroll styling */
    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }