/*
CSS Red Diamond Theme — structural overrides for ALL customer pages.
v2 — fixed full-width dark sections (no z-index stacking issue).
*/

/* ====  Prevent horizontal scroll from 100vw sections  ==== */
body.cust-help {
    overflow-x: hidden;
}

/* ====  Header — charcoal background with red bottom accent  ==== */
.cust-help .header {
    border-bottom: 3px solid #c41b1b !important;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.45) !important;
}

/* ==========================================================================
   SEARCH / HERO SECTIONS
   .help-search appears on: index, my-tickets, view-category, search-results.
   Full-width dark background achieved by stretching the element itself
   (width:100vw + left:50% + translateX(-50%)) — no z-index tricks needed.
   ========================================================================== */

.help-search {
    /* Full-width regardless of parent container width */
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;

    background: linear-gradient(160deg, #1a1d22 0%, #2e3239 60%, #3a1010 100%);
    border-bottom: 3px solid #c41b1b;
    padding: 24px 15px 28px;
    margin-bottom: 24px;
}

/* Index page: hero size + diagonal bottom cut */
.page-index .help-search {
    padding-top: 36px;
    padding-bottom: 80px;
    margin-bottom: 30px;
    border-bottom: none;
}

/*
  Diagonal cut on index hero:
  A page-coloured triangle overlaid on the bottom of the dark section,
  creating the angled edge that matches the CSS brand image.
*/
.page-index .help-search::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #f0f0f2;   /* matches --main-background */
    /* Triangle: bottom-left corner → top-right corner → bottom-right corner */
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    pointer-events: none;
}

/* Search title — white on dark hero */
.search__title {
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* Search form — transparent; dark bg is on .help-search itself now */
.search__form {
    background: transparent !important;
    padding: 12px 0 !important;
}

/* Red left accent + sharp corners on search inputs */
.search__form .form-group input {
    border-left: 3px solid #c41b1b !important;
    border-radius: 0 !important;
}

/* ==========================================================================
   NAVLINK CARDS — diamond-cut corners + red left border
   Used on: index.php, category-select.php
   ========================================================================== */

.navlink {
    position: relative;
    border-left: 4px solid #c41b1b !important;
    border-radius: 0 !important;
    /* Diamond cut: top-right and bottom-left corners angled at 22px */
    clip-path: polygon(
        0 0,
        calc(100% - 22px) 0,
        100% 22px,
        100% 100%,
        22px 100%,
        0 calc(100% - 22px)
    ) !important;
    box-shadow: none !important;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
    transition: transform 0.18s ease, filter 0.18s ease !important;
}

.navlink:hover {
    transform: translateY(-4px) !important;
    background-color: #fff5f5 !important;
    filter: drop-shadow(0 10px 18px rgba(196, 27, 27, 0.28)) !important;
}

/* Red gradient top stripe clipped to diamond shape */
.navlink::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c41b1b 0%, #e63333 50%, #8b0000 100%);
    z-index: 1;
}

.navlink .navlink__title {
    color: #2e3239 !important;
    font-size: 15px !important;
}

/* ==========================================================================
   ICON CIRCLES — sharp corners, CSS red
   ========================================================================== */

.icon-in-circle {
    border-radius: 2px !important;
    background-color: #c41b1b !important;
    box-shadow: 2px 2px 0 rgba(139, 0, 0, 0.4) !important;
}

.navlink:hover > .icon-in-circle {
    background-color: #8b0000 !important;
}

/* ==========================================================================
   ARTICLE / SECTION HEADINGS — dark charcoal bar
   Used on: index (KB section), login, register, create-ticket,
            view-ticket, profile, etc.
   ========================================================================== */

article.article {
    border-radius: 0 !important;
    overflow: hidden;
    border-top: 3px solid #c41b1b;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.article__heading,
h1.article__heading,
h2.article__heading {
    background: linear-gradient(135deg, #2e3239 0%, #1a1d22 100%) !important;
    margin: 0 !important;
    padding: 16px !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    border-top: 3px solid #c41b1b;
}

.article__heading a,
.article__heading > span:not(.icon-in-circle) {
    color: #ffffff !important;
    text-decoration: none;
}

.article__heading .icon-in-circle {
    background-color: #c41b1b !important;
}

h1.article__heading--form {
    margin-bottom: 16px !important;
}

/* KB block heads (category view, view-article) */
.block__head {
    background: linear-gradient(135deg, #2e3239 0%, #1a1d22 100%) !important;
    border-top: 3px solid #c41b1b !important;
    border-radius: 0 !important;
    padding: 16px !important;
}

.block__head .h-3,
.block__head h1,
.block__head h2,
.block__head h3,
.block__head .kb--folder a {
    color: #ffffff !important;
}

.block__head .icon-in-circle {
    background-color: #c41b1b !important;
}

/* ==========================================================================
   KNOWLEDGE BASE — previews, tabs, article footer
   ========================================================================== */

a.preview {
    border-radius: 0 !important;
    border-left: 3px solid transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

a.preview:hover {
    border-left-color: #c41b1b !important;
    background-color: #fff5f5 !important;
}

.preview__title {
    color: #c41b1b !important;
}

/* KB tabs — angular diamond-cut shape */
.tabbed__head .tabbed__head_tabs li {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%) !important;
    border-radius: 0 !important;
    background: #3d4248 !important;
    color: #cdd0d5 !important;
    transition: background 0.15s ease !important;
}

.tabbed__head .tabbed__head_tabs li.current {
    background: #c41b1b !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.article__footer {
    background: #f5f2f2;
    border-top: 1px solid #e8e0e0;
    padding: 16px !important;
}

/* ==========================================================================
   BUTTONS — red, angular
   ========================================================================== */

.btn--blue-border {
    clip-path: polygon(
        0 0,
        calc(100% - 14px) 0,
        100% 14px,
        100% 100%,
        14px 100%,
        0 calc(100% - 14px)
    ) !important;
    border-radius: 0 !important;
    background-color: #c41b1b !important;
    color: #ffffff !important;
    border-color: #8b0000 !important;
}

.btn--blue-border:hover {
    background-color: #8b0000 !important;
}

.btn-full,
input[type="submit"],
button[type="submit"] {
    background-color: #c41b1b !important;
    color: #ffffff !important;
    border-color: #8b0000 !important;
    border-radius: 0 !important;
}

.btn-full:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: #8b0000 !important;
}

/* ==========================================================================
   TICKET VIEW PAGE
   ========================================================================== */

.ticket__body_block {
    border-radius: 0 !important;
    border-left: 3px solid #c41b1b;
}

.ticket__body_block .block--head {
    background: linear-gradient(135deg, #2e3239 0%, #1a1d22 100%) !important;
    color: #ffffff !important;
    border-radius: 0 !important;
}

.ticket__body_block .block--head .contact b {
    color: #e63333 !important;
}

/* Staff reply blocks — green accent preserved */
.ticket__body_block.response {
    border-left: 3px solid #22a354 !important;
}

.ticket__body_block.response .block--head {
    background: linear-gradient(135deg, #1a3d2a 0%, #0e2a1a 100%) !important;
}

.ticket__body_block.response .block--head .contact b {
    color: #38bc7d !important;
}

.ticket__body_block h1 {
    color: #c41b1b !important;
}

/* ==========================================================================
   TABLE — dark charcoal header
   ========================================================================== */

.table-wrap .table thead {
    background-color: #2e3239 !important;
}

/* ==========================================================================
   FORMS — red focus accents, sharp corners
   ========================================================================== */

.form-control:focus {
    border-color: #c41b1b !important;
    box-shadow: 0 0 0 2px rgba(196, 27, 27, 0.15) !important;
    outline: none !important;
}

.label {
    color: #2e3239 !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   STEP BAR — ticket wizard progress
   ========================================================================== */

.step-bar__item.is-active .step-bar__circle,
.step-bar__item.is-done .step-bar__circle {
    background-color: #c41b1b !important;
    border-color: #8b0000 !important;
}

/* ==========================================================================
   BACKGROUND — subtle diagonal-stripe pattern
   ========================================================================== */

.cust-help .main__content {
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 28px,
            rgba(196, 27, 27, 0.025) 28px,
            rgba(196, 27, 27, 0.025) 56px
        ) !important;
}

/* ==========================================================================
   MISC
   ========================================================================== */

.notification {
    border-radius: 0 !important;
}

.select__title {
    color: #2e3239 !important;
}

#cc-link a {
    color: #c41b1b !important;
}

.footer a {
    color: #c41b1b !important;
}

.breadcrumbs a,
.breadcrumb a {
    color: #c41b1b !important;
}

.breadcrumbs a:hover,
.breadcrumb a:hover {
    color: #8b0000 !important;
}

/* ==========================================================================
   KNOWLEDGE BASE — MODERN CARD REDESIGN
   Targets: .page-view-category | .page-view-article | .page-search-results
   CSS Red Diamond Theme — Consolidated Shipping Services
   ========================================================================== */

/* ---- CATEGORY GRID CARDS ---- */
.page-view-category .content {
    margin: 20px 0 28px;
}

.page-view-category .topics {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin-bottom: 28px;
}

@media (max-width: 900px) {
    .page-view-category .topics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .page-view-category .topics { grid-template-columns: 1fr; }
}

/* Override PHP-injected inline width */
.page-view-category .topics .topics__block { width: 100% !important; }

.page-view-category .topics__block {
    margin-bottom: 0 !important;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-top: 3px solid #c41b1b;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.page-view-category .topics__block:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(196,27,27,0.18);
}

.page-view-category .topics__title {
    background: linear-gradient(135deg, #2e3239 0%, #1a1d22 100%);
    color: #fff !important;
    padding: 12px 14px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-height: 48px;
}

.page-view-category .topics__title .icon {
    fill: #c41b1b !important;
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    margin-right: 0 !important;
}

.page-view-category .topics__title > span:not(.kb-cat-count) {
    flex: 1;
    min-width: 0;
}

.page-view-category .topics__title .title-link {
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-view-category .topics__title .title-link:hover {
    color: #ffc5c5 !important;
    text-decoration: none !important;
}

/* Article count badge */
.kb-cat-count {
    background: rgba(196, 27, 27, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.4px;
    flex-shrink: 0;
    margin-left: auto;
}

.page-view-category .topics__list {
    padding: 10px 14px 14px !important;
    margin: 0 !important;
    flex: 1;
    list-style: none;
}

.page-view-category .topics__list li {
    padding-left: 14px;
    position: relative;
}

.page-view-category .topics__list li::before {
    background-color: #c41b1b !important;
    width: 5px;
    height: 5px;
    left: 0;
    top: 0.65em;
}

.page-view-category .topics__list li.text-bold::before {
    display: none;
}

.page-view-category .topics__list a {
    display: block;
    margin: 5px 0 !important;
    font-size: 13px;
    color: #525760 !important;
    line-height: 1.4;
    transition: color 0.12s ease, padding-left 0.12s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-view-category .topics__list a:hover {
    color: #c41b1b !important;
    padding-left: 4px;
}

.page-view-category .topics__list li.text-bold a {
    color: #c41b1b !important;
    font-weight: 700 !important;
    font-size: 12px;
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
}

/* Category/section heading bars */
.page-view-category .content .block__head {
    text-align: left !important;
    justify-content: flex-start !important;
    margin-bottom: 20px !important;
}

.page-view-category .article .block__head {
    text-align: left !important;
    justify-content: flex-start !important;
}

.page-view-category .article .block__head .h-3,
.page-view-category .article .block__head h3 {
    font-size: 16px !important;
    text-align: left !important;
}

/* Fix inline negative margin */
.page-view-category article.article[style*="margin-top"] {
    margin-top: 0 !important;
}

/* Tabbed section (Popular / Latest) */
.page-view-category .tabbed__head {
    background: #f5f5f5 !important;
}

/* ---- ARTICLE VIEW ---- */
.page-view-article .ticket--article .ticket__body_block.naked {
    border-left: none !important;
    border-top: 3px solid #c41b1b;
    padding: 28px 32px !important;
}

.page-view-article .ticket__body_block.naked h1 {
    font-size: 22px;
    color: #1a1d22 !important;
    border-bottom: 2px solid #f0f0f2;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.page-view-article .block--description {
    line-height: 1.82;
    font-size: 15px;
    color: #3a3e45;
}

.page-view-article .ticket__block-footer {
    background: #fdf5f5;
    border-top: 2px solid #f0e0e0 !important;
    padding: 16px 20px !important;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-view-article .rate-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.14s, color 0.14s;
    cursor: pointer;
    border-radius: 0;
}

.page-view-article .rate-btn--yes {
    background: #c41b1b;
    color: #fff !important;
}

.page-view-article .rate-btn--yes:hover {
    background: #8b0000;
    color: #fff !important;
}

.page-view-article .rate-btn--no {
    background: #f0f0f2;
    color: #525760 !important;
    border: 1px solid #ddd;
}

.page-view-article .rate-btn--no:hover {
    background: #e0e0e2;
}

/* Article sidebar params */
.page-view-article .ticket__params .params--block {
    border-radius: 0 !important;
    overflow: hidden;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-top: 3px solid #2e3239;
}

.page-view-article .ticket__params .accordion-title {
    background: linear-gradient(135deg, #2e3239 0%, #1a1d22 100%) !important;
    color: #fff !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    font-size: 14px !important;
}

.page-view-article .ticket__params .accordion-title span {
    color: #fff !important;
}

.page-view-article .ticket__params .accordion-body .row {
    padding: 8px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.page-view-article .ticket__params .accordion-body .row:last-child {
    border-bottom: none;
}

.page-view-article .ticket__params .list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-view-article .ticket__params .list li {
    padding: 7px 16px;
    border-bottom: 1px solid #f8f8f8;
    font-size: 13px;
}

.page-view-article .ticket__params .list li a {
    color: #c41b1b !important;
}

.page-view-article .ticket__params .list li a:hover {
    color: #8b0000 !important;
}

/* ---- SEARCH RESULTS ---- */
.page-search-results .article .block__head {
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 14px 16px !important;
}

.page-search-results .article .block__head h1,
.page-search-results .article .block__head .h-3 {
    font-size: 17px !important;
    text-align: left !important;
}

.page-search-results a.preview {
    padding: 16px 20px !important;
}

.page-search-results .preview__title {
    font-size: 15px !important;
    margin-bottom: 4px;
}

.page-search-results .navlink__descr {
    font-size: 13px;
    color: #666;
}
