﻿#login-error {
    animation: fadeIn 0.3s ease-in-out;
    min-height: 22px;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-page .account-page-bg {
    background-image: url(../assets/images/login-02.png);
    background-color: #2E37A4;
    background-size: cover;
    background-position: center center;
    min-height: 890px;
    display: flex;
    justify-content: center;
    border-radius: 0px 65px 65px 0px;
}

.account-page .card {
    border-radius: 15px; /* Adjust the value as needed */
    overflow: hidden; /* Ensures child elements don't overflow rounded corners */
}

.login-danger, .star-red {
    color: #FF0000;
}

.form-control-disabled {
    background-color: #e9ecef; /* same as Bootstrap disabled input */
    cursor: not-allowed;
    color: #6c757d; /* optional: gray text */
}

/*product-list*/
.dropdown-wrapper {
    position: relative;
}

.dropdown-input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: inherit;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
}

#productSearch:focus {
    outline: none !important;
    border-color: #ccc !important;
    box-shadow: none !important;
}

.dropdown-list.hidden {
    display: none;
}

.dropdown-item-p {
    padding: 8px;
    cursor: pointer;
}

    .dropdown-item-p:hover {
        background-color: #f0f0f0;
    }

    .dropdown-item-p.active {
        background-color: #cce5ff !important;
        font-weight: bold;
    }



/*desc-list*/
.desc-dropdown-wrapper {
    position: relative;
}

.desc-dropdown-input {
    width: 100% !important;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    font-size: 17px;
    font-weight: 900;
    text-align: right;
}

    .desc-dropdown-input::placeholder {
        font-size: 15px;
        font-weight: normal !important;
        text-align: left !important;
    }


    .desc-dropdown-input:focus {
        border-color: #ccc;
        box-shadow: none;
    }

.desc-dropdown-list {
    position: absolute;
    top: 100%;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    z-index: 1000;
    border-radius: 0 0 5px 5px;
    font-size: 18px !important;
    font-weight: bold;
}

    .desc-dropdown-list.hidden {
        display: none;
    }

.desc-dropdown-header, .desc-dropdown-item {
    display: flex;
    border-bottom: 1px solid #eee;
}

.desc-dropdown-header {
    font-weight: bold;
    background: #f0f0f0;
    padding: 6px 8px;
}

.desc-dropdown-item {
    padding: 6px 8px;
    cursor: pointer;
}

.col-id {
    width: 20%;
    text-align: left;
    font-size: 15px !important;
    font-weight: bold !important;
}

.col-text {
    width: 50%;
    text-align: left;
}

.desc-dropdown-item:hover,
.desc-dropdown-item.active {
    background-color: #e0e0e0;
}

.form-label {
    font-weight: bold;
    color: #464646;
}

#scroll-horizontal-datatable .btn-icon {
    padding: 2px !important; /* Reduce padding */
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    #scroll-horizontal-datatable .btn-icon i {
        font-size: 14px; /* Adjust as needed */
        vertical-align: middle;
    }


#scroll-horizontal-datatable.table > :not(caption) > * > * {
    padding: 0.3rem 0.25rem; /* Slightly more vertical padding */
    font-size: 0.85rem;
    line-height: 1.4; /* Improves vertical alignment */
    vertical-align: middle; /* Ensures contents are vertically centered */
    color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));
    background-color: var(--bs-table-bg);
    border-bottom-width: var(--bs-border-width);
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
}

.text-muted {
    --bs-text-opacity: 1;
    color: #424242 !important;
}


/* Receipt container */
#receiptContainer {
    display: none;
    width: 80mm; /* Exact printer roll width */
    font-family: Arial, sans-serif;
    margin: 0 auto; /* Center on page */
    padding: 0;
    word-wrap: break-word;
    white-space: normal;
    font-size: 14px; /* Base size for consistent scaling */
    line-height: 1.2; /* Improves readability */
}

    /* Table */
    #receiptContainer table {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        padding: 0;
        table-layout: fixed; /* Prevents layout shifting */
    }

    /* Hospital name */
    #receiptContainer .hospital-name {
        margin: 0;
        padding: 0;
        font-size: 16px;
        font-weight: bold;
        text-align: center;
    }

    /* Separator */
    #receiptContainer .separator {
        border-top: 1px dashed #000;
        margin: 6px 0; /* Slightly more spacing for clarity */
        padding: 0;
    }

    /* Labels */
    #receiptContainer td.receipt-label {
        text-align: left;
        font-size: 14px;
        font-weight: bold;
        padding: 2px 0;
        vertical-align: top; /* Aligns nicely if value spans multiple lines */
    }

    /* Values */
    #receiptContainer td.receipt-value {
        text-align: left;
        font-size: 14px;
        padding: 2px 0;
        word-break: break-word; /* Long words/numbers won't overflow */
    }

    /* Address */
    #receiptContainer .hospital-address {
        margin: 0;
        padding: 8px 0 0 0;
        font-size: 13px;
        font-weight: bold;
        word-wrap: break-word;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

/* Print-specific tweaks */
@media print {
    body {
        margin: 0;
        padding: 0;
    }

    #receiptContainer {
        margin: 0 auto;
    }
}

/* Default secondary button */
.btn-secondary {
    color: #fff;
    background-color: #6c757d; /* default bg */
    border-color: #6c757d; /* default border */
}

    /* Hover, focus, active, open states → keep consistent */
    .btn-secondary:hover,
    .btn-secondary:focus,
    .btn-secondary:active,
    .btn-secondary.active,
    .show > .btn-secondary.dropdown-toggle {
        color: #fff;
        box-shadow: none !important;
        background-color: #5a6268 !important;
        border-color: #545b62 !important;
    }

.card-body.d-flex {
    min-height: 300px;
}

.btn-w-10 {
    width: 10%; /* responsive width */
}

.btn-w-15 {
    width: 15%; /* responsive width */
}

.btn-w-20 {
    width: 20%; /* responsive width */
}

/* Reserve space for messages so button never moves */
#resultMessage {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 50px;
}

    #resultMessage .alert {
        margin: 0;
        padding: 0.25rem 0.75rem;
        line-height: 2;
        width: 100%;
        box-sizing: border-box;
    }


/* Highlight entire row with rounded corners */
.table-highlight-row {
    background-color: #fff8e1 !important; /* light yellow, you can change */
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

/* Make sure table cells don’t override the row background */
#fixed-columns-datatable tbody tr.table-highlight-row td {
    background-color: transparent !important;
}





/* Highlighted row with rounded corners */
/* Default row style */
#fixed-columns-datatable tbody tr td {
    background-color: white; /* normal background */
    transition: background-color 2s ease; /* smooth fade when color changes */
}

/* Highlighted row */
.table-success-rounded td {
    background-color: #d4edda !important; /* Bootstrap success color */
}

    /* Rounded corners for the first and last cell only */
    .table-success-rounded td:first-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .table-success-rounded td:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }



/* Buttons only inside this specific table */
#fixed-columns-datatable .btn-icon.btn-sm {
    width: 1.75rem;
   /* height: auto;*/
    font-size: .8rem;
    padding: .25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cells only inside this specific table */
#fixed-columns-datatable.dataTable tbody td {
    padding: 0.3rem 0.5rem!important; /* reduce top/bottom spacing */
    line-height: 1.2!important; /* keep text compact */
    vertical-align: middle!important; /* vertically center content */
}



/* 🔹 Shimmer overlay */
.chart-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* fills the chart area */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff; /* optional: clean background */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 2; /* above the chart */
}

    .chart-loader.hidden {
        opacity: 0;
        visibility: hidden;
    }

    /* 🔹 Shimmer lines */
    .chart-loader .shimmer-line {
        width: 85%;
        height: 18px;
        margin-bottom: 22px;
        border-radius: 6px;
        background: linear-gradient(90deg, #e0e0e0 25%, #f7f7f7 50%, #e0e0e0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.6s infinite linear;
    }

        .chart-loader .shimmer-line:last-child {
            margin-bottom: 0;
        }

/* 🔹 Shimmer animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* 🔹 Chart fade-in */
.chart {
    opacity: 0;
    transition: opacity 0.6s ease;
    position: relative;
    z-index: 1;
}

    .chart.visible {
        opacity: 1;
    }



/* ---------- Widget shimmer overlay ---------- */
.widget-loader {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* align shimmer lines left like text */
    padding: 16px; /* keep same padding as card-body */
    background: #fff; /* optional: match background so loader hides content */
    z-index: 20;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

    /* hidden state */
    .widget-loader.hidden {
        opacity: 0;
        visibility: hidden;
    }

/* shimmer lines sizes (short / long) */
.widget-shimmer-line {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #e6e6e6 25%, #f5f5f5 50%, #e6e6e6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
}

    /* two variants to resemble label + value */
    .widget-shimmer-line.short {
        width: 30%;
    }

    .widget-shimmer-line.long {
        width: 70%;
    }

    .widget-shimmer-line:last-child {
        margin-bottom: 0;
    }

/* shimmer keyframes */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ---------- Widget content fade-in ---------- */
.widget-content {
    opacity: 0;
    transition: opacity 0.5s ease;
    /* don't set display:none here — we toggle opacity only */
    /* but ensure content is above card background */
    position: relative;
  /*  z-index: 10;*/
}

    .widget-content.visible {
        opacity: 1;
    }

.bg-widget {
    background-color: #3c7ebb !important
}


/* Reusable loading button */
.btn-loading {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /*min-width: 120px;*/ /* Keeps width consistent */
    /*height: 40px;*/ /* Ensures consistent button height */
    overflow: hidden;
    vertical-align: middle;
    transition: all 0.2s ease-in-out;
}

/* Button text */
.btn-text {
    transition: opacity 0.2s ease;
}

/* Spinner */
.btn-spinner {
    position: absolute;
    width: 1rem;
    height: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* When loading */
.btn-loading.loading .btn-text {
    opacity: 0;
}

.btn-loading.loading .btn-spinner {
    opacity: 1;
}

/* Prevent movement */
.btn-loading.loading {
    pointer-events: none;
}

/* Disabled look */
.btn-loading:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}




.form-action-buttons {
    display: flex;
    gap: 12px;
    margin: 0 20%; /* 20% left and right margins */
}

/* Desktop widths */
@media (min-width: 577px) {
    .form-action-buttons .btn-submit {
        flex: 0 0 70%; /* 70% of parent (screen minus margins) */
        height: 48px;
    }

    .form-action-buttons .whatsapp-btn {
        flex: 0 0 30%; /* 30% of parent */
        height: 48px;
    }
}

/* WhatsApp styling */
.form-action-buttons .btn.whatsapp-btn {
    background-color: #128C7E !important;
    border-color: #128C7E !important;
    color: #fff !important;
    font-weight: 500;
}

    .form-action-buttons .btn.whatsapp-btn:hover {
        background-color: #0f7a6b !important;
        border-color: #0f7a6b !important;
    }

    .form-action-buttons .btn.whatsapp-btn:focus,
    .form-action-buttons .btn.whatsapp-btn:active {
        background-color: #0b6d5f !important;
        border-color: #0b6d5f !important;
        box-shadow: 0 0 0 0.15rem rgba(18,140,126,0.35) !important;
    }

/* Mobile stacked */
@media (max-width: 576px) {
    .form-action-buttons {
        flex-direction: column;
        align-items: center; /* center buttons */
        margin: 0 10%; /* smaller margin on mobile */
    }

        .form-action-buttons .btn-submit,
        .form-action-buttons .whatsapp-btn {
            flex: 0 0 auto;
            width: 100%;
            height: auto;
            padding: 10px 0;
            font-size: 16px;
            margin: 4px 0;
        }
}