:root {
    --edc-bg: #f6f8fb;
    --edc-surface: #ffffff;
    --edc-border: #d8e1ea;
    --edc-text: #0f172a;
    --edc-muted: #5b6472;
    --edc-danger: #d41212;
    --edc-success: #118a23;
    --edc-brand: #0f766e;
    --edc-brand-text: #ffffff;
    --edc-brand-soft: #e7f3f1;
    --edc-orange: #f59e0b;
    --edc-orange-dark: #d97706;
    --edc-orange-text: #111111;
    --edc-yellow: #facc15;
    --edc-yellow-dark: #eab308;
    --edc-yellow-text: #111111;
}

.edc-cod-trigger {
    margin-top: 12px;
    width: 100%;
    border: 1px solid var(--edc-brand);
    background: var(--edc-brand);
    color: var(--edc-brand-text);
    border-radius: 8px;
    font-weight: 700;
    min-height: 42px;
    transition: all 0.2s ease;
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.2);
    animation: edcTriggerShake 4s ease-in-out infinite;
}

button.edc-cod-trigger,
.edc-cod-trigger.button {
    margin-top: 15px !important;
    padding: 20px !important;
}

.edc-cod-trigger.button.alt {
    border: 1px solid var(--edc-brand) !important;
    background: var(--edc-brand) !important;
    color: var(--edc-brand-text) !important;
}

.edc-cod-trigger:hover {
    background: var(--edc-brand);
    border-color: var(--edc-brand);
    color: var(--edc-brand-text);
    filter: brightness(0.92);
}

.edc-cod-trigger.button.alt:hover {
    background: var(--edc-brand) !important;
    border-color: var(--edc-brand) !important;
    color: var(--edc-brand-text) !important;
    filter: brightness(0.92);
}

.edc-cod-trigger:hover,
.edc-cod-trigger:focus {
    animation-play-state: paused;
}

@keyframes edcTriggerShake {

    0%,
    88%,
    100% {
        transform: translateX(0);
    }

    90% {
        transform: translateX(-5px);
    }

    92% {
        transform: translateX(5px);
    }

    94% {
        transform: translateX(-5px);
    }

    96% {
        transform: translateX(5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .edc-cod-trigger {
        animation: none;
    }
}

.edc-cod-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 99999;
    font-family: "Noto Sans Bengali", "Hind Siliguri", sans-serif;
}

.edc-cod-modal.is-open {
    display: block;
}

.edc-cod-modal.edc-cod-inline-mode {
    position: static;
    display: block;
    inset: auto;
    z-index: 1;
}

.edc-cod-modal.edc-cod-inline-mode .edc-cod-dialog {
    margin: 16px auto;
    max-height: none;
    overflow: visible;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.edc-cod-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.edc-cod-dialog {
    position: relative;
    width: min(600px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    margin: 12px auto;
    padding: 20px 30px 20px;
    border-radius: 16px;
    border: 1px solid var(--edc-border);
    background: var(--edc-bg);
    overflow-y: auto;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
}

.edc-cod-close {
    position: absolute;
    top: 8px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #595959;
    font-size: 46px;
    line-height: 0.8;
    cursor: pointer;
    padding: 0;
}

#edc-cod-title {
    margin: 2px 0;
    text-align: center;
    font-size: 32px;
    line-height: 1.2;
    color: var(--edc-text);
    font-weight: 700;
}

.edc-subtitle {
    margin: 0 0 10px;
    text-align: center;
    font-size: 18px;
    line-height: 1.2;
    color: var(--edc-muted);
    font-weight: 700;
}

.edc-cod-layout {
    display: grid;
    gap: 10px;
}

.edc-field-row {
    display: grid;
    grid-template-columns: 115px 1fr;
    align-items: center;
    gap: 8px;
}

.edc-field-row label {
    font-size: 16px;
    color: var(--edc-muted);
    font-weight: 500;
}

.edc-field-row label span {
    color: var(--edc-danger);
}

.edc-input-icon-wrap {
    display: grid;
    grid-template-columns: 46px 1fr;
    border: 1px solid #cfd9e4;
    background: var(--edc-surface);
    border-radius: 12px;
    overflow: hidden;
    min-height: 46px;
}

.edc-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #cfd9e4;
    background: var(--edc-brand-soft);
}

.edc-input-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--edc-brand);
}

.edc-input-icon-wrap input {
    width: 100%;
    border: 0;
    background: #ffffff;
    padding: 0 16px;
    font-size: 15px;
    color: #1d1d1d;
    border: unset !important;
}

.edc-input-icon-wrap input:focus,
.edc-coupon-row input:focus,
#edc_cod_order_note:focus {
    outline: none;
}

.edc-input-icon-wrap:focus-within {
    border-color: var(--edc-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.edc-section-title {
    margin: 4px 0 0;
    font-size: 16px;
    color: var(--edc-text);
    font-weight: 700;
}

.edc-delivery-list {
    border: 1px solid #cfd9e4;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.edc-delivery-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
    align-items: center;
    min-height: 56px;
    padding: 0 12px;
    border-bottom: 1px solid #e1e8ef;
    cursor: pointer;
}

.edc-delivery-item:last-child {
    border-bottom: 0;
}

.edc-delivery-item.is-selected {
    background: #eef8f6;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.25);
}

.edc-delivery-item input[type="radio"] {
    width: 23px;
    height: 23px;
    margin: 0;
}

.edc-delivery-label {
    font-size: 16px;
    line-height: 1.2;
    color: var(--edc-text);
}

.edc-delivery-cost {
    font-size: 16px;
    color: var(--edc-text);
    font-weight: 700;
}

.edc-coupon-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 8px;
    align-items: center;
    padding: 6px;
    border: 1px solid #cfd9e4;
    border-radius: 14px;
    background: #ffffff;
}

#edc_cod_order_note {
    width: 100%;
    border: 1px solid #cfd9e4;
    border-radius: 12px;
    background: #ffffff;
    height: 50px;
    padding: 0 12px;
    font-size: 15px;
    color: #1d1d1d;
}

#edc_cod_coupon {
    width: 100%;
    height: 42px;
    margin: 0;
    border: 1px solid #d8e1ea;
    border-radius: 10px;
    background: #f8fafc;
    color: #1d1d1d;
    font-size: 14px;
    padding: 0 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

#edc_cod_coupon::placeholder {
    color: #7b8794;
}

#edc_cod_coupon_check.button {
    width: 100%;
    height: 42px;
    min-height: 42px;
    margin: 0 !important;
    padding: 0 10px !important;
    border-radius: 10px;
    border: 1px solid var(--edc-brand) !important;
    background: var(--edc-brand) !important;
    color: var(--edc-brand-text) !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 5px 12px rgba(15, 118, 110, 0.2);
    text-decoration: none !important;
}

#edc_cod_coupon_check.button:hover {
    background: var(--edc-brand) !important;
    border-color: var(--edc-brand) !important;
    color: var(--edc-brand-text) !important;
    filter: brightness(0.92);
}

#edc_cod_coupon:focus {
    background: #ffffff;
    border-color: #9aa5b1;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.edc-inline-message {
    min-height: 22px;
    margin: 2px 0 0;
    font-size: 14px;
}

.edc-inline-message.is-error,
.edc-form-message.is-error {
    color: var(--edc-danger);
}

.edc-inline-message.is-success,
.edc-form-message.is-success {
    color: var(--edc-success);
}

.edc-products-list {
    display: grid;
    gap: 6px;
}

.edc-product-line {
    border-top: 1px solid #c6c6c6;
    border-bottom: 1px solid #c6c6c6;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.edc-product-left {
    display: grid;
    grid-template-columns: auto 62px 1fr;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.edc-product-qty {
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #808080;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.edc-product-image {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d9d9d9;
    background: #ffffff;
}

.edc-product-name {
    color: var(--edc-text);
    font-size: 16px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.edc-unit-price {
    color: var(--edc-text);
    font-size: 16px;
    white-space: nowrap;
    font-weight: 700;
}

.edc-totals {
    border: 1px solid #cfd9e4;
    background: #eef3f8;
    border-radius: 12px;
    overflow: hidden;
}

.edc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    color: var(--edc-text);
    font-size: 15px;
}

.edc-row strong {
    font-size: 15px;
    color: var(--edc-text);
}

.edc-grand-row {
    border-top: 1px solid #d2dde8;
    font-weight: 700;
    background: #e7edf5;
}

.edc-grand-row strong {
    font-size: 17px;
    font-weight: 800;
}

.edc-order-note-row {
    margin-top: 2px;
}

.edc-order-note-row label {
    font-size: 15px;
    font-weight: 700;
}

.edc-form-message {
    min-height: 22px;
    margin: 6px 0 0;
    font-size: 14px;
}

.edc-otp-panel {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #cfd9e4;
    border-radius: 12px;
    background: #ffffff;
}

.edc-otp-header {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: start;
    gap: 10px;
    margin-bottom: 10px;
}

.edc-otp-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--edc-brand-soft);
    color: var(--edc-brand);
    font-size: 18px;
}

.edc-otp-header strong {
    display: block;
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--edc-text);
}

.edc-otp-header p {
    margin: 3px 0 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--edc-muted);
}

.edc-otp-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 8px;
    align-items: center;
}

#edc-otp-input {
    width: 100%;
    height: 42px;
    border: 1px solid #d8e1ea;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--edc-text);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-align: center;
    padding: 0 10px;
}

#edc-otp-input::placeholder {
    color: #7b8794;
    letter-spacing: 0.18em;
    font-weight: 500;
}

#edc-otp-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #9aa5b1;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

#edc-otp-send-btn.button,
#edc-otp-verify-btn.button {
    width: 100%;
    height: 42px;
    min-height: 42px;
    margin: 0 !important;
    padding: 0 10px !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
}

#edc-otp-send-btn.button {
    border: 1px solid var(--edc-brand) !important;
    background: var(--edc-brand) !important;
    color: var(--edc-brand-text) !important;
    box-shadow: 0 5px 12px rgba(15, 118, 110, 0.2);
}

#edc-otp-send-btn.button:hover {
    background: var(--edc-brand) !important;
    border-color: var(--edc-brand) !important;
    color: var(--edc-brand-text) !important;
    filter: brightness(0.92);
}

#edc-otp-verify-btn.button {
    border: 1px solid var(--edc-orange-dark) !important;
    background: var(--edc-orange) !important;
    color: var(--edc-orange-text) !important;
    box-shadow: 0 5px 12px rgba(245, 158, 11, 0.22);
}

#edc-otp-verify-btn.button:hover {
    background: var(--edc-orange) !important;
    border-color: var(--edc-orange) !important;
    color: var(--edc-orange-text) !important;
    filter: brightness(0.92);
}

.edc-otp-resend-row {
    min-height: 22px;
    margin: 8px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--edc-muted);
}

.edc-otp-resend-link {
    border: 0;
    background: transparent;
    color: var(--edc-brand);
    font-size: 13px;
    font-weight: 700;
    padding: 0;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: underline;
}

.edc-otp-resend-link:hover {
    color: var(--edc-brand);
    filter: brightness(0.9);
}

.edc-otp-countdown {
    color: #7b8794;
    font-weight: 700;
}

#edc-otp-message {
    margin-top: 6px;
}

.edc-otp-success-badge {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #b9e6c2;
    border-radius: 10px;
    background: #ecfdf1;
    color: #166534;
    font-size: 14px;
    font-weight: 700;
}

.edc-cod-actions .edc-submit-order[disabled] {
    opacity: 0.6 !important;
    filter: saturate(0.7);
    box-shadow: none !important;
    cursor: not-allowed !important;
}

.edc-cod-actions {
    display: grid;
    gap: 8px;
    margin-top: 0;
}

.edc-cod-actions .button {
    width: 100%;
    min-height: 50px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: none;
}

.edc-cod-dialog .button,
.edc-cod-dialog button.button {
    appearance: none;
    -webkit-appearance: none;
    text-shadow: none !important;
}

.edc-cod-dialog .edc-submit-order.button.alt {
    background: var(--edc-orange) !important;
    border-color: var(--edc-orange-dark) !important;
    color: var(--edc-orange-text) !important;
    box-shadow: 0 7px 14px rgba(15, 23, 42, 0.16);
}

.edc-cod-dialog .edc-submit-order.button.alt:hover,
.edc-cod-dialog .edc-submit-order.button.alt:focus {
    background: var(--edc-orange) !important;
    border-color: var(--edc-orange) !important;
    color: var(--edc-orange-text) !important;
    filter: brightness(0.92);
}

.edc-action-help {
    margin: 0;
    text-align: center;
    color: #1d9a2f;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.edc-cod-dialog .edc-pay-now,
.edc-cod-dialog .edc-pay-now.button {
    background: var(--edc-yellow) !important;
    border-color: var(--edc-yellow-dark) !important;
    color: var(--edc-yellow-text) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 7px 14px rgba(15, 23, 42, 0.16);
}

.edc-cod-dialog .edc-pay-now:hover,
.edc-cod-dialog .edc-pay-now:focus,
.edc-cod-dialog .edc-pay-now.button:hover,
.edc-cod-dialog .edc-pay-now.button:focus {
    background: var(--edc-yellow) !important;
    border-color: var(--edc-yellow) !important;
    color: var(--edc-yellow-text) !important;
    filter: brightness(0.92);
}

.edc-no-items {
    margin: 0;
    padding: 10px 12px;
    border: 1px dashed #cfd9e4;
    border-radius: 10px;
    background: #ffffff;
    color: var(--edc-muted);
    font-size: 14px;
}

.edc-pay-icon {
    font-size: 16px;
    line-height: 1;
}

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

@media (max-width: 768px) {
    .edc-cod-dialog {
        width: calc(100vw - 14px);
        margin: 7px auto;
        max-height: calc(100vh - 14px);
        padding: 10px;
    }

    #edc-cod-title {
        font-size: 24px;
    }

    .edc-field-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .edc-coupon-row {
        grid-template-columns: minmax(0, 1fr) 96px;
        padding: 5px;
        gap: 6px;
    }

    .edc-delivery-item {
        min-height: 50px;
        grid-template-columns: 34px 1fr auto;
        padding: 0 8px;
    }

    .edc-delivery-label,
    .edc-delivery-cost,
    #edc_cod_coupon,
    #edc_cod_order_note,
    .edc-input-icon-wrap input,
    #edc_cod_coupon_check.button {
        font-size: 14px;
    }

    .edc-product-name,
    .edc-unit-price {
        font-size: 14px;
    }

    .edc-row,
    .edc-row strong,
    .edc-grand-row strong,
    .edc-cod-actions .button {
        font-size: 14px;
    }

    .edc-otp-input-row {
        grid-template-columns: minmax(0, 1fr) 104px;
    }

    #edc-otp-input {
        font-size: 14px;
        letter-spacing: 0.2em;
    }
}
