/* UI Components CSS */

/* Import component-specific CSS */
@import url('components/navbar-components.css');

/* Note: Individual component CSS files are now located in their respective 
   UIComponents/[ComponentName]/[ComponentName].razor.css files */

/* Global utility styles for all components */

/* Button utilities */
.btn-loading {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Form utilities */
.form-group {
    margin-bottom: 1rem;
}

/* Card enhancements */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Alert enhancements */
.alert {
    border-radius: 0.25rem;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
}

/* Dropdown utilities (global styles) */
.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover, .dropdown-item:focus {
    color: #1e2125;
    background-color: #f8f9fa;
}

.dropdown-item.active, .dropdown-item:active {
    color: #fff;
    text-decoration: none;
    background-color: #0d6efd;
}

.dropdown-item.disabled, .dropdown-item:disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: transparent;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.dropdown-header {
    display: block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

/* Tabs utilities */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    margin-bottom: -1px;
    background: none;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .active {
    display: block;
}

/* Pagination utilities */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
}

.page-link {
    position: relative;
    display: block;
    color: #0d6efd;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.page-link:hover {
    z-index: 2;
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-link:focus {
    z-index: 3;
    color: #0a58ca;
    background-color: #e9ecef;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.page-item:not(:first-child) .page-link {
    margin-left: -1px;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Progress utilities */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #0d6efd;
    transition: width 0.6s ease;
}

/* Bo tròn cho progress bar */
/* Single progress bar - bo tròn cả 2 đầu */
.progress .progress-bar:only-child {
    border-radius: 0.25rem;
}

/* Multiple progress bars */
.progress .progress-bar:first-child:not(:only-child) {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.progress .progress-bar:last-child:not(:only-child) {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Dark theme progress background */
[data-theme="dark"] .progress {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .progress {
    background-color: rgba(255, 255, 255, 0.1);
}

/* System theme - dark mode */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] .progress {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position-x: 1rem; }
}

.progress-sm {
    height: 0.5rem;
}

.progress-lg {
    height: 1.5rem;
}

.progress-xl {
    height: 2rem;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-grow {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow 0.75s linear infinite;
}

.spinner-border-sm, .spinner-grow-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

@keyframes spinner-grow {
    0% {
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: none;
    }
}

/* Table */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: top;
    border-color: #dee2e6;
}

.table > :not(caption) > * > * {
    padding: 0.5rem 0.5rem;
    background-color: transparent;
    border-bottom-width: 1px;
    box-shadow: inset 0 0 0 9999px transparent;
}

.table > tbody {
    vertical-align: inherit;
}

.table > thead {
    vertical-align: bottom;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* TimePicker Light Mode Styles */
.light-style .time-picker-input,
.time-picker-input {
    border-color: #dee2e6;
}

.light-style .time-picker-toggle,
.time-picker-toggle {
    border-color: #dee2e6;
}

.light-style .time-picker-input:focus,
.time-picker-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.light-style .time-picker-input:focus + .time-picker-toggle,
.time-picker-input:focus + .time-picker-toggle {
    border-color: #86b7fe;
}

.light-style .time-picker-toggle:focus,
.time-picker-toggle:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* TimePicker Dark Mode Styles */
.dark-style .time-picker-dropdown {
    background: #2F3349 !important;
    border-color: #3b4253 !important;
    color: #b4b7bd !important;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.3) !important;
}

.dark-style .time-picker-dropdown.show {
    display: block !important;
}

.dark-style .time-select {
    background-color: #2F3349 !important;
    border-color: #3b4253 !important;
    color: #b4b7bd !important;
}

.dark-style .time-select:focus {
    border-color: #7367f0 !important;
    box-shadow: 0 0 0 0.125rem rgba(115, 103, 240, 0.25) !important;
    background-color: #2F3349 !important;
}

.dark-style .time-select:hover {
    border-color: #7367f0 !important;
    background-color: #161d31 !important;
}

.dark-style .time-label {
    color: #b4b7bd !important;
}

.dark-style .quick-times {
    border-top-color: #3b4253 !important;
}

.dark-style .quick-times-label {
    color: #b4b7bd !important;
}

.dark-style .time-picker-actions {
    border-top-color: #3b4253 !important;
}

.dark-style .time-picker-toggle {
    background-color: #2F3349 !important;
    border-color: #76778E !important;
    color: #b4b7bd !important;
}

.dark-style .time-picker-toggle:hover {
    background-color: #161d31 !important;
    border-color: #7367f0 !important;
}

.dark-style .time-picker-input {
    background-color: #2F3349 !important;
    border-color: #76778E !important;
    color: #b4b7bd !important;
}

.dark-style .time-picker-input:focus {
    background-color: #2F3349 !important;
    border-color: #7367f0 !important;
    color: #b4b7bd !important;
    box-shadow: 0 0 0 0.125rem rgba(115, 103, 240, 0.25) !important;
}

.dark-style .time-picker-input::placeholder {
    color: #76778E !important;
}

.dark-style .time-picker-input:focus + .time-picker-toggle {
    border-color: #7367f0 !important;
}

.dark-style .time-picker-toggle:focus {
    border-color: #7367f0 !important;
    box-shadow: 0 0 0 0.125rem rgba(115, 103, 240, 0.25) !important;
}

.dark-style .time-picker-toggle:focus + .time-picker-input {
    border-color: #7367f0 !important;
}

.dark-style .quick-time-btn {
    background-color: transparent !important;
    border-color: #3b4253 !important;
    color: #b4b7bd !important;
}

.dark-style .quick-time-btn:hover {
    background-color: #161d31 !important;
    border-color: #7367f0 !important;
    color: #7367f0 !important;
}

.dark-style .btn-secondary {
    background-color: #82868b !important;
    border-color: #82868b !important;
    color: #fff !important;
}

.dark-style .btn-secondary:hover {
    background-color: #757782 !important;
    border-color: #757782 !important;
    color: #fff !important;
}

/* Light mode btn-primary styles */
.btn-primary {
    background-color: #7367f0 !important;
    border-color: #7367f0 !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: #685dd8 !important;
    border-color: #685dd8 !important;
    color: #fff !important;
}

.btn-primary:focus, .btn-primary.focus {
    background-color: #685dd8 !important;
    border-color: #685dd8 !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.125rem rgba(115, 103, 240, 0.25) !important;
}

.btn-primary:active, .btn-primary.active {
    background-color: #685dd8 !important;
    border-color: #685dd8 !important;
    color: #fff !important;
}

.btn-primary:disabled, .btn-primary.disabled {
    background-color: #7367f0 !important;
    border-color: #7367f0 !important;
    color: #fff !important;
    opacity: 0.65;
}

/* Dark mode btn-primary styles */
.dark-style .btn-primary {
    background-color: #7367f0 !important;
    border-color: #7367f0 !important;
    color: #fff !important;
}

.dark-style .btn-primary:hover {
    background-color: #5a52d5 !important;
    border-color: #5a52d5 !important;
    color: #fff !important;
}

/* Dark mode scrollbar styles */
.dark-style .time-picker-dropdown::-webkit-scrollbar-track {
    background: #444564 !important;
}

.dark-style .time-picker-dropdown::-webkit-scrollbar-thumb {
    background: #5a5f7d !important;
}

.dark-style .time-picker-dropdown::-webkit-scrollbar-thumb:hover {
    background: #7367f0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-block {
        width: 100%;
    }
    
    .table-responsive {
        display: block;
        width: 100%;
    }
}