/* Navigation Enhancements for Breadcrumb and Recent Activity Sidebar */

/* Main content adjustments for sidebar */
.main-content {
    transition: margin-right 0.3s ease;
}

/* Breadcrumb enhancements */
.breadcrumb-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    margin-bottom: 1.5rem;
}

/* Page content spacing adjustments */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Enhanced page titles with breadcrumb integration */
.page-title {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(34, 72, 141, 0.1);
}

.page-title h1 {
    margin-bottom: 0.25rem;
    color: #495057;
    font-weight: 600;
}

.page-title .subtext {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Card enhancements for better visual hierarchy */
.section-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Table enhancements */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(34, 72, 141, 0.05);
}

/* Button enhancements */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Action buttons in tables */
.actions-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Modal enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px 12px 0 0;
}

/* Form enhancements */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #22488d;
    box-shadow: 0 0 0 0.2rem rgba(34, 72, 141, 0.25);
}

/* Alert enhancements */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark mode enhancements */
.dark-mode .section-card {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: rgba(75, 85, 99, 0.8) !important;
    color: #f1f5f9 !important;
}

.dark-mode .page-title h1 {
    color: #f8f9fa;
}

.dark-mode .page-title .subtext {
    color: #adb5bd;
}

.dark-mode .page-title {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .table thead th {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
}

.dark-mode .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .modal-header {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .section-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .breadcrumb-nav {
        margin-bottom: 1rem;
    }
    
    .page-title h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .section-card {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .page-title h1 {
        font-size: 1.25rem;
    }
    
    .breadcrumb-nav {
        padding: 0.5rem 0.75rem;
    }
}

/* Animation for page transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content > .container-fluid > * {
    animation: fadeInUp 0.3s ease-out;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.dark-mode .loading-skeleton {
    background: linear-gradient(90deg, #495057 25%, #343a40 50%, #495057 75%);
    background-size: 200% 100%;
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #22488d;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .breadcrumb-nav {
        border: 2px solid;
    }
    
    .section-card {
        border: 2px solid;
    }
    
    .btn {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .breadcrumb-nav,
    .recent-activity-sidebar,
    .btn,
    .modal {
        display: none !important;
    }
    
    .section-card {
        box-shadow: none;
        border: 1px solid #000;
    }

}
.language-btn {
  background: transparent;
  border: 1px solid #1E3A8A;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.4rem;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.language-btn.active {
  background: #22488d;
  border-color: #22488d;
  color: #000;
}

.language-btn:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: #1E3A8A;
  color: #1E3A8A;
}

/* Button Style Overrides */
.btn-primary {
    background-color: var(--button-primary-bg);
    color: #fff; /* EN text color */
    transition: var(--transition-base), transform 0.2s;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--button-primary-hover);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 0.3px solid var(--button-secondary-border);
    color: #000000; /* HA text color */
    background-color: transparent;
    box-shadow: 0 0 0 1px var(--button-secondary-border);
    transition: var(--transition-base), transform 0.2s;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: rgba(34, 72, 141, 0.1);
    color: var(--button-secondary-bg);
    border-color: var(--button-secondary-border);
    box-shadow: 0 0 0 1px var(--button-secondary-border), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Language toggle explicit overrides */
.language-buttons .language-btn.btn-primary.active {
    color: #ffffff; /* EN active: white */
}

.language-buttons .language-btn.btn-outline-primary.active {
    color: #000000; /* HA active: black */
}
/* Default (desktop/tablet) */
.btn-outline-primary {
    border: 0.1px solid var(--button-secondary-border) !important;
}

/* Mobile: reduce border thickness */
@media (max-width: 576px) {
    .btn-outline-primary {
        border-width: 0.1px !important;
    }
}

.dashboard-stat-card {
  background-color: #D9D9D9 !important;
  color: #000 !important;
}

.dashboard-stat-card .card-title,
.dashboard-stat-card .card-text,
.dashboard-stat-card p,
.dashboard-stat-card small,
.dashboard-stat-card span,
.dashboard-stat-card i {
  color: #000 !important;
}
