/*!
 * Copyright (c) 2024-2026 STMicroelectronics.
 * All rights reserved.
 * This software is licensed under terms that can be found in the LICENSE file
 * in the root directory of this software component.
 * If no LICENSE file comes with this software, it is provided AS-IS.
 * SPDX-License-Identifier: SLA0044
 */
/**
 * Parent Document Navigation Styles
 *
 * Styles for the parent navigation icon in the header, allowing users to
 * navigate up to parent documentation in hierarchical documentation structures.
 */

/* Parent navigation link in header — ghost/outline style */
.sy-parent-doc-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.875rem;
    margin-left: 0.75rem;
    color: #03234B;
    text-decoration: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 3px;
    background-color: transparent;
    border: 2px solid #03234B;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    /* Minimum touch target size for accessibility */
    min-width: 2.25rem;
    min-height: 2.25rem;
}

/* Remove theme-specific shadows */
html.light .sy-parent-doc-link,
html.dark .sy-parent-doc-link {
    box-shadow: none;
}

/* Dark mode: use light border and text to stand out on dark header background */
html.dark .sy-parent-doc-link {
    color: #e8f3ff;
    border-color: #e8f3ff;
}

.sy-parent-doc-link:hover {
    background-color: #E0ECFF;
    color: #03234B;
    border-color: #03234B;
}

.sy-parent-doc-link:active {
    background-color: #FFF;
    color: #03234B;
    border-color: #03234B;
}

.sy-parent-doc-link:hover .sy-parent-doc-text {
    text-decoration: none;
}

/* Focus states - maintain visibility but adapt to new color scheme */
.sy-parent-doc-link:focus-visible {
    outline: 2px solid #03234B;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(3, 35, 75, 0.25);
}

/* Icon sizing for SVG image */
.sy-parent-doc-link .sy-parent-doc-icon {
    width: 0.9rem;
    height: 0.9rem;
    display: block;
    /* Dark navy (#03234B) to match ghost border */
    filter: brightness(0) saturate(100%) invert(7%) sepia(59%) saturate(3166%) hue-rotate(196deg) brightness(95%) contrast(102%);
}

/* Dark mode: icon matches light border/text color */
html.dark .sy-parent-doc-link .sy-parent-doc-icon {
    filter: brightness(0) invert(1);
}

/* Icon color on hover/active: stays dark navy (fill bg is already light) */
.sy-parent-doc-link:hover .sy-parent-doc-icon,
.sy-parent-doc-link:active .sy-parent-doc-icon {
    filter: brightness(0) saturate(100%) invert(7%) sepia(59%) saturate(3166%) hue-rotate(196deg) brightness(95%) contrast(102%);
}

/* Text variant styling */
.sy-parent-doc-link .sy-parent-doc-text {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25;
    font-weight: 600;
    text-decoration: none;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .sy-parent-doc-link {
        margin-left: 0.5rem;
        padding: 0.375rem;
    }
}
