/**
 * Confirmarea de compatibilitate, pe pagina de produs.
 *
 * Culorile de accent vin din variabilele pluginului, cu valori de rezervă, deci
 * blocul arată corect și pe o temă care nu le definește.
 */
.apx-compat {
    margin: 14px 0 18px;
}

.apx-compat__match,
.apx-compat__choose {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.4;
}

.apx-compat__match {
    background: #eefaf1;
    border: 1px solid #bfe6cc;
    color: #15873f;
}

.apx-compat__icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.apx-compat__icon svg {
    width: 100%;
    height: 100%;
}

.apx-compat__match strong {
    font-weight: 700;
}

.apx-compat__choose {
    background: #f6f7f9;
    border: 1px solid #e3e5ea;
    color: #454b57;
    flex-wrap: wrap;
}

/* Poate fi <a> sau <button>, dupa cum modala e disponibila sau nu. Butonul nu
   mosteneste fontul paginii si are bordura proprie de la browser — de aceea sunt
   neutralizate explicit, altfel cele doua variante ar arata diferit. */
.apx-compat__cta {
    display: inline-block;
    margin-left: auto;
    flex: 0 0 auto;
    padding: 7px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--apx-accent, #ff0505);
    color: #fff !important;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.apx-compat__cta:hover {
    background: var(--apx-accent-dark, #b00303);
}

@media (max-width: 480px) {
    .apx-compat__cta { margin-left: 0; width: 100%; text-align: center; }
}

/* Starea „nu avem confirmare" — apare doar dupa o alegere explicita de masina. */
.apx-compat__unknown {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.4;
    background: #fff8e8;
    border: 1px solid #f0dcae;
    color: #7a5c14;
    flex-wrap: wrap;
}

/* Modala cu selectorul de masina ------------------------------------------- */
.apx-vehicle-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
}

body.apx-modal-open {
    overflow: hidden;
}

.apx-vehicle-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 16, .55);
}

.apx-vehicle-modal__box {
    position: relative;
    width: calc(100% - 32px);
    max-width: 520px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    margin: 40px auto;
    padding: 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

.apx-vehicle-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.apx-vehicle-modal__close:hover {
    background: #f1f2f4;
    color: #14161d;
}

/* Select2 randeaza lista in <body>, cu z-index propriu — trebuie ridicata
   peste modala, altfel dropdown-urile se deschid in spatele ei. */
.select2-container--open {
    z-index: 140;
}

@media (max-width: 480px) {
    .apx-vehicle-modal__box { margin: 20px auto; padding: 18px; }
}

/* Blocul „Se schimba impreuna" --------------------------------------------- */
.apx-together {
    margin: 34px 0 10px;
}

.apx-together__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}

.apx-together__note {
    margin: 0 0 16px;
    font-size: 14px;
    color: #6b7280;
    max-width: 640px;
}

.apx-together__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.apx-together__card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e3e5ea;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.apx-together__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.apx-together__media {
    display: block;
    margin-bottom: 10px;
}

.apx-together__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.apx-together__name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.apx-together__foot {
    margin-top: auto;
    padding-top: 12px;
}

.apx-together__price {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
}

/* Butonul e cel standard WooCommerce — il aducem doar la latimea cardului,
   fara sa-i schimbam culorile: alea vin din tema. */
.apx-together__foot .button {
    display: block;
    width: 100%;
    text-align: center;
}

@media (max-width: 480px) {
    .apx-together__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .apx-together__card { padding: 10px; }
}

/* Pachetul (revizie, kit distributie, kit frana) ---------------------------- */
.apx-bundle {
    border: 1px solid #e3e5ea;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
}

.apx-bundle__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}

.apx-bundle__note {
    margin: 0 0 14px;
    font-size: 14px;
    color: #6b7280;
    max-width: 640px;
}

.apx-bundle__list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #eef0f3;
}

.apx-bundle__item {
    border-bottom: 1px solid #eef0f3;
}

.apx-bundle__label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 2px;
    cursor: pointer;
    margin: 0;
}

.apx-bundle__check {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--apx-accent, #ff0505);
    cursor: pointer;
}

.apx-bundle__name {
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.35;
}

.apx-bundle__current {
    display: block;
    font-size: 12px;
    font-style: normal;
    color: #9aa1ad;
}

.apx-bundle__price {
    flex: 0 0 auto;
    font-weight: 700;
    white-space: nowrap;
}

/* Piesa debifata ramane lizibila, dar iese vizibil din total. */
.apx-bundle__check:not(:checked) ~ .apx-bundle__name,
.apx-bundle__check:not(:checked) ~ .apx-bundle__price {
    opacity: .45;
}

.apx-bundle__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.apx-bundle__total {
    margin: 0;
    font-size: 15px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.apx-bundle__total-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--apx-accent, #ff0505);
}

/* Butonul mosteneste stilul de buton al temei; fixam doar dimensiunea. */
.apx-bundle__add {
    flex: 0 0 auto;
    padding: 11px 22px;
    font-weight: 700;
    cursor: pointer;
}

.apx-bundle__add[disabled] {
    opacity: .6;
    cursor: default;
}

.apx-bundle__msg {
    margin: 10px 0 0;
    font-size: 14px;
    color: #b00303;
}

@media (max-width: 480px) {
    .apx-bundle { padding: 14px; }
    .apx-bundle__foot { flex-direction: column; align-items: stretch; }
    .apx-bundle__add { width: 100%; }
}
