﻿/**
 * Global Styles - Refactored
 * TiManagement Web Application
 * 
 * Using design system variables for consistency
 */

/* ========================================
   BRANDING
   ======================================== */

:root .lpx-brand-logo {
    --lpx-logo: url('/images/logo/leptonxlite/trucking.png');
    --lpx-logo-icon: url('/images/logo/leptonxlite/trucking.png');
}

/* ========================================
   CUSTOM COMPONENTS
   ======================================== */

/* Leave Day Header */
.leavedayhearder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.leavedayhearder .form-label {
    margin: 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
}

.button-group {
    display: flex;
    gap: var(--space-2);
}

.leavedayhearder .text-danger {
    color: var(--danger);
    margin-left: var(--space-2);
}
/* Attachments */
.attachments {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.attachments .btn-link {
    padding: 0;
    font-size: var(--font-size-sm);
}

/* ========================================
   CHART STYLES
   ======================================== */

.chart-container {
    position: relative;
    width: 100%;
    min-height: 350px;
    padding: var(--space-5);
    display: flex;
    justify-content: center;
    align-items: center;
}

#columnChart {
    width: 100%;
    display: none;
}
/* ========================================
   TABLE STYLES
   ======================================== */

table.table-bordered th,
table.table-bordered td {
    border: 1px solid var(--border-color);
    padding: var(--table-cell-padding-y) var(--table-cell-padding-x);
}

table.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bg-secondary);
}

.text-right {
    text-align: right;
}

/* ========================================
   FORM STYLES
   ======================================== */

.select-form-button {
    height: var(--btn-height);
}
/* ========================================
   SELECT2 OVERRIDES
   ======================================== */

.select2-container--default .select2-selection--single {
    background-color: var(--bg-primary);
    border: var(--input-border-width) solid var(--input-border-color);
    height: var(--input-height);
}

.select2-selection .select2-selection--single {
    border: var(--input-border-width) solid var(--input-border-color);
}

.select2-selection__arrow {
    height: 26px;
    position: absolute;
    right: 1px;
    width: 20px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    margin-top: var(--space-2);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    border: none;
}
/* Select2 in Modals */
.modal-body .form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.modal-body .select2-container {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius);
    background-color: var(--bg-secondary);
}

.modal-body .select2-container--default .select2-selection--single {
    background-color: transparent;
    border: none;
    padding: 0;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    height: var(--input-height-sm);
}

.modal-body .select2-container--default .select2-selection__rendered {
    line-height: var(--line-height-normal);
    color: var(--text-primary);
}

.modal-body .select2-container--default .select2-selection__arrow {
    height: 100%;
    display: flex;
    align-items: center;
}

.modal-body .select2-container .select2-selection--single .select2-selection__rendered {
    margin-top: 0;
}

/* ========================================
   LAYOUT OVERRIDES
   ======================================== */

@media only screen and (min-width: 480px) {
    .lpx-content-container {
        margin-right: 0;
    }
}

/* ========================================
   MODAL Z-INDEX
   ======================================== */

.modal.fade.show[role="dialog"] {
    z-index: var(--z-index-modal);
}

.modal-backdrop.fade.show {
    z-index: var(--z-index-modal-backdrop);
}
/* ========================================
   TABLE DETAILS (Invoice, Payment, etc.)
   ======================================== */

table.table td {
    text-align: left;
    position: relative;
}

table.table td:last-child {
    text-align: right;
}

table.table button[data-action="delete"] {
    margin-right: 0;
    float: none;
    display: inline-block;
}

/* ========================================
   FILTER FORM
   ======================================== */

#FilterForm .btn,
.FilterFormButton {
    height: var(--btn-height-lg);
}

#FilterForm input[type=text] {
    height: var(--input-height-lg);
}

#FilterForm label {
    margin-top: var(--space-2);
}

/* ========================================
   APEXCHARTS OVERRIDES
   ======================================== */

/* Fix font for ApexCharts to support Vietnamese characters */
.apexcharts-title-text {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0;
}