/* GoodX Dynamic Theme - database-driven colour overrides (Odoo 19) */

/* ---- Tokens --------------------------------------------------------
   The five configured colours are published as custom properties so the
   stylesheets can CONSUME the database palette instead of guessing at it.

   Before this existed the rules below were the only channel, which meant
   anything they did not name kept whatever was hard-coded in SCSS - and the
   Odoo 8 layout had hard-coded #2b4d7e for the sidebar and its links. The
   result was a navbar painted the configured colour (#1D559D by default) with
   sidebar links beside it in a different blue, on every database, and no way
   to correct it from the theme configuration.

   No !important here on purpose: these are values, not overrides. The rules
   further down still need it because they are fighting Odoo's own stylesheets.
   ------------------------------------------------------------------- */
:root {
    --gx-primary: #714B67 ;
    --gx-primary-dark: #4A3A56;
    --gx-button: #017E84 ;
    --gx-link: #017E84 ;
    --gx-active: #8F8F8F;
}

/* ---- Top navbar ---------------------------------------------------- */
.o_main_navbar {
    background-color: #714B67  !important;
    border-bottom-color: #4A3A56 !important;
}
.o_main_navbar .dropdown-toggle.show,
.o_main_navbar .dropdown-toggle:hover,
.o_main_navbar .o_nav_entry:hover,
.o_main_navbar .o_menu_brand:hover,
.o_main_navbar > .o_menu_sections > *:hover {
    background-color: #4A3A56 !important;
}

/* ---- Primary buttons ----------------------------------------------- */
.btn-primary,
.o_form_button_save,
.o_list_button_save {
    background-color: #017E84  !important;
    border-color: #017E84  !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.o_form_button_save:hover,
.o_list_button_save:hover {
    background-color: #4A3A56 !important;
    border-color: #4A3A56 !important;
}
.btn-outline-primary,
.btn-link {
    color: #017E84  !important;
}
.btn-outline-primary:hover {
    background-color: #714B67  !important;
    border-color: #714B67  !important;
}

/* ---- Links and headings -------------------------------------------- */
/* :not(.o_priority_star) - the priority widget draws each star as an <a>, so
   it matched this rule and lost core's gold to the link blue.
   :not(.o_delete) - the x on a many2many tag is an <a> too; in link blue it
   vanished into the tag's blue badge. It keeps core's inherited tag colour. */
.o_content a:not(.btn):not(.o_priority_star):not(.o_delete),
.o_form_view a:not(.btn):not(.o_priority_star):not(.o_delete),
.o_field_widget a:not(.btn):not(.o_priority_star):not(.o_delete) {
    color: #017E84  !important;
}
.o_horizontal_separator:not(.text-danger),
.o_form_view .oe_title h1 {
    color: #714B67  !important;
}
.o_breadcrumb .active,
.breadcrumb-item.active {
    color: #714B67  !important;
}

/* ---- Form status bar ----------------------------------------------- */
/* The selected stage only; every other stage keeps core's own statusbar
   styling. Odoo 19 draws the caret as a clip-path polygon on the button, not
   an :after border triangle, so no :after rule is needed. */
.o_form_statusbar .o_arrow_button.o_arrow_button_current,
.o_statusbar_status .btn.o_arrow_button_current {
    background-color: #8F8F8F !important;
    color: #fff !important;
}

/* ---- Stat buttons (button box) ------------------------------------- */
.o_stat_button .o_button_icon,
.oe_stat_button .o_button_icon {
    color: #714B67  !important;
}
.o_stat_button:hover {
    background-color: #714B67  !important;
    color: #fff !important;
}
.o_stat_button:hover .o_button_icon,
.o_stat_button:hover .o_stat_value,
.o_stat_button:hover .o_stat_text {
    color: #fff !important;
}

/* ---- Search panel / facets ----------------------------------------- */
.o_searchview_facet .o_facet_values,
.o_searchview_facet .o_searchview_facet_label {
    background-color: #714B67  !important;
    color: #fff !important;
}
.o_search_panel .o_search_panel_category_value header.active,
.o_search_panel .list-group-item.active {
    color: #714B67  !important;
}
.o_cp_searchview:focus-within,
.o_searchview.focus-visible {
    border-color: #714B67  !important;
}

/* ---- Selected / active rows and tabs -------------------------------- */
.nav-tabs .nav-link.active,
.o_notebook .nav-link.active {
    color: #714B67  !important;
    border-bottom-color: #714B67  !important;
}
.o_list_table .o_data_row.o_data_row_selected,
.o_list_table tbody tr.table-info {
    background-color: #8F8F8F1a !important;
}

/* ---- Form controls -------------------------------------------------- */
.o_field_widget input:focus,
.o_field_widget textarea:focus,
.o_field_widget select:focus,
.form-control:focus {
    border-color: #714B67  !important;
    box-shadow: 0 0 0 .15rem #714B67 40 !important;
}
.form-check-input:checked {
    background-color: #714B67  !important;
    border-color: #714B67  !important;
}

/* ---- Kanban --------------------------------------------------------- */
.o_kanban_view .oe_kanban_action_button,
.o_kanban_view .btn-primary {
    background-color: #017E84  !important;
    border-color: #017E84  !important;
}
