.parent-container {
    position: relative; /* Ensures the loader is positioned relative to this container */
    display: inline-block;
}

.element-to-blur {
    filter: none; /* Initially no blur */
    transition: filter 0.3s ease; /* Smooth transition when applying blur */
    pointer-events: auto;
}

.control-c-loader-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 10;
    pointer-events: none; /* Ensure loader doesn't block user interactions */
}

/* Apply blur when the loader is visible */
.parent-container.loading .element-to-blur {
    filter: blur(5px); /* Adjust the amount of blur */
    pointer-events: none;
}

.control-c-loader {
    animation: rotate 1s infinite;
    height: 50px;
    width: 50px;
}

.control-c-loader:before,
.control-c-loader:after {
    border-radius: 50%;
    content: '';
    display: block;
    height: 20px;
    width: 20px;
}

.control-c-loader:before {
    animation: ball1 1s infinite;
    background-color: #cb2025;
    box-shadow: 30px 0 0 #f8b334;
    margin-bottom: 10px;
}

.control-c-loader:after {
    animation: ball2 1s infinite;
    background-color: #00a096;
    box-shadow: 30px 0 0 #97bf0d;
}

@keyframes rotate {
    0% {
        -webkit-transform: rotate(0deg) scale(0.8);
        -moz-transform: rotate(0deg) scale(0.8);
    }
    50% {
        -webkit-transform: rotate(360deg) scale(1.2);
        -moz-transform: rotate(360deg) scale(1.2);
    }
    100% {
        -webkit-transform: rotate(720deg) scale(0.8);
        -moz-transform: rotate(720deg) scale(0.8);
    }
}

@keyframes ball1 {
    0% {
        box-shadow: 30px 0 0 #f8b334;
    }
    50% {
        box-shadow: 0 0 0 #f8b334;
        margin-bottom: 0;
        -webkit-transform: translate(15px, 15px);
        -moz-transform: translate(15px, 15px);
    }
    100% {
        box-shadow: 30px 0 0 #f8b334;
        margin-bottom: 10px;
    }
}

@keyframes ball2 {
    0% {
        box-shadow: 30px 0 0 #97bf0d;
    }
    50% {
        box-shadow: 0 0 0 #97bf0d;
        margin-top: -20px;
        -webkit-transform: translate(15px, 15px);
        -moz-transform: translate(15px, 15px);
    }
    100% {
        box-shadow: 30px 0 0 #97bf0d;
        margin-top: 0;
    }
}

#switchMenu {
    width: calc(100% + 100px);
}

.controlc-hidden {
    display: none;
}

.controlc-logo{
    width: 150px;
    height: 30px;
}

.controlc-new-org-tbl{
    overflow-y: scroll;
    overflow-x: hidden;
    height: 280px;
}

.controlc-err-org-tbl{
    overflow-y: scroll;
    overflow-x: hidden;
    height: 280px;
}

.controlc-no-switch{
    margin-top: -80px;
}

.controlc-new-org-count-container{
    height: 65px;
}

.controlc-new-org-count-text{
    margin-top: 10px;
}

.controlc-download-progress-bar{
    height: 7px;
}

.controlc-paycard {
    background-image: url('/images/application/img-pay-card-bg.png');
}

.controlc-paycard-img {
    width: 64px;
    height: 64px;
}

.controlc-paycard-img-amex {
    height: 29px;
    width: 30px;
}

.controlc-plan-bronze {
    color: #F4511E;
}

.controlc-plan-silver {
    color: #9E9E9E;
}

.controlc-plan-gold {
    color: #FFB300;
}

.controlc-plan-platinum {
    color: #2196F3;
}

.controlc-plan-oneoff {
    color: #212121;
}

.controlc-logo-size {
    width: 150px;
    height: 30px;
}

.controlc-summary-table {
    overflow-y: scroll;
    overflow-x: hidden;
    height: 280px;
}

.controlc-error-summary-table {
    overflow-y: scroll;
    overflow-x: hidden;
    height: 310px;
}

.controlc-new-summary-org-container {
    height: 65px;
}

.controlc-new-summary-org-text-container {
    margin-top: 10px;
    height: 65px;
}

.controlc-mfa-img {
    width: 256px;
    height: 256px;
}

.controlc-bank-account-container {
    padding-left: 20px;
}

.controlc-email-settings-container {
    padding-left: 20px;
}

.controlc-toast-zindex {
    z-index: 99999
}

.controlc-organisation-img {
    width: 128px;
    height: 128px;
}

.controlc-companion-img {
    width: 128px;
    height: 128px;
}

.controlc-scanner-text-indentation {
    margin-left: 30px;
    padding-left: 15px;
}

.controlc-reconnect-img {
    width: 128px;
    height: 128px;
}

.controlc-not-available {
    font-style: italic;
}

.controlc-xero-connected {
    width: 150px;
    height: 70px;
}

.controlc-radar-container {
}

.controlc-event-day {
    background-color: #198754 !important; /* Bootstrap success green */
    color: white !important;
    font-weight: bold;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.controlc-event-day:hover {
    background-color: #146c43 !important; /* Darker shade of success */
    color: white !important;
    transform: scale(1.1);
    cursor: pointer;
}

.controlc-disconnect-no-hover-style,
.controlc-disconnect-no-hover-style:hover,
.controlc-disconnect-no-hover-style:focus,
.controlc-disconnect-no-hover-style:active {
    background-color: #dc3545 !important; /* same as .btn-danger */
    color: white !important;
    text-decoration: none !important;
    cursor: default !important;
    box-shadow: none !important;
}

.controlc-new-organisation-hover-text-style {
    display: flex;
    align-items: center; /* vertical centering */
    justify-content: center; /* optional: horizontal centering */
    font-size: 0.9rem; /* smaller font size */
    height: 100%; /* needed if parent has a fixed height */
}

.controlc-visible {
    display: block; /* or flex, grid, inline, etc. depending on context */
}

.controlc-underline{
    text-decoration: underline !important;
}

.backapp-logo {
    height: 40px;
    width: 190px;
}

.backapp-logo-menu {
    width: 170px;
    height: 40px;
}

.backapp-notification {
    max-height: calc(100vh - 225px);
}

.controlc-text-primary {
    color: #0D6EFD !important;
}

.controlc-bg-primary {
    background-color: #0D6EFD !important;
}

.controlc-color-primary {
    color: #DA2B31 !important;
}

.controlc-chart-container {
    height: 450px;
}

.controlc-auth-header {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: clamp(3rem, 6vw, 8rem);
    font-weight: bold;
    color: #5c5a5a;
    margin: 0;
    line-height: 1.2;
}

.controlc-auth-sub-header {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: clamp(1.15rem, 2vw, 1.65rem);
    font-weight: normal;
    color: #DA2B31;
    margin: 0;
    line-height: 1.2;
}

@supports (font-size: clamp(40px, 2.5vw + 12px, 64px)) {
    .controlc-auth-header {
        font-size: clamp(40px, 2.5vw + 12px, 64px);
    }
}

.controlc-trademark {
    height: 40px;
    width: 190px;
}

.controlc-btn-square {
    border-radius: 6px !important;
}

.filter-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 20px;
}

.results-container {
    min-height: 400px;
}

.transaction-item {
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.transaction-user {
    border-left-color: #0d6efd;
}

.transaction-invoice {
    border-left-color: #198754;
}

.transaction-price {
    border-left-color: #fd7e14;
}

.badge-user {
    background-color: #0d6efd;
}

.badge-invoice {
    background-color: #198754;
}

.badge-price {
    background-color: #fd7e14;
}

.loading-spinner {
    display: none;
}

.filter-chip {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 5px 12px;
    margin: 2px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.quick-filters {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.controlc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.controlc-modal-content {
    background-color: var(--bs-body-bg);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.controlc-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.controlc-small-text {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.invoice-header {
    background: #0D6EFD !important;
    color: white;
    padding: 2rem;
}

.invoice-body {
    background-color: var(--bs-card-bg);
}

.invoice-company-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #0D6EFD !important;
    font-weight: bold;
}

.invoice-form-control:focus, .invoice-form-select:focus {
    border-color: #0D6EFD !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.invoice-section-title {
    color: #0D6EFD !important;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.invoice-items-table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
}

.invoice-items-table thead {
    background: #0D6EFD !important;
    color: white;
}

.invoice-items-table thead th {
    padding: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.invoice-items-table tbody tr {
    transition: background-color 0.2s ease;
}

.invoice-items-table tbody td {
    padding: 0;
    vertical-align: middle;
    border: 1px solid;
    position: relative;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.invoice-items-table input, textarea {
    border: none;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.invoice-items-table select {
    border: none;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.invoice-items-table button {
    border: none;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.invoice-items-table input:focus {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
    box-shadow: inset 0 0 0 2px #0D6EFD !important;
}

.invoice-items-table input[readonly] {
    font-weight: 500;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.invoice-items-table td:last-child {
    text-align: center;
    padding: 0.5rem;
}

.invoice-items-table tbody tr:hover .delete-btn {
    opacity: 1;
}

.invoice-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.invoice-autocomplete-input {
    border: none;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
}

.invoice-autocomplete-contact-input {
    border: 1px solid var(--bs-border-color) !important;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
}

.invoice-autocomplete-input:focus {
    box-shadow: inset 0 0 0 2px #0D6EFD !important;
}

.invoice-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.invoice-autocomplete-dropdown.hidden {
    display: none;
}

.invoice-autocomplete-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.invoice-autocomplete-item:last-child {
    border-bottom: none;
}

.invoice-autocomplete-item:hover,
.invoice-autocomplete-item.active {
    background-color: #0D6EFD !important;;
    color: white;
}

.invoice-autocomplete-item-name {
    font-weight: 500;
}

.invoice-autocomplete-item-price {
    font-size: 0.85rem;
    opacity: 0.8;
}

.invoice-hidden {
    display: none;
}

@media print {
    body {
        background: white;
    }

    .no-print {
        display: none;
    }

    .invoice-autocomplete-dropdown {
        display: none;
    }

    .invoice-total-section {
        position: absolute;
        bottom: 0;
        right: 0;
        border: none;
        padding: 0;
        background: none;
        max-width: 320px;
    }
}

.invoice-th-quantity{
    width: 7% !important;
}

.invoice-th-price{
    width: 7% !important;
}

.invoice-th-total{
    width: 12% !important;
}

.invoice-th-delete{
    width: 5% !important;
}

.sync-job-action-th {
    width: 1% !important;
}

.invoice-th-code{
    width: 12% !important;
}

.invoice-th-tax{
    width: 12% !important;
}

.invoice-th-tax-amount{
    width: 12% !important;
}

.invoice-th-account{
    width: 12% !important;
}

.invoice-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
}

/* Totals Section */
.invoice-total-section {
    width: 100%;
    max-width: 320px; /* desktop width */
    margin-left: auto; /* push to right */
    margin-top: 2rem;
    padding: 1.5rem;
    border-top: 5px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Each Row */
.invoice-total-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.invoice-total-row span:first-child {
    font-weight: 500;
}

.invoice-total-row span:last-child {
    font-weight: 600;
    text-align: right;
    min-width: 100px;
}

.invoice-total-row.grand-total {
    border-top: 5px solid var(--bs-border-color);
    border-bottom: 5px solid var(--bs-border-color);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 800;
}

/* --- Responsive tweaks --- */
@media (max-width: 768px) {
    .invoice-total-section {
        max-width: 100%;
        align-items: stretch;
        font-size: 0.95rem;
    }

    .invoice-total-row {
        justify-content: space-between;
    }

    .invoice-total-row span:last-child {
        min-width: auto;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .invoice-total-section {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .invoice-total-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .invoice-total-row span:last-child {
        align-self: flex-end;
    }
}

.item-quantity::-webkit-outer-spin-button,
.item-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.item-quantity[type=number] {
    -moz-appearance: textfield;
}

.item-price::-webkit-outer-spin-button,
.item-price::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.item-price[type=number] {
    -moz-appearance: textfield;
}

.item-discount::-webkit-outer-spin-button,
.item-discount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.item-discount[type=number] {
    -moz-appearance: textfield;
}

.currency-rate::-webkit-outer-spin-button,
.currency-rate::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.currency-rate[type=number] {
    -moz-appearance: textfield;
}

.item-tax-amount[readonly],
.item-taxrate:disabled,
.item-discount:disabled {
    opacity: 1; /* keep consistent opacity */
    cursor: not-allowed;
}

.controlc-success-check {
    font-size: 64px;
    color: #4CAF50;
    animation: popIn 0.4s ease-in-out;
}

.controlc-error-cross {
    font-size: 64px;
    color: #f44336;
    animation: popIn 0.4s ease-in-out;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.controlc-modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.filter-active-badge {
    font-size: 0.875rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.search-active-badge,
.attachment-badge,
.contact-badge {
    display: inline-block;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    margin-top: 0.5rem;
}

.filter-count-badge {
    font-size: 0.75rem;
    vertical-align: middle;
}
