*,
::before,
::after {
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

a {
    text-decoration: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.main-container {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.main-contents {
    flex: 1;
    overflow: hidden;
    height: 100%;
    padding-top: 0px;
    padding-bottom: 20px;
    padding-left: 5px;
    padding-right: 15px;
}

.k-picker.k-dropdownlist {
    width: 140px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    margin: 0;
}

.help-button {
    margin-left: auto;
    margin-right: 10px;
}

.k-grid {
    font-size: 0.8em; /* Reduce the font size to 80% */
}

    .k-grid td {
        padding: 0.8em; /* Reduce the padding to 80% */
    }

.k-table-md {
    font-size: 10px !important; /* Reduce the font size to 80% */
}

.k-button.selected {
    background-color: #007BFF; /* Choose your color */
    color: #FFFFFF; /* Choose your color */
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 9999;
    background-color: rgba(255,255,255,0.8);
    justify-content: center;
    align-items: center;
}

.main-disabled {
    pointer-events: none;
    opacity: 0.4;
}

.kd-image-wrapper > .k-icon {
    font-size: 72px;
}

.tab-close-button {
    margin-left: 5px;
    cursor: pointer;
    font-size: 18px;
}

.dialog-box {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0 !important;
}

.dialog-box-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* make kendo.alert title bars red */
.k-dialog.k-alert .k-dialog-titlebar {
    background-color: red;
    color: white;
}



.k-loading-image {
    display: none;
}




#overlay {
    position: fixed; /* Ensures the overlay covers the entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Optional: Adds a semi-transparent background */
    z-index: 9999; /* Ensures the overlay is above all other elements */
    display: flex; /* Enables flexbox for centering */
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
}

.example-item-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Customer Comparison Report — trend row colouring */
#CustomerComparisonGrid tr.trend-up,
#CustomerComparisonGrid tr.trend-up.k-alt {
    background-color: #d4edda !important;
}

#CustomerComparisonGrid tr.trend-up:hover,
#CustomerComparisonGrid tr.trend-up.k-alt:hover {
    background-color: #c3e6cb !important;
}

#CustomerComparisonGrid tr.trend-down,
#CustomerComparisonGrid tr.trend-down.k-alt {
    background-color: #f8d7da !important;
}

#CustomerComparisonGrid tr.trend-down:hover,
#CustomerComparisonGrid tr.trend-down.k-alt:hover {
    background-color: #f1b0b7 !important;
}

.trend-arrow-up {
    color: #28a745;
    font-size: 18px;
}

.trend-arrow-down {
    color: #dc3545;
    font-size: 18px;
}

.status-new {
    color: #28a745;
    font-size: 18px;
}

.status-lost {
    color: #dc3545;
    font-size: 18px;
}

/* KPI cards — Customer Comparison report */
.kpi-card {
    flex: 1;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 14px;
    min-width: 140px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.kpi-card .kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.kpi-card .kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
}

.kpi-card .kpi-value.positive { color: #1d7a38; }
.kpi-card .kpi-value.negative { color: #bd2130; }

/* Customer Comparison column-header tooltip content */
#CustomerComparisonGrid + .k-tooltip,
.k-tooltip-wrap .k-tooltip-content {
    line-height: 1.4;
}
.k-tooltip .swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    margin-right: 4px;
    vertical-align: middle;
    border: 1px solid transparent;
}
.k-tooltip .swatch-up { background: #d4edda; border-color: #c3e6cb; }
.k-tooltip .swatch-down { background: #f8d7da; border-color: #f1b0b7; }
.k-tooltip .bx {
    vertical-align: middle;
    font-size: 14px;
    margin-right: 2px;
}
.k-tooltip .trend-arrow-up,
.k-tooltip .status-new { color: #28a745; }
.k-tooltip .trend-arrow-down,
.k-tooltip .status-lost { color: #dc3545; }

#CustomerComparisonGrid thead th,
#CustomerComparisonGrid thead th .k-link {
    font-size: 12px;
    font-weight: 700;
    text-align: center !important;
    justify-content: center;
}
