/* Sentiment color system */
:root {
    --sentiment-white-bg: #cbcbcc;
    --sentiment-white-text: #495057;
    --sentiment-black-bg: #343a40;
    --sentiment-black-text: #ffffff;
    --sentiment-gray-bg: #6c757d;
    --sentiment-gray-text: #ffffff;
}

.badge-sentiment {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-sentiment-white {
    background-color: var(--sentiment-white-bg) !important;
    color: var(--sentiment-white-text) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.badge-sentiment-black {
    background-color: var(--sentiment-black-bg) !important;
    color: var(--sentiment-black-text) !important;
}

.badge-sentiment-gray {
    background-color: var(--sentiment-gray-bg) !important;
    color: var(--sentiment-gray-text) !important;
}
/* Add here all your CSS customizations */

/* Primary Color Override - Change from Blue to Red */
:root {
    --bs-primary: #dc3545;
    --bs-primary-rgb: 220, 53, 69;
    --bs-primary-hover: #bb2d3b;
    --bs-primary-active: #a02834;
    --bs-primary-focus: rgba(220, 53, 69, 0.25);
}

/* Porto Admin Custom Primary Colors */
.btn-primary {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #bb2d3b !important;
    border-color: #a02834 !important;
    color: white !important;
}

.btn-primary:active,
.btn-primary.active {
    background-color: #a02834 !important;
    border-color: #962c37 !important;
    color: white !important;
}

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

/* Badge Primary */
.badge.bg-primary,
.badge-primary {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Alert Primary */
.alert-primary {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.2) !important;
    color: #721c24 !important;
}

/* Text Primary */
.text-primary {
    color: #dc3545 !important;
}

/* Links */
a {
    color: #dc3545;
}

a:hover,
a:focus {
    color: #bb2d3b;
}

/* Border Primary */
.border-primary {
    border-color: #dc3545 !important;
}

/* Background Primary */
.bg-primary {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Form Controls Focus */
.form-control:focus {
    border-color: rgba(220, 53, 69, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Navigation Active States */
.nav-main .nav-link:hover,
.nav-main .nav-link:focus,
.nav-main .nav-active > .nav-link {
    color: #dc3545 !important;
}

/* Table Hover */
.table-hover tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.05) !important;
}

/* Progress Bar */
.progress-bar {
    background-color: #dc3545 !important;
}

/* Modal Header with Primary Background */
.modal-header.bg-primary {
    background-color: #dc3545 !important;
    border-bottom: 1px solid rgba(220, 53, 69, 0.2) !important;
}

/* Card Header Primary */
.card-header.bg-primary {
    background-color: #dc3545 !important;
    border-bottom: 1px solid rgba(220, 53, 69, 0.2) !important;
    color: white !important;
}

/* Pagination */
.page-link {
    color: #dc3545 !important;
}

.page-link:hover,
.page-link:focus {
    color: #bb2d3b !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
}

.page-item.active .page-link {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

/* Dropdown Items */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

/* Input Group Text */
.input-group-text {
    border-color: #ced4da;
}

.input-group:focus-within .input-group-text {
    border-color: rgba(220, 53, 69, 0.5) !important;
}

/* Sidebar Active Items */
.sidebar-left .nav-main .nav-active > .nav-link,
.sidebar-left .nav-main .nav-link:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

/* Tab Navigation */
.nav-tabs .nav-link.active {
    color: #dc3545 !important;
    border-bottom-color: #dc3545 !important;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: #bb2d3b !important;
}

/* Loading Spinner for Primary Buttons */
.btn-primary .bx-spin {
    color: white !important;
}

/* Porto Admin Specific Overrides */
/* Header and Sidebar Elements */
.page-header h2 {
    color: #dc3545 !important;
}

/* Breadcrumb Links */
.breadcrumbs a:hover {
    color: #bb2d3b !important;
}

/* Card Titles */
.card-title {
    color: #333 !important;
}

/* Focus States for All Interactive Elements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Table Striped Rows */
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Success and Error States */
.is-valid .form-control:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

.is-invalid .form-control:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Charts and Visual Elements */
.progress-bar-primary {
    background-color: #dc3545 !important;
}

/* Tooltips */
.tooltip-inner {
    background-color: #dc3545 !important;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="top"] .tooltip-arrow::before {
    border-top-color: #dc3545 !important;
}

.bs-tooltip-right .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="right"] .tooltip-arrow::before {
    border-right-color: #dc3545 !important;
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: #dc3545 !important;
}

.bs-tooltip-left .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="left"] .tooltip-arrow::before {
    border-left-color: #dc3545 !important;
}

/* Custom Primary Background for Icons */
.text-primary,
.text-primary i {
    color: #dc3545 !important;
}

/* Login Page Specific Overrides */
.body-sign .card-sign .card-title-sign .title {
    background-color: #dc3545 !important;
}

.body-sign .card-sign .card-body {
    border-top-color: #dc3545 !important;
}

/* Login Form Additional Styling */
.body-sign .card-sign {
    border-color: rgba(220, 53, 69, 0.1) !important;
}

.body-sign .card-sign .form-control:focus {
    border-color: rgba(220, 53, 69, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.body-sign .card-sign .checkbox-custom input[type="checkbox"]:checked + label:before {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.body-sign .card-sign .checkbox-custom input[type="checkbox"]:checked + label:after {
    color: white !important;
}

/* Login Links */
.body-sign .card-sign a {
    color: #dc3545 !important;
}

.body-sign .card-sign a:hover,
.body-sign .card-sign a:focus {
    color: #bb2d3b !important;
}

/* Social Login Buttons - Update Facebook button to use red theme */
.body-sign .btn-facebook {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.body-sign .btn-facebook:hover,
.body-sign .btn-facebook:focus {
    background-color: #bb2d3b !important;
    border-color: #a02834 !important;
    color: white !important;
}

/* Login Page Icon Color */
.body-sign .card-title-sign .title i {
    color: white !important;
}

/* Input Group Icons */
.body-sign .input-group-text {
    border-color: #ced4da;
}

.body-sign .form-control:focus + .input-group-text {
    border-color: rgba(220, 53, 69, 0.5) !important;
}

/* Login Page Focus States */
.body-sign .form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Additional High Specificity Overrides for Authentication Pages */
body .body-sign .card-sign .card-title-sign .title {
    background-color: #dc3545 !important;
    color: white !important;
}

body .body-sign .card-sign .card-body {
    border-top-color: #dc3545 !important;
}

body .body-sign .card-sign .btn-primary {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

body .body-sign .card-sign .btn-primary:hover {
    background-color: #bb2d3b !important;
    border-color: #a02834 !important;
}

/* Force Override any Porto Admin blue colors */
html .body-sign .card-sign .card-title-sign .title {
    background-color: #dc3545 !important;
}

html .body-sign .card-sign .card-body {
    border-top-color: #dc3545 !important;
}

html .body-sign .btn-primary {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #FFF !important;
}

html .body-sign .btn-primary:hover,
html .body-sign .btn-primary.hover {
    background-color: #bb2d3b !important;
    border-color: #a02834 !important;
    color: #FFF !important;
}

html .body-sign .btn-primary:focus,
html .body-sign .btn-primary.focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5) !important;
}

/* Global Progress Bar Styles */
.global-progress-bar {
    position: fixed;
    top: 60px; /* Adjust based on header height */
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    animation: slideDown 0.3s ease-out;
}

.global-progress-bar .progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.global-progress-bar .progress-info {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.global-progress-bar .progress-info span {
    font-size: 12px;
    line-height: 1.2;
}

.global-progress-bar #globalProgressText {
    font-weight: 500;
    color: #333;
}

.global-progress-bar #globalProgressPercentage {
    color: #666;
    font-weight: 600;
}

.global-progress-bar .progress {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.global-progress-bar .progress-bar {
    transition: width 0.3s ease;
    background-color: #dc3545 !important; /* Red theme */
}

.global-progress-bar .btn-close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.global-progress-bar .btn-close:hover {
    background-color: #f8f9fa;
    color: #333;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Adjust main content when progress bar is visible */
.body.global-progress-active .inner-wrapper {
    margin-top: 60px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .global-progress-bar {
        padding: 8px 15px;
    }

    .global-progress-bar .progress-container {
        gap: 10px;
    }

    .global-progress-bar .progress-info {
        min-width: 120px;
    }
}
