/* Arkan Group Branding - Complete color override */
/* Replaces ALL Odoo default colors with Arkan Group brand colors */

/* === BRAND PALETTE ===
   Primary:   #206080 (Teal)
   Secondary: #208030 (Green)
   Dark:      #195570
   Light:     #e0f0f0
*/

/* === BUTTONS === */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.o_control_panel .btn-primary,
.o_form_statusbar .btn-primary,
.o_form_view .o_form_statusbar .btn-primary {
    background-color: #206080 !important;
    border-color: #195570 !important;
    color: #ffffff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #195570 !important;
}

.btn-success,
.btn-success:hover,
.btn-success:focus {
    background-color: #208030 !important;
    border-color: #186028 !important;
    color: #ffffff !important;
}

/* === NAVBAR === */
.o_main_navbar,
.navbar-dark,
.navbar.bg-primary,
header.o_navbar {
    background-color: #206080 !important;
}
.o_main_navbar .o_menu_brand,
.o_main_navbar .o_menu_sections .dropdown-toggle,
.o_main_navbar .o_menu_sections > li > a,
.o_navbar .nav-link {
    color: #ffffff !important;
}
.o_main_navbar .o_menu_sections .dropdown-toggle:hover,
.o_main_navbar .o_menu_sections > li > a:hover {
    background-color: rgba(255,255,255,0.15) !important;
}

/* === LINKS === */
a {
    color: #206080 !important;
}
a:hover {
    color: #195570 !important;
}

/* === TABS === */
.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
    color: #206080 !important;
    border-bottom-color: #206080 !important;
    background-color: transparent !important;
}

/* === SELECTED ROWS === */
.o_list_view .o_data_row.o_data_row_selected,
.o_kanban_record.o_record_selected,
.o_list_renderer .o_data_row.o_data_row_selected > * {
    background-color: rgba(32, 96, 128, 0.15) !important;
}

/* === CHECKBOXES / RADIOS === */
.form-check-input:checked,
.form-check-input[type="checkbox"]:checked,
.form-check-input[type="radio"]:checked {
    background-color: #206080 !important;
    border-color: #206080 !important;
}

/* === MODAL === */
.modal-header,
.modal-title {
    background-color: #206080 !important;
    color: #ffffff !important;
}
.modal-header .btn-close {
    filter: invert(1) brightness(2);
}

/* === PROGRESS BAR === */
.progress-bar {
    background-color: #206080 !important;
}

/* === APP SWITCHER / HOME MENU === */
.o_app_switcher .o_app_name,
.o_home_menu .o_app .o_app_name,
.o_home_menu .o_app .o_app_icon {
    color: #206080 !important;
}

/* === CONTROL PANEL === */
.o_control_panel .o_cp_buttons .btn-primary,
.o_control_panel .btn-primary {
    background-color: #206080 !important;
}

/* === SIDEBAR / FORM STATUSBAR === */
.o_form_view .o_form_statusbar .o_form_status_indicator .btn-primary {
    background-color: #206080 !important;
}

/* === SETTINGS === */
.o_setting_container .o_setting_container_header .btn-primary,
.o_settings_form .btn-primary {
    background-color: #206080 !important;
}

/* === FOCUS === */
.form-control:focus,
.form-select:focus,
.form-control.is:focus {
    border-color: #206080 !important;
    box-shadow: 0 0 0 0.2rem rgba(32, 96, 128, 0.25) !important;
}

/* === BADGE === */
.badge.bg-primary,
.badge-primary {
    background-color: #206080 !important;
    color: #ffffff !important;
}

/* === ALERT === */
.alert-primary {
    background-color: rgba(32, 96, 128, 0.1) !important;
    border-color: #206080 !important;
    color: #206080 !important;
}

/* === DROPDOWN === */
.dropdown-item.active,
.dropdown-item:active,
.dropdown-item:focus {
    background-color: #206080 !important;
    color: #ffffff !important;
}

/* === PAGINATION === */
.page-item.active .page-link {
    background-color: #206080 !important;
    border-color: #206080 !important;
}

/* === DASHBOARD CARDS === */
.o_dashboard .o_dashboard_graph,
.o_kanban_view .o_kanban_record {
    border-color: #206080 !important;
}

/* === REPLACE ALL PURPLE/VIOLET (#714B67, #875A7B, #704060, #706090, #905080) === */
/* These are Odoo's default brand colors that appear in various places */

/* Settings panel headers */
.o_setting_container .o_setting_container_header,
.o_settings_form .o_setting_container_header {
    color: #206080 !important;
}

/* App icons backgrounds in home menu */
.o_home_menu .o_app .o_app_icon,
.o_app_switcher .o_app .o_app_icon {
    background-color: #206080 !important;
}

/* Kanban card headers */
.o_kanban_record .oe_kanban_card_heading {
    color: #206080 !important;
}

/* Graph/Chart colors */
.o_graph_view .o_graph_canvas_container canvas {
    /* Chart colors are set via JS, covered by backend CSS override */
}

/* Report builder / settings sections */
.o_settings_form .o_setting_container .o_setting_container_header h5,
.o_settings_form .o_setting_container .o_setting_container_header .o_setting_container_title {
    color: #206080 !important;
}

/* Tags / Labels */
.o_tag.o_tag_color-1,
.o_field_many2manytags .o_tag.bg-1 {
    background-color: #206080 !important;
}

/* Form status indicator */
.o_form_status_indicator .o_arrow_button.btn-primary,
.o_form_status_indicator .o_arrow_button:first-child {
    background-color: #206080 !important;
}

/* Company dropdown in navbar */
.o_menu_companies .dropdown-item.active,
.o_menu_companies .dropdown-item:active {
    background-color: #206080 !important;
}

/* Search panel / filters */
.o_search_panel .o_search_panel_filter .active,
.o_searchview_facet .o_searchview_facet_label {
    background-color: #206080 !important;
    border-color: #206080 !important;
}

/* Calendar */
.o_calendar_view .o_calendar_widget .fc-event {
    background-color: #206080 !important;
    border-color: #206080 !important;
}

/* Pivot / Graph view headers */
.o_pivot_view table thead th,
.o_pivot_view table tbody th {
    background-color: #206080 !important;
    color: #ffffff !important;
}

/* Action buttons in kanban */
.o_kanban_view .o_kanban_record .oe_kanban_action_buttons .btn-primary {
    background-color: #206080 !important;
}

/* Webiste/App store cards */
.o_module_card .o_module_action_btn .btn-primary,
.o_module_card .btn-primary {
    background-color: #206080 !important;
}

/* Any element with inline purple style */
[style*="background-color: #714B67"],
[style*="background-color: #714b67"],
[style*="background-color:#714B67"],
[style*="background-color:#714b67"],
[style*="background-color: #875A7B"],
[style*="background-color: #875a7b"],
[style*="background:#714B67"],
[style*="background:#714b67"],
[style*="background: #714B67"],
[style*="background: #714b67"],
[style*="background-color: #704060"],
[style*="background-color: #706090"],
[style*="background-color: #905080"],
[style*="color: #714B67"],
[style*="color: #714b67"],
[style*="color: #875A7B"],
[style*="color: #875a7b"] {
    background-color: #206080 !important;
    color: #ffffff !important;
}

/* Company logo area / header */
.o_company_label,
.o_menu_companies .o_menu_companies_label {
    color: #ffffff !important;
}

/* Buttons in toolbar */
.o_toolbar .btn-primary,
.btn-icon.btn-primary {
    background-color: #206080 !important;
}

/* Chatter / Mail compose */
.o_Chatter .o_Chatter_composerButton,
.o_mail_composer .btn-primary {
    background-color: #206080 !important;
}

/* Discuss sidebar */
.o_Discuss_sidebar .o_Discuss_sidebar_item.active,
.o_Discuss_sidebar .o_Discuss_sidebar_item:hover {
    background-color: rgba(32, 96, 128, 0.1) !important;
}

/* Tooltip */
.tooltip .tooltip-inner {
    background-color: #206080 !important;
}
.tooltip .arrow::before {
    border-top-color: #206080 !important;
}

/* Spinner / Loading */
.o_loading .o_loading_msg {
    background-color: #206080 !important;
}

/* Switch toggle */
.o_switch input:checked + .o_switch_slider {
    background-color: #206080 !important;
}


/* === ACTIVE MENU ITEMS IN NAVBAR === */
/* Odoo uses rgb(113, 99, 158) #71639E for active nav items */
.o_main_navbar .o_menu_sections .o-dropdown-item.active,
.o_main_navbar .o_menu_sections .dropdown-item.active,
.o_main_navbar .o-dropdown-item.active,
.o_main_navbar .dropdown-item.active,
.o_main_navbar .o-nav-en.active,
.o_nav_en.active,
.o-dropdown-item.active,
.dropdown-item.o-navigable.active,
.o_main_navbar a.o-navigable[aria-current="page"],
.o_main_navbar .o_menu_sections > .dropdown.show > .dropdown-toggle,
.o_main_navbar .o_menu_sections .dropdown.show .dropdown-toggle,
.o_main_navbar .o_menu_sections .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Any element with rgb(113, 99, 158) background */
[style*="background-color: rgb(113, 99, 158)"],
[style*="background-color: rgb(113,99,158)"],
[style*="background-color:#71639E"],
[style*="background-color: #71639E"],
[style*="background-color:#71639e"],
[style*="background-color: #71639e"] {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Brand text in navbar (the current app name) */
.o_main_navbar .o_menu_brand,
.o-dropdown-item.o_menu_brand {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Apps menu dropdown - home menu button */
.o_navbar_apps_menu .dropdown-toggle,
.o_navbar_apps_menu .o-dropdown {
    background-color: transparent !important;
}
.o_navbar_apps_menu .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Fix: override the #71639E color used by OWL components */
.o-dropdown--menu .o-dropdown-item.active,
.o-dropdown--menu .dropdown-item.active,
.o-dropdown .o-dropdown-item[aria-current="true"],
.o-dropdown .dropdown-item[aria-current="true"] {
    background-color: #206080 !important;
    color: #ffffff !important;
}


/* === HIGH SPECIFICITY: Active nav items in menu sections === */
/* Override Odoo's #71639E (rgb(113,99,158)) for active menu items */
.o_main_navbar .o_menu_sections .o_nav_entry,
.o_main_navbar .o_menu_sections .o-dropdown-item.o_nav_entry,
.o_main_navbar .o_menu_sections .dropdown-item.o_nav_entry,
.o_main_navbar .o_menu_sections .o-dropdown.o_nav_entry,
.o_main_navbar .o_menu_sections .o-nav_entry,
.o_main_navbar .o-nav-en {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.o_main_navbar .o_menu_sections .o_nav_entry:hover,
.o_main_navbar .o_menu_sections .o-dropdown-item.o_nav_entry:hover,
.o_main_navbar .o_menu_sections .dropdown-item.o_nav_entry:hover,
.o_main_navbar .o_menu_sections .o-dropdown.o_nav_entry:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Active state */
.o_main_navbar .o_menu_sections .o_nav_entry.active,
.o_main_navbar .o_menu_sections .o-dropdown-item.o_nav_entry.active,
.o_main_navbar .o_menu_sections .dropdown-item.o_nav_entry.active,
.o_main_navbar .o_menu_sections .o-dropdown.o_nav_entry.active,
.o_main_navbar .o_menu_sections .show > .o_nav_entry,
.o_main_navbar .o_menu_sections .dropdown.show > .o-dropdown.o_nav_entry {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* === OVERRIDE ALL #71639E / rgb(113,99,158) === */
/* Use attribute selector to catch any element with this color */
.o_main_navbar .o_menu_sections * {
    /* Reset all nav section items to transparent/white */
}

/* Force override for any element that Odoo sets to #71639E */
.o_main_navbar a[style*="background"],
.o_main_navbar button[style*="background"],
.o_main_navbar .o_menu_sections a,
.o_main_navbar .o_menu_sections button {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.o_main_navbar .o_menu_sections a:hover,
.o_main_navbar .o_menu_sections button:hover,
.o_main_navbar .o_menu_sections .show > a,
.o_main_navbar .o_menu_sections .show > button,
.o_main_navbar .o_menu_sections a.active,
.o_main_navbar .o_menu_sections button.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* The menu brand (current app name) should be white */
.o_main_navbar .o_menu_brand {
    background-color: transparent !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}


/* === OVERRIDE ODOO CSS CUSTOM PROPERTIES (CSS VARIABLES) === */
/* This is the most effective way - change the root variables Odoo uses */
:root {
    --o-primary: #206080 !important;
    --o-brand-primary: #206080 !important;
    --o-brand-secondary: #208030 !important;
    --o-navbar-bg: #206080 !important;
    --o-component-active-bg: #206080 !important;
    --o-component-active-color: #ffffff !important;
    --o-link: #206080 !important;
    --o-focus: rgba(32, 96, 128, 0.25) !important;
    --bs-primary: #206080 !important;
    --bs-primary-rgb: 32, 96, 128 !important;
    --bs-link-color: #206080 !important;
    --bs-link-hover-color: #195570 !important;
}

/* Also set on body and html */
html, body {
    --o-primary: #206080 !important;
    --o-brand-primary: #206080 !important;
    --o-brand-secondary: #208030 !important;
    --o-navbar-bg: #206080 !important;
    --bs-primary: #206080 !important;
    --bs-primary-rgb: 32, 96, 128 !important;
}

/* Override the specific #71639E color used in navbar */
.o_main_navbar {
    background-color: #206080 !important;
    --o-navbar-bg: #206080 !important;
}

/* Force ALL navbar children to be transparent or teal */
.o_main_navbar a,
.o_main_navbar button,
.o_main_navbar .o-dropdown-item,
.o_main_navbar .dropdown-item,
.o_main_navbar .o-dropdown,
.o_main_navbar .dropdown-toggle {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.o_main_navbar a:hover,
.o_main_navbar button:hover,
.o_main_navbar .o-dropdown-item:hover,
.o_main_navbar .dropdown-item:hover,
.o_main_navbar .show > a,
.o_main_navbar .show > button,
.o_main_navbar .dropdown.show > .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Menu brand */
.o_main_navbar .o_menu_brand {
    color: #ffffff !important;
    font-weight: 700 !important;
    background-color: transparent !important;
}
