/* Algeria COD Suite storefront. Every selector is intentionally rooted at .acs-cod. */
/* Fallback for block/custom themes that render native purchase controls outside
   WooCommerce's classic hook. The plugin form is intentionally excluded. */
body.acs-cod-replaces-purchase.single-product div.product form.cart:not(.acs-cod__form),
body.acs-cod-replaces-purchase.single-product .wp-block-add-to-cart-form,
body.acs-cod-replaces-purchase.single-product .wp-block-woocommerce-product-button,
body.acs-cod-replaces-purchase.single-product .wp-block-add-to-cart-with-options,
body.acs-cod-replaces-purchase.single-product .single_add_to_cart_button:not(.acs-cod__submit) {
    display: none !important;
}

body.single-product button.acs-cod__submit,
body.single-product button.acs-cod__submit:hover,
body.single-product button.acs-cod__submit:focus,
body.single-product button.acs-cod__submit:active,
body.single-product button.acs-cod__submit span,
body.single-product button.acs-cod__submit * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.acs-cod {
    --acs-accent: #0b8f7e;
    --acs-accent-strong: #087267;
    --acs-accent-soft: #e9fbf6;
    --acs-ink: #142322;
    --acs-muted: #647876;
    --acs-line: #d9e6e3;
    --acs-surface: #ffffff;
    --acs-surface-alt: #f6faf9;
    --acs-danger: #b42318;
    --acs-danger-soft: #fff1f0;
    --acs-success: #067647;
    --acs-success-soft: #ecfdf3;
    --acs-focus: #0b8f7e;
    --acs-radius: 24px;
    --acs-radius-sm: 14px;
    --acs-shadow: 0 24px 65px rgba(20, 35, 34, 0.1), 0 3px 14px rgba(20, 35, 34, 0.05);
    color: var(--acs-ink);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.55;
    margin-block: 24px;
    max-inline-size: 100%;
    text-align: start;
}

.acs-cod,
.acs-cod *,
.acs-cod *::before,
.acs-cod *::after {
    box-sizing: border-box;
}

.acs-cod [hidden] {
    display: none !important;
}

.acs-cod:not([data-acs-ready]) .acs-cod__form {
    display: none;
}

.acs-cod__honeypot {
    border: 0;
    block-size: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    inline-size: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
}

.acs-cod button,
.acs-cod input,
.acs-cod select {
    letter-spacing: normal;
    line-height: normal;
    margin: 0;
    max-inline-size: none;
    text-transform: none;
    color: inherit;
    font: inherit;
}

.acs-cod button {
    cursor: pointer;
}

.acs-cod button:disabled,
.acs-cod input:disabled,
.acs-cod select:disabled {
    cursor: not-allowed;
    opacity: 0.56;
}

.acs-cod__shell {
    background: var(--acs-surface);
    border: 1px solid var(--acs-line);
    border-radius: var(--acs-radius);
    box-shadow: var(--acs-shadow);
    overflow: visible;
}

.acs-cod__layout {
    display: grid;
    gap: 0;
}

.acs-cod__fields,
.acs-cod__summary {
    min-inline-size: 0;
    padding: 18px;
}

.acs-cod__product {
    align-items: center;
    background: var(--acs-surface-alt);
    border: 1px solid var(--acs-line);
    border-radius: 16px;
    display: flex;
    gap: 13px;
    margin-block-end: 18px;
    padding: 11px;
}

.acs-cod__product-image {
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid var(--acs-line);
    border-radius: 12px;
    flex: 0 0 68px;
    inline-size: 68px;
    object-fit: cover;
}

.acs-cod__product-copy {
    display: grid;
    gap: 1px;
    min-inline-size: 0;
}

.acs-cod__product-copy strong {
    color: var(--acs-ink);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acs-cod__section-label {
    color: var(--acs-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.acs-cod__product-price {
    color: var(--acs-accent);
    font-size: 0.93rem;
    font-weight: 800;
}

.acs-cod__grid {
    display: grid;
    gap: 15px;
    margin-block-end: 17px;
}

.acs-cod__field,
.acs-cod__fieldset {
    border: 0;
    margin: 0;
    min-inline-size: 0;
    padding: 0;
    position: relative;
}

.acs-cod__field > label,
.acs-cod__quantity-row > label,
.acs-cod__fieldset > legend {
    color: var(--acs-ink);
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    margin-block-end: 7px;
    padding: 0;
}

.acs-cod__field input,
.acs-cod__attribute select {
    appearance: none;
    background: #f8fbfa;
    border: 1px solid #cddbd8;
    border-style: solid;
    border-radius: var(--acs-radius-sm);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(20, 35, 34, 0.03);
    caret-color: var(--acs-accent);
    inline-size: 100%;
    min-block-size: 54px;
    outline: 0;
    padding: 13px 15px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.acs-cod__field input::placeholder {
    color: #8b9b99;
    opacity: 1;
}

.acs-cod__field input:hover,
.acs-cod__attribute select:hover {
    background: #fff;
    border-color: #95aaa6;
}

.acs-cod :where(button, input, select):focus-visible {
    border-color: var(--acs-focus);
    box-shadow: 0 0 0 4px rgba(11, 143, 126, 0.14), 0 4px 14px rgba(20, 35, 34, 0.06);
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.acs-cod [aria-invalid="true"] {
    background: var(--acs-danger-soft);
    border-color: var(--acs-danger);
}

.acs-cod__error {
    color: var(--acs-danger);
    font-size: 0.75rem;
    line-height: 1.35;
    margin: 4px 2px 0;
    min-block-size: 0.95em;
}

.acs-cod__variations {
    display: grid;
    gap: 13px;
    margin-block-end: 17px;
}

.acs-cod__attribute select {
    background-image: linear-gradient(45deg, transparent 50%, var(--acs-muted) 50%), linear-gradient(135deg, var(--acs-muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 51%, calc(100% - 12px) 51%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-inline-end: 34px;
}

[dir="rtl"].acs-cod .acs-cod__attribute select {
    background-position: 17px 51%, 12px 51%;
    padding-inline: 34px 13px;
}

.acs-cod__attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.acs-cod__attribute-option {
    display: inline-flex;
    margin: 0;
    position: relative;
}

.acs-cod__attribute-option input {
    block-size: 1px;
    inline-size: 1px;
    inset: 50% auto auto 50%;
    opacity: 0;
    position: absolute;
}

.acs-cod__attribute-option > span {
    align-items: center;
    background: #fff;
    border: 1px solid #becdca;
    border-radius: 999px;
    color: var(--acs-ink);
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    justify-content: center;
    min-block-size: 40px;
    min-inline-size: 44px;
    padding: 7px 13px;
    transition: 140ms ease;
}

.acs-cod__attribute-options--cards .acs-cod__attribute-option > span {
    border-radius: var(--acs-radius-sm);
    min-block-size: 52px;
    padding: 10px 16px;
}

.acs-cod__attribute-option > span.has-image {
    border-radius: 13px;
    flex-direction: column;
    gap: 7px;
    min-block-size: 96px;
    min-inline-size: 94px;
    padding: 6px 8px 8px;
}

.acs-cod__attribute-options--cards .acs-cod__attribute-option > span.has-image {
    min-inline-size: 112px;
}

.acs-cod__attribute-option img {
    aspect-ratio: 1;
    background: #f4f6f6;
    border-radius: 9px;
    display: block;
    inline-size: 72px;
    object-fit: cover;
}

.acs-cod__attribute-option-label {
    display: block;
    line-height: 1.25;
    max-inline-size: 104px;
    overflow-wrap: anywhere;
    text-align: center;
}

.acs-cod__attribute-option input:checked + span {
    background: var(--acs-accent-soft);
    border-color: var(--acs-accent);
    box-shadow: inset 0 0 0 1px var(--acs-accent);
    color: var(--acs-accent-strong);
}

.acs-cod__attribute-option input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    outline: 2px solid var(--acs-focus);
    outline-offset: 2px;
}

.acs-cod__attribute-option.is-disabled > span {
    background: #f5f6f6;
    color: #9ca7a5;
    text-decoration: line-through;
}

.acs-cod__attribute-option.is-disabled img {
    filter: grayscale(1);
    opacity: 0.5;
}

.acs-cod__variation-message {
    color: var(--acs-danger);
    font-size: 0.78rem;
    margin: -6px 0 0;
    min-block-size: 1em;
}

.acs-cod__combobox-control {
    position: relative;
}

.acs-cod__combobox:focus-within {
    z-index: 1100;
}

.acs-cod__combobox-control > input[data-acs-combobox-input] {
    padding-inline-end: 46px;
}

.acs-cod__combobox-icon {
    block-size: 20px;
    color: var(--acs-muted);
    fill: none;
    inline-size: 20px;
    inset-block-start: 50%;
    inset-inline-end: 16px;
    pointer-events: none;
    position: absolute;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transform: translateY(-50%);
    transition: color 160ms ease, transform 160ms ease;
}

.acs-cod__combobox-control:focus-within .acs-cod__combobox-icon {
    color: var(--acs-accent);
}

.acs-cod__combobox-control:has(input[aria-expanded="true"]) .acs-cod__combobox-icon {
    transform: translateY(-50%) rotate(180deg);
}

.acs-cod__options {
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid var(--acs-line);
    border-radius: 15px;
    box-shadow: 0 22px 50px rgba(20, 35, 34, 0.18), 0 3px 12px rgba(20, 35, 34, 0.08);
    inset-block-start: calc(100% + 7px);
    inset-inline: 0;
    list-style: none;
    margin: 0;
    max-block-size: 260px;
    overscroll-behavior: contain;
    overflow-y: auto;
    padding: 6px;
    position: absolute;
    touch-action: pan-y;
    z-index: 1000;
}

.acs-cod__options [role="option"] {
    border-radius: 10px;
    color: var(--acs-ink);
    cursor: pointer;
    display: grid;
    font-size: 0.88rem;
    gap: 2px;
    line-height: 1.35;
    padding: 11px 12px;
}

.acs-cod__options [role="option"]::before,
.acs-cod__options [role="option"]::after {
    content: none !important;
    display: none !important;
}

.acs-cod__options [role="option"] small {
    color: var(--acs-muted);
    font-size: 0.72rem;
}

.acs-cod__options [role="option"]:hover,
.acs-cod__options [role="option"][aria-selected="true"] {
    background: var(--acs-accent-soft);
    color: var(--acs-accent-strong);
}

.acs-cod__options [role="option"] + [role="option"] {
    margin-block-start: 2px;
}

.acs-cod__empty {
    background: var(--acs-surface-alt);
    border-radius: 8px;
    color: var(--acs-muted);
    font-size: 0.78rem;
    margin: 5px 0 0;
    padding: 8px;
}

.acs-cod__delivery-methods {
    margin-block: 4px 19px;
}

.acs-cod__choice-grid {
    display: grid;
    gap: 10px;
}

.acs-cod__choice {
    align-items: center;
    background: #fff;
    border: 1px solid #cddbd8;
    border-radius: 16px;
    cursor: pointer;
    display: grid;
    gap: 11px;
    grid-template-columns: auto auto 1fr;
    margin: 0;
    min-block-size: 72px;
    padding: 11px 12px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.acs-cod__choice:hover:not(.is-disabled) {
    border-color: #9aafab;
    box-shadow: 0 5px 16px rgba(20, 35, 34, 0.06);
    transform: translateY(-1px);
}

.acs-cod__choice:has(input:checked) {
    background: var(--acs-accent-soft);
    border-color: var(--acs-accent);
    box-shadow: inset 0 0 0 1px var(--acs-accent), 0 7px 18px rgba(11, 143, 126, 0.1);
}

.acs-cod__choice.is-disabled {
    background: #f3f5f4;
    color: #87918f;
    cursor: not-allowed;
}

.acs-cod__choice input {
    accent-color: var(--acs-accent);
    block-size: 18px;
    inline-size: 18px;
    margin: 0;
}

.acs-cod__choice-icon {
    align-items: center;
    background: #e5f6f2;
    border-radius: 12px;
    color: var(--acs-accent);
    display: inline-flex;
    block-size: 42px;
    inline-size: 42px;
    justify-content: center;
}

.acs-cod__choice-icon svg {
    block-size: 23px;
    fill: none;
    inline-size: 23px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.acs-cod__choice strong,
.acs-cod__choice small {
    display: block;
}

.acs-cod__choice strong {
    font-size: 0.86rem;
}

.acs-cod__choice small {
    color: var(--acs-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.acs-cod__conditional {
    margin-block-end: 15px;
}

.acs-cod__quantity-row {
    display: grid;
    grid-template-columns: 1fr auto;
    margin-block-start: 4px;
}

.acs-cod__quantity-row > label {
    align-self: center;
    margin: 0;
}

.acs-cod__quantity-row > .acs-cod__error {
    grid-column: 1 / -1;
}

.acs-cod__stepper {
    align-items: center;
    background: #f8fbfa;
    border: 1px solid #cddbd8;
    border-radius: var(--acs-radius-sm);
    display: inline-grid;
    grid-template-columns: 40px 48px 40px;
    overflow: hidden;
}

.acs-cod__stepper button,
.acs-cod__stepper input {
    appearance: none;
    background: transparent;
    border: 0;
    block-size: 42px;
    inline-size: 100%;
    margin: 0;
    min-block-size: 42px;
    padding: 0;
    text-align: center;
}

.acs-cod__stepper button {
    color: var(--acs-accent);
    font-size: 1.2rem;
    font-weight: 800;
}

.acs-cod__stepper button:hover:not(:disabled) {
    background: var(--acs-accent-soft);
}

.acs-cod__stepper input {
    border-inline: 1px solid var(--acs-line);
    border-radius: 0;
    font-weight: 750;
    -moz-appearance: textfield;
}

.acs-cod__stepper input::-webkit-inner-spin-button,
.acs-cod__stepper input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.acs-cod__summary {
    background: linear-gradient(180deg, #f7fbfa 0%, #f2f8f6 100%);
    border-block-start: 1px solid var(--acs-line);
    border-radius: 0 0 var(--acs-radius) var(--acs-radius);
}

.acs-cod__summary h3 {
    color: var(--acs-ink);
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0 0 12px;
}

.acs-cod__summary dl {
    margin: 0;
}

.acs-cod__summary dl > div {
    align-items: start;
    border-block-end: 1px dashed var(--acs-line);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 9px;
}

.acs-cod__summary dt,
.acs-cod__summary dd {
    color: var(--acs-muted);
    font-size: 0.82rem;
    margin: 0;
}

.acs-cod__summary dd {
    color: var(--acs-ink);
    font-weight: 700;
    max-inline-size: 180px;
    text-align: end;
}

.acs-cod__summary dd[data-pending="true"] {
    color: var(--acs-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.acs-cod__summary .acs-cod__summary-total {
    border: 0;
    margin-block-start: 3px;
    padding-block: 13px 8px;
}

.acs-cod__summary-total dt,
.acs-cod__summary-total dd {
    color: var(--acs-ink);
    font-size: 1rem;
    font-weight: 850;
}

.acs-cod__summary-total dd {
    color: var(--acs-accent-strong);
    font-size: 1.18rem;
}

.acs-cod__summary-note,
.acs-cod__trust {
    color: var(--acs-muted);
    font-size: 0.7rem;
    line-height: 1.45;
    margin: 6px 0 14px;
}

.acs-cod__submit {
    align-items: center;
    appearance: none;
    background: linear-gradient(135deg, #0ca18d 0%, var(--acs-accent-strong) 100%);
    border: 0;
    border-radius: 15px;
    box-shadow: 0 10px 24px rgba(11, 143, 126, 0.24);
    color: #fff;
    display: flex;
    font-size: 0.95rem;
    font-weight: 800;
    gap: 9px;
    inline-size: 100%;
    justify-content: center;
    min-block-size: 56px;
    padding: 14px 20px;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.acs-cod__submit:hover:not(:disabled) {
    box-shadow: 0 13px 29px rgba(11, 143, 126, 0.3);
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.acs-cod__submit:active:not(:disabled) {
    transform: translateY(0);
}

.acs-cod__spinner {
    animation: acs-spin 700ms linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-block-start-color: #fff;
    border-radius: 50%;
    block-size: 18px;
    display: none;
    inline-size: 18px;
}

.acs-cod.is-submitting .acs-cod__spinner {
    display: inline-block;
}

.acs-cod__trust {
    margin: 7px 0 0;
    text-align: center;
}

.acs-cod__status {
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 650;
    margin-block-start: 10px;
    outline: 0;
}

.acs-cod__status.is-success,
.acs-cod__status.is-error {
    border: 1px solid;
    padding: 10px;
}

.acs-cod__status.is-success {
    background: var(--acs-success-soft);
    border-color: #abefc6;
    color: var(--acs-success);
}

.acs-cod__status.is-error {
    background: var(--acs-danger-soft);
    border-color: #fecdca;
    color: var(--acs-danger);
}

.acs-cod__noscript {
    background: var(--acs-danger-soft);
    color: var(--acs-danger);
    margin: 0;
    padding: 12px 20px;
}

.acs-cod-notice {
    border-inline-start: 4px solid #d97706;
    padding-inline-start: 12px;
}

@keyframes acs-spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 540px) {
    .acs-cod__fields,
    .acs-cod__summary {
        padding: 26px;
    }

    .acs-cod__grid--customer,
    .acs-cod__grid--location,
    .acs-cod__choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 820px) {
    .acs-cod__layout {
        align-items: start;
        grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    }

    .acs-cod__summary {
        align-self: stretch;
        border-block-start: 0;
        border-inline-start: 1px solid var(--acs-line);
        border-radius: 0 var(--acs-radius) var(--acs-radius) 0;
    }

    [dir="rtl"].acs-cod .acs-cod__summary {
        border-radius: var(--acs-radius) 0 0 var(--acs-radius);
    }

    .acs-cod__summary > * {
        position: sticky;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acs-cod *,
    .acs-cod *::before,
    .acs-cod *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    .acs-cod__attribute-option input:checked + span,
    .acs-cod__choice:has(input:checked),
    .acs-cod__submit {
        border: 2px solid ButtonText;
    }
}
