/**
 * High Contrast UI Improvements
 * Enhanced readability and accessibility across all components
 */

/* Base Typography with Higher Contrast */
body {
    background: #0a0a0a !important;
    color: #ffffff !important;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Enhanced Text Contrast */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
}

p, span, div, li {
    color: #f5f5f5 !important;
    line-height: 1.7;
    font-weight: 400;
}

/* High Contrast Cards */
.card {
    background: rgba(15, 15, 25, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(20px);
}

.card-header {
    background: rgba(30, 30, 45, 0.9) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.card-body {
    color: #f5f5f5 !important;
    background: rgba(10, 10, 20, 0.8) !important;
}

.card-title {
    color: #ffffff !important;
    font-weight: 700;
}

.card-text {
    color: #e8e8e8 !important;
    font-weight: 400;
    line-height: 1.6;
}

/* Enhanced Button Contrast */
.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}

.btn-secondary {
    background: rgba(30, 30, 30, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    color: #ffffff !important;
    font-weight: 500;
}

.btn-secondary:hover {
    background: rgba(50, 50, 50, 0.9) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
    font-weight: 600;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}

/* High Contrast Forms */
.form-control,
.form-select,
textarea {
    background: rgba(20, 20, 30, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 500;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    background: rgba(25, 25, 35, 0.95) !important;
    border-color: #007bff !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.4) !important;
}

.form-control::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 400;
}

.form-label,
label {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    margin-bottom: 0.75rem;
}

/* Enhanced Navigation */
.navbar {
    background: rgba(5, 5, 15, 0.95) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(20px);
}

.navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.nav-link {
    color: #e8e8e8 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.nav-link.active {
    color: #007bff !important;
    font-weight: 600;
}

/* High Contrast Alerts */
.alert {
    border: 2px solid !important;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.alert-info {
    background: rgba(23, 162, 184, 0.2) !important;
    border-color: #17a2b8 !important;
    color: #ffffff !important;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2) !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.3) !important;
    border-color: #ffc107 !important;
    color: #000000 !important;
    font-weight: 600;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2) !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Enhanced Links */
a {
    color: #66b3ff !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

a:hover,
a:focus {
    color: #ffffff !important;
    text-decoration: underline;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* High Contrast Tables */
.table {
    color: #ffffff !important;
    background: rgba(10, 10, 20, 0.8) !important;
}

.table th {
    background: rgba(30, 30, 45, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    font-weight: 700;
}

.table td {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #e8e8e8 !important;
    font-weight: 400;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Enhanced Modals */
.modal-content {
    background: rgba(15, 15, 25, 0.98) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(20px);
    color: #ffffff !important;
}

.modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3) !important;
    background: rgba(25, 25, 35, 0.9) !important;
}

.modal-footer {
    border-top: 2px solid rgba(255, 255, 255, 0.3) !important;
    background: rgba(25, 25, 35, 0.9) !important;
}

.modal-title {
    color: #ffffff !important;
    font-weight: 700;
}

/* Enhanced Dropdowns */
.dropdown-menu {
    background: rgba(15, 15, 25, 0.98) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.dropdown-item {
    color: #e8e8e8 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 123, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Enhanced Badges */
.badge {
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.badge-primary {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: #ffffff !important;
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.9) !important;
    color: #ffffff !important;
}

.badge-success {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
    color: #ffffff !important;
}

/* Enhanced Progress Bars */
.progress {
    background: rgba(30, 30, 40, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-bar {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Enhanced List Groups */
.list-group-item {
    background: rgba(20, 20, 30, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e8e8e8 !important;
    font-weight: 400;
}

.list-group-item:hover {
    background: rgba(30, 30, 40, 0.9) !important;
    color: #ffffff !important;
}

.list-group-item.active {
    background: rgba(0, 123, 255, 0.8) !important;
    border-color: #007bff !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Enhanced Tooltips and Popovers */
.tooltip .tooltip-inner {
    background: rgba(0, 0, 0, 0.95) !important;
    color: #ffffff !important;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.popover {
    background: rgba(15, 15, 25, 0.98) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.popover-header {
    background: rgba(25, 25, 35, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.popover-body {
    color: #e8e8e8 !important;
}

/* Voice Interface High Contrast */
.voice-side-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.5) !important;
}

.voice-indicator {
    background: rgba(5, 5, 15, 0.98) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.style-selection {
    background: rgba(5, 5, 15, 0.98) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
}

.style-option {
    background: rgba(0, 123, 255, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Accessibility Focus Enhancement */
*:focus {
    outline: 3px solid #007bff !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(0, 123, 255, 0.3) !important;
}

/* Selection Enhancement */
::selection {
    background: rgba(0, 123, 255, 0.7) !important;
    color: #ffffff !important;
}

::-moz-selection {
    background: rgba(0, 123, 255, 0.7) !important;
    color: #ffffff !important;
}

/* Scrollbar Enhancement */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 30, 40, 0.8);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3, #003d82);
}