﻿/* --- Shared --- */
html {
    /*height: 100%;*/
}
body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    color: #000;
    padding-bottom: 100px;
    height: 100%;
}
.spinner-black {
    position: relative;
    width: 100%;
    height: 100%;
    background: url("/assets/spinner-black-ad10007b.gif") center center no-repeat;
    background-size: contain;
}

@media screen {
    .print-only {
        display: none;
    }
}

@media print {
    @page {
        margin-top: 50px;
        margin-bottom: 50px;
    }
    .no-print,
    .modal-backdrop {
        display: none !important;
    }
}

/* --- Utilities --- */
.checkbox-lg {
    width: 15px;
    height: 15px;
    vertical-align: middle;
}
.checkbox-xl {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.cursor-pointer {
    cursor: pointer;
}
.hover-bold:hover {
    font-weight: bold;
}

.letter-spaced {
    letter-spacing: 1px;
}
.font-small {
    font-size: 80%;
}

.table .thead-blue tr th {
    background-color: #2A6496;
    border-color: #2A6496;
}
.table-hover tbody tr:hover {
    background-color: rgba(42, 100, 150, 0.25) !important;
}

.border-blue {
    border: 2px solid #2A6496;
    border-radius: 3px;
}

.tooltip .arrow { display: none; }
.tooltip .tooltip-inner { background-color: #ffffdd; color: #000; border: 2px solid #317082; }

.popover { background-color: #ffffdd; color: #000; border: 2px solid #317082 !important; }
.popover .arrow { display: none; }
.popover .popover-header { background-color: #daeefe;  }
.popover .table thead th { background: #2a6496; color: #FFF; }
.popover .table tbody tr td { background: #daeefe; }
.popover .table tbody tr:nth-child(even) td { background: #e6fce4; }

/* --- Header --- */
#navbar {
    background-color: var(--empire-navy, #0C2340);
    border-bottom: none;
    padding-top: 15px;
    padding-bottom: 15px;
}
#navbar .container {
    position: relative;
}
#navbar .navbar-brand h1 {
    width: 430px;
    height: 0;
    padding-top: 60px;
    overflow: hidden;
    background-image: url("/assets/Empire-Auto-Parts-Logo-Portal-058f7903.png");
    background-size: contain;
    background-repeat: no-repeat;
}
#navbar .navbar-brand .h2 {
    font-size: 14px;
    margin-left: 65px;
    margin-top: -5px;
}
#navbar .navbar-nav .nav-link {
    color: #FFF;
}
#navbar .navbar-nav .nav-link:focus, #navbar .navbar-nav .nav-link:hover {
    color: #FFCC66;
}
#navbar .small-phone-number {
    /* Pinned top-right, on its own line ABOVE the nav menu (matches the legacy
       site). To avoid the overlap that occurs because Rails nav-links are
       two-line (icon over label), the menu is pushed down below this strip at
       >=1400px via the navbar-collapse padding rule below. Visibility is gated
       to >=1400px by empire-design-system.css. */
    position: absolute;
    top: 2px;
    right: 30px;
    color: #FFF;
    font-weight: 600;
    white-space: nowrap;
}

/* At >=1400px the phone number shows in the top-right strip; drop the right-side
   menu below it so the two don't overlap. Padding on navbar-collapse moves only
   the menu (the brand is a sibling, outside navbar-collapse). */
@media (min-width: 1400px) {
    #navbar .navbar-collapse {
        padding-top: 22px;
    }
}

#page {
    height: 100%;
}

/* --- Parts Search --- */
#wrapper-search-results {
    min-height: 500px;
}

/* --- Trix WYSIWYG (news editor) --- */
trix-editor.trix-content {
    min-height: 240px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: .375rem;
}
/* No upload backend — hide Trix's file-attach toolbar button.
   Double class to out-specify Trix's own .trix-button-group display rule
   (Trix's CSS loads after empire.css). */
trix-toolbar .trix-button-group.trix-button-group--file-tools {
    display: none;
}
/* Quiet help icon next to the Analytics title (opens the Guide offcanvas) */
.analytics-guide-btn {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.15rem;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
}
.analytics-guide-btn:hover,
.analytics-guide-btn:focus {
  color: #fff;
}

/* Unread indicator on the News feed (Empire gold, matches navbar badge). */
.news-new-badge {
  background-color: #f5b31c;
  color: #122744;
  font-size: 0.62em;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* News feed cards open their article: the whole card is the hit target via
   Bootstrap's stretched-link, so it must also read as one. */
.news-card {
  border: 1px solid var(--empire-gray-300);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.news-card:hover,
.news-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--empire-navy);
  /* Overrides Bootstrap's .shadow-sm, which declares !important. */
  box-shadow: 0 0.5rem 1rem rgba(12, 35, 64, 0.15) !important;
}
/* Keyboard users tab to the stretched title link; put the ring on the card so
   they see the same affordance a mouse user gets, not a sliver of outline. */
.news-card:focus-within {
  outline: 2px solid var(--empire-navy);
  outline-offset: 2px;
}
.news-card-link:focus-visible {
  outline: none;  /* the card already draws it — avoid a doubled ring */
}

/* Unread: gold left edge alongside the NEW badge. Decoration only — the badge
   carries the meaning in text. */
.news-card-unread {
  border-left: 4px solid var(--empire-gold);
}

.news-card-link {
  color: var(--empire-navy);
  text-decoration: none;
}
.news-card:hover .news-card-link,
.news-card:focus-within .news-card-link {
  text-decoration: underline;
}

.news-read-cue {
  color: var(--empire-navy);
  font-weight: 600;
  font-size: 0.9rem;
}
.news-card:hover .news-read-cue {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .news-card {
    transition: none;
  }
  .news-card:hover,
  .news-card:focus-within {
    transform: none;
  }
}
