/*
 * SEMC Customizer — Breadcrumb Shortcode Styles
 *
 * All .semc-breadcrumb-* styles live here. This file is enqueued by
 * semc-customizer/includes/breadcrumb.php via wp_enqueue_style().
 *
 * DO NOT add inline <style> blocks in breadcrumb.php.
 * Edit this file for all breadcrumb appearance changes.
 *
 * Sections:
 *   1. Custom properties (tokens)
 *   2. Wrapper / nav
 *   3. List & items
 *   4. Links
 *   5. Current crumb
 *   6. Separator
 *   7. Home icon
 *   8. Hover & focus states
 *   9. Responsive
 */


/* ─────────────────────────────────────────────────────────────────
   1. Custom properties (design tokens)
   Inherit brand colours from the rest of the site; override with
   the custom class if needed.
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb {
    --bc-color-link:      #810081;          /* brand purple — linked crumbs   */
    --bc-color-link-hover:#6a006a;          /* darker on hover                */
    --bc-color-current:   #555555;          /* muted text for active crumb    */
    --bc-color-separator: #bdbdbd;          /* light grey separator           */
    --bc-color-icon:      #810081;          /* home icon colour               */
    --bc-font:            'Satoshi font', sans-serif;
    --bc-font-size:       14px;
    --bc-font-weight:     500;
    --bc-line-height:     1.4;
    --bc-gap:             6px;              /* space between icon and text    */
    --bc-item-gap:        4px;              /* space between crumbs+sep       */
    --bc-transition:      0.2s ease;
}


/* ─────────────────────────────────────────────────────────────────
   2. Wrapper / nav
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb {
    display: block;
    width: 100%;
}


/* ─────────────────────────────────────────────────────────────────
   3. List & items
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb__list {
    display:     flex;
    flex-wrap:   wrap;
    align-items: center;
    gap:         var(--bc-item-gap);
    list-style:  none;
    margin:      0;
    padding:     0;
}

.semc-breadcrumb__item {
    display:     flex;
    align-items: center;
    gap:         var(--bc-gap);
    font-family: var(--bc-font);
    font-size:   var(--bc-font-size);
    font-weight: var(--bc-font-weight);
    line-height: var(--bc-line-height);
    white-space: nowrap;
}


/* ─────────────────────────────────────────────────────────────────
   4. Links
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb__link {
    display:         flex;
    align-items:     center;
    gap:             var(--bc-gap);
    color:           var(--bc-color-link);
    text-decoration: none;
    transition:      color var(--bc-transition),
                     transform var(--bc-transition);
}

.semc-breadcrumb__link span {
    position:         relative;
    display:          inline-block;
}

/* Animated underline on hover */
.semc-breadcrumb__link span::after {
    content:          '';
    position:         absolute;
    left:             0;
    bottom:           -1px;
    width:            0;
    height:           1.5px;
    background-color: var(--bc-color-link-hover);
    transition:       width var(--bc-transition);
}

.semc-breadcrumb__link:hover,
.semc-breadcrumb__link:focus-visible {
    color:   var(--bc-color-link-hover);
    outline: none;
}

.semc-breadcrumb__link:hover span::after,
.semc-breadcrumb__link:focus-visible span::after {
    width: 100%;
}


/* ─────────────────────────────────────────────────────────────────
   5. Current crumb (non-linked, last item)
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb__current {
    display:     flex;
    align-items: center;
    gap:         var(--bc-gap);
    color:       var(--bc-color-current);
    font-weight: 400;
    max-width:   260px;
    overflow:    hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ─────────────────────────────────────────────────────────────────
   6. Separator
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb__separator {
    color:       var(--bc-color-separator);
    font-size:   12px;
    font-weight: 400;
    user-select: none;
    flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────────
   7. Home icon
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb__home-icon {
    display:      block;
    flex-shrink:  0;
    width:        14px;
    height:       14px;
    color:        var(--bc-color-icon);
    transition:   color var(--bc-transition),
                  transform var(--bc-transition);
}

.semc-breadcrumb__link:hover .semc-breadcrumb__home-icon,
.semc-breadcrumb__link:focus-visible .semc-breadcrumb__home-icon {
    color:     var(--bc-color-link-hover);
    transform: translateY(-1px);
}


/* ─────────────────────────────────────────────────────────────────
   8. Hover & focus ring (keyboard nav)
   ───────────────────────────────────────────────────────────────── */
.semc-breadcrumb__link:focus-visible {
    border-radius: 3px;
    box-shadow:    0 0 0 2px #810081, 0 0 0 4px rgba(129, 0, 129, 0.15);
}


/* ─────────────────────────────────────────────────────────────────
   9. Responsive — mobile
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .semc-breadcrumb {
        --bc-font-size: 12px;
    }

    .semc-breadcrumb__current {
        max-width: 160px;
    }
}
