/* ClaudeCode 2026-05-13: Homepage part-search widget styles.
   Three side-by-side cards (VIN / Vehicle / OEM) using PAMS brand palette
   so the widget matches the rest of pamsauto.com:
     primary  #265680  (@brand-primary, used by header bg + active button)
     primary-hover #1f4566
     info     #1C5F74  (@brand-info)
     success  #028302  (@brand-success - reserved)
   Inherits font-family from the skin (no overrides). */

:root {
    --pams-primary: #265680;
    --pams-primary-hover: #1f4566;
    --pams-info: #1C5F74;
    --pams-text: #2d3a51;
    --pams-muted: #8a93a6;
    --pams-rule: #d6dae0;
}

.pams-part-search {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 16px;
}

/* --- 3-card grid ----------------------------------------------------- */

.pams-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pams-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .10);
    /* ClaudeCode 2026-05-14: NOT overflow:hidden any more - the combo
       dropdown panel needs to extend past the card's bottom edge when
       it has a lot of items. We round the header's own top corners
       below so the colored bar still stays inside the card's rounded
       shape. */
    display: flex;
    flex-direction: column;
}

.pams-card__head {
    background: var(--pams-primary);
    color: #fff;
    padding: 14px 18px;
    border-radius: 6px 6px 0 0;
}
.pams-card__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    letter-spacing: .2px;
    line-height: 1.25;
}

.pams-card__body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

/* --- Inputs / selects: underlined-only style ------------------------- */

.pams-input,
.pams-select {
    width: 100%;
    padding: 10px 2px;
    font-size: 15px;
    color: var(--pams-text);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--pams-rule);
    border-radius: 0;
    outline: none;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.pams-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23aab2c0' d='M5 6 0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px;
    cursor: pointer;
    color: var(--pams-muted);
}
.pams-select:has(option:checked:not([value=""])),
.pams-select.is-set { color: var(--pams-text); }
.pams-input::placeholder { color: var(--pams-muted); }
.pams-input:focus,
.pams-select:focus { border-bottom-color: var(--pams-primary); }
.pams-select:disabled {
    color: #b4b9c3;
    cursor: not-allowed;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23d6dae0' d='M5 6 0 0h10z'/%3E%3C/svg%3E");
}

.pams-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.pams-input-row > .pams-input { flex: 1; }
.pams-icon-btn {
    flex: 0 0 auto;
    width: 44px;
    background: #fff;
    border: 1px solid var(--pams-rule);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: var(--pams-primary);
    transition: border-color .15s ease, background .15s ease;
}
.pams-icon-btn:hover { border-color: var(--pams-primary); background: #f5f8fc; }

/* --- Full-width SEARCH button --------------------------------------- */

.pams-search-btn {
    width: 100%;
    padding: 13px;
    background: #c5c9d2;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    transition: background .15s ease;
}
.pams-search-btn:not(:disabled) { background: var(--pams-primary); }
.pams-search-btn:not(:disabled):hover { background: var(--pams-primary-hover); }
.pams-search-btn:disabled { cursor: not-allowed; }
.pams-search-btn__icon { font-size: 14px; }

/* --- Per-card status (inline error/empty) ---------------------------
   ClaudeCode 2026-05-14: Replaces the prior shared .pams-results panel
   so feedback shows up right inside the card that triggered the search,
   not buried below all three cards. */

.pams-card__status {
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff5f5;
    border: 1px solid #f3c2c2;
    color: #A41915;   /* @brand-danger */
}
.pams-card__status[hidden] { display: none; }
.pams-card__status--error strong { color: #6f1010; }

/* --- Recent Searches ------------------------------------------------- */

.pams-recent {
    margin-top: 36px;
}
.pams-recent__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: var(--pams-primary);
}
.pams-recent__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pams-recent__list > li {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-left: 4px solid var(--pams-primary);
    border-radius: 4px;
    padding: 12px 16px;
    color: var(--pams-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04);
}
.pams-recent__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-right: 14px;
    background: #eef2f7;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pams-primary);
    font-size: 16px;
}
.pams-recent__body {
    flex: 1;
    background: none;
    border: none;
    text-align: left;
    color: var(--pams-text);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.pams-recent__title-line {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--pams-primary);
}
.pams-recent__subline {
    display: block;
    font-size: 13px;
    color: #6c7589;
    margin-top: 2px;
}
.pams-recent__remove {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: #b4b9c3;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.pams-recent__remove:hover { color: #A41915; }

/* --- Trust strip ----------------------------------------------------- */

.pams-trust-strip {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 36px 0 0;
    margin: 0;
}
.pams-trust-strip > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 4px;
    color: var(--pams-text);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
}
.pams-trust-strip > li > a:hover { border-color: var(--pams-primary); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }
/* Static tile (no link) - matches the linked tile look but no hover affordance. */
.pams-trust-strip__static {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 4px;
    color: var(--pams-text);
    font-size: 14px;
    line-height: 1.35;
}
.pams-trust-icon { font-size: 22px; flex-shrink: 0; color: var(--pams-primary); }

/* --- Careers banner (re-added 2026-05-14) --------------------------- */

.pams-careers {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--pams-primary), var(--pams-info));
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .10);
    color: #fff;
    text-decoration: none;
    transition: box-shadow .15s ease, transform .05s ease;
}
.pams-careers:hover {
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.pams-careers:active { transform: scale(.998); }
.pams-careers__icon {
    flex: 0 0 auto;
    font-size: 48px;
    line-height: 1;
}
.pams-careers__copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
/* ClaudeCode 2026-05-21: Bumped title to a hero size per Ryan Gohl
   ("biggest font possible") and dropped the now-unused __sub style. */
.pams-careers__title {
    font-size: 72px;
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1.05;
    text-transform: uppercase;
}
.pams-careers__cta {
    flex: 0 0 auto;
    background: #fff;
    color: var(--pams-primary);
    padding: 12px 22px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .5px;
    white-space: nowrap;
}
.pams-careers:hover .pams-careers__cta { background: #f3f6fa; }

@media (max-width: 720px) {
    .pams-careers { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; text-align: center; }
    .pams-careers__copy { width: 100%; align-items: center; }
    .pams-careers__title { font-size: 48px; }
    .pams-careers__cta { align-self: stretch; text-align: center; padding: 13px; font-size: 17px; }
}

/* --- Filter-as-you-type combo (Part field) --------------------------- */

.pams-combo {
    position: relative;
}
.pams-combo__input {
    padding-right: 22px; /* leave room for the caret */
}
.pams-combo__caret {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #aab2c0;
    pointer-events: none;
}
.pams-combo__input:disabled + .pams-combo__caret,
.pams-combo__input--loading + .pams-combo__caret { color: #d6dae0; }
.pams-combo__input--loading {
    /* Style readonly + loading combos to look identical to disabled.
       Readonly is used (not disabled) so Tab can still land on them. */
    color: #b4b9c3;
    cursor: not-allowed;
}
.pams-combo__input--loading::placeholder { color: #b4b9c3; }
.pams-combo__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    list-style: none;
    margin: 4px 0 0;
    padding: 4px 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--pams-rule);
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.pams-combo__panel[hidden] { display: none; }
.pams-combo__option {
    padding: 8px 12px;
    font-size: 14px;
    color: var(--pams-text);
    cursor: pointer;
}
.pams-combo__option:hover,
.pams-combo__option.is-highlighted {
    background: #eef2f7;
    color: var(--pams-primary);
}
.pams-combo__empty {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--pams-muted);
    font-style: italic;
}

/* --- Page-level search spinner --------------------------------------- */

.pams-spinner {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pams-spinner[hidden] { display: none; }
.pams-spinner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(2px);
}
.pams-spinner__card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
    padding: 28px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 260px;
}
.pams-spinner__ring {
    width: 52px;
    height: 52px;
    border: 5px solid #dde3ec;
    border-top-color: var(--pams-primary);
    border-radius: 50%;
    animation: pams-spin 0.9s linear infinite;
}
.pams-spinner__text {
    font-size: 15px;
    font-weight: 600;
    color: var(--pams-primary);
    letter-spacing: .2px;
    text-align: center;
}

/* --- Floating fitment modal -----------------------------------------
   PAMS-branded version of PAMSExternalWebApplication/AIFitmentSelect. */

.pams-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}
.pams-modal[hidden] { display: none; }
.pams-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}
.pams-modal__card {
    position: relative;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    max-width: 650px;
    width: 100%;
    padding: 0;
    margin: auto;
    overflow: hidden;
}
.pams-modal__close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, .75);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 2;
}
.pams-modal__close:hover { color: #fff; }

.pams-modal__head {
    background: var(--pams-primary);
    color: #fff;
    padding: 18px 24px;
    text-align: center;
}
.pams-modal__head h2 { font-size: 20px; margin: 0 0 4px; color: #fff; font-weight: 700; }
.pams-modal__head p { font-size: 13px; margin: 0; color: rgba(255, 255, 255, .85); }

.pams-modal__vehicle {
    background: #eef2f7;
    border-bottom: 1px solid #dde3ec;
    padding: 12px 24px;
    font-size: 14px;
    color: var(--pams-text);
}
.pams-modal__vehicle strong { color: var(--pams-primary); }
.pams-modal__vehicle p { margin: 4px 0; }

.pams-modal__section {
    padding: 18px 24px 24px;
}
.pams-modal__section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--pams-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--pams-primary);
}

.pams-modal__choices { display: flex; flex-direction: column; gap: 8px; }
.pams-modal__option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e3e9;
    border-radius: 4px;
    padding: 14px 16px;
    color: var(--pams-text);
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, transform .05s ease;
    cursor: pointer;
}
.pams-modal__option:hover { border-color: var(--pams-primary); background: #f3f6fa; }
.pams-modal__option:active { transform: scale(.998); }
.pams-modal__option-label { font-size: 15px; color: var(--pams-text); font-weight: 600; }
.pams-modal__option-arrow { color: var(--pams-primary); font-size: 16px; }

/* Loading overlay shown after the user clicks a choice. Anchored to the
   modal card so it covers everything but the header. */
.pams-modal__loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 3;
}
.pams-modal__loading[hidden] { display: none; }
.pams-modal__spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #dde3ec;
    border-top-color: var(--pams-primary);
    border-radius: 50%;
    animation: pams-spin 0.9s linear infinite;
}
@keyframes pams-spin { to { transform: rotate(360deg); } }
.pams-modal__loading-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--pams-primary);
    letter-spacing: .3px;
}

@media (max-width: 520px) {
    .pams-modal__head h2 { font-size: 17px; }
    .pams-modal__section { padding: 16px 18px 20px; }
    .pams-modal__vehicle { padding: 10px 18px; }
}

/* --- Responsive ------------------------------------------------------ */

@media (max-width: 960px) {
    .pams-cards-grid { grid-template-columns: 1fr; }
    .pams-trust-strip { grid-template-columns: 1fr; }
}
