/* -------------------------------------------------------------------------------- */
/* Theme 3: Gray Professional (Bloomberg Style) */
/* -------------------------------------------------------------------------------- */

body.theme-gray-professional {
    background: #f0f0f0 !important;

    #grp-navigation {
        background: #404040 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);

        ul#navigation-menu li a {
            color: #e8e8e8 !important;
            border-right: 1px solid #333333;
            border-left: 1px solid #4a4a4a;
        }

        ul#navigation-menu li a:hover,
        ul#navigation-menu li.over > a {
            background-color: #4a4a4a !important;
            color: #ff6939 !important;
        }

        ul#navigation-menu li ul {
            background: #4a4a4a !important;
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);

            li {
                background: #4a4a4a !important;
                border-top: 1px solid #5a5a5a;

                a {
                    background-color: #4a4a4a !important;
                    color: #e8e8e8 !important;
                    border-left: 3px solid transparent;

                    &:hover {
                        background-color: #555555 !important;
                        border-left: 3px solid #ff6939 !important;
                        color: #ff6939 !important;
                    }
                }
            }
        }

        ul#navigation-menu li.has-columns ul {
            background: #4a4a4a !important;
            border: 1px solid #5a5a5a;

            li {
                background: #4a4a4a !important;

                a {
                    background-color: #4a4a4a !important;
                    border-bottom: 1px solid #5a5a5a;

                    &:hover {
                        background-color: #555555 !important;
                        border-left: 3px solid #ff6939 !important;
                    }
                }
            }
        }

        ul#navigation-menu li.menu-icon-user ul li:first-child a {
            background-color: #555555 !important;
        }
    }

    /* Context navigation for Gray Professional theme */
    #grp-context-navigation {
        background: #f5f5f5 !important;
        border-bottom: 1px solid #e0e0e0 !important;

        ul li {
            color: #757575 !important;

            a {
                color: #424242 !important;

                &:hover {
                    color: #ff6939 !important;
                }
            }
        }
    }

    /* Buttons for Gray Professional theme */
    .grp-button {
        background-image: none !important;
        background: #ff6939 !important;
        border: 1px solid #e5502a !important;
        color: #ffffff !important;

        &:hover {
            background: #e5502a !important;
            border: 1px solid #cc3d1a !important;
        }

        &.grp-default {
            background: #5a5a5a !important;
            border: 1px solid #4a4a4a !important;
            color: #e8e8e8 !important;

            &:hover {
                background: #4a4a4a !important;
                border: 1px solid #404040 !important;
            }
        }
    }

    /* Fixed footer for Gray Professional theme */
    .grp-fixed-footer {
        background-image: none !important;
        background: #404040 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;

        .grp-button {
            background: #ff6939 !important;
            border: 1px solid #e5502a !important;

            &:hover {
                background: #e5502a !important;
            }
        }
    }

    /* Body and general styles for Gray Professional */
    .grp-collapse {
        border: 1px solid #5a5a5a !important;
        background: #4a4a4a !important;

        &.grp-open {
            background: #555555 !important;
        }
    }

    .fieldset.grp-module .grp-row label {
        color: #2a2a2a !important;
    }

    .grp-module .grp-row:not(tr) {
        border-bottom: 1px solid #e0e0e0 !important;
        background: #ffffff !important;

        &:hover {
            background: #f5f5f5 !important;
        }
    }

    /* Select2 styles for Gray Professional */
    .select2-container--default .select2-selection--single {
        background: #ffffff !important;
        border: 1px solid #5a5a5a !important;

        .select2-selection__rendered {
            color: #2a2a2a !important;
        }
    }

    .select2-container--default .select2-results__option--highlighted[aria-selected] {
        background: #ff6939 !important;
        color: #ffffff !important;
    }

    .select2-dropdown {
        background: #ffffff !important;
        border: 1px solid #5a5a5a !important;
    }

    .select2-container--default .select2-search--dropdown .select2-search__field {
        background: #ffffff !important;
        border: 1px solid #5a5a5a !important;
        color: #2a2a2a !important;
    }

    /* Filter panel styles for Gray Professional theme */
    .filter-panel .filter-panel-content .filter-group .filter-title.filter-collapsible.has-selection {
        border-left-color: #ff6939 !important;
        background: linear-gradient(135deg, #ffe8e0 0%, #ffd9cc 100%) !important;

        &:hover {
            background: linear-gradient(135deg, #ffd9cc 0%, #ffcab8 100%) !important;
        }

        .selected-filter-value {
            color: #e5502a !important;
        }
    }

    /* Support button for Gray Professional theme */
    .bpp-support-button {
        background-color: #ff6939 !important;
        color: #ffffff !important;

        &:hover {
            background-color: #e5502a !important;
        }

        &:focus {
            outline: 2px solid #ffc4b0 !important;
        }
    }

    /* Link colors for Gray Professional theme */
    a {
        color: #17a2b8 !important; /* Teal for professional look */

        &:hover {
            color: #138496 !important;
        }
    }

    /* Info message colors for Gray Professional theme */
    .grp-info,
    ul.grp-messagelist li.info {
        background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%) !important;
        border-left: 3px solid #17a2b8 !important;
        color: #006064 !important;

        a {
            color: #138496 !important;
            font-weight: bold !important;

            &:hover {
                color: #0c5460 !important;
            }
        }
    }

    /* Menu icon styles for Gray Professional theme */
    .menu-icon {
        background-color: #ff6939 !important;
    }

    .menu-click-item:hover .menu-icon {
        background-color: #e5502a !important;
    }

    /* Add link and focus state buttons for Gray Professional theme */
    .grp-add-link {
        background: #ff6939 !important;
        color: #ffffff !important;
        border: 1px solid #e5502a !important;

        &:hover {
            background: #e5502a !important;
            border: 1px solid #cc3d1a !important;
            color: #ffffff !important;
        }
    }

    .grp-state-focus {
        background: #555555 !important;
        color: #ff6939 !important;
        border: 2px solid #ff6939 !important;

        &:hover {
            background: linear-gradient(#ff6939, #e55a2e) !important;
            color: #ffffff !important;
        }
    }

    ul.grp-object-tools li a {
        background: #555555 !important;
        color: #ff6939 !important;
        border: 2px solid #ff6939 !important;

        &:hover {
            background: linear-gradient(#ff6939, #e55a2e) !important;
            color: #ffffff !important;
            border-color: #e55a2e !important;
        }
    }

    // Zachowaj ikonę strzałki dla linków zewnętrznych
    ul.grp-object-tools li a[target="_blank"],
    ul.grp-object-tools li a.grp-viewsite-link {
        background: url('/static/grappelli/images/icons-s79f97b581c.png') 0 -935px no-repeat,
                    #555555 !important;

        &:hover {
            background: url('/static/grappelli/images/icons-s79f97b581c.png') 0 -935px no-repeat,
                        linear-gradient(#ff6939, #e55a2e) !important;
        }
    }

    // Usuń tło dla przycisku dodawania (ma własne tło z Grappelli)
    ul.grp-object-tools li a.grp-add-link {
        background: none !important;
        border: none !important;
    }
}
