/* AIT MyTianDe Warehouse Transfer — all rules are scoped to the plugin UI. */
.ait-mtwt {
    --ait-blue: #234f79;
    --ait-border: #d9e3ec;
    --ait-bg: #f7faff;
    color: #293d51;
    box-sizing: border-box;
}
.ait-mtwt *, .ait-mtwt *::before, .ait-mtwt *::after { box-sizing: border-box; }
.ait-mtwt h1 { font-weight: 650; display: flex; gap: 9px; align-items: center; }
.ait-mtwt h1 small { font-size: 12px; color: #7a8894; margin-left: 8px; }
.ait-mtwt-muted { color: #728092; font-size: 12px; }
.ait-mtwt-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
.ait-mtwt-tabs a { padding: 10px 17px; text-decoration: none; border: 1px solid var(--ait-border); border-radius: 7px; background: #fff; color: var(--ait-blue); font-weight: 600; }
.ait-mtwt-tabs a.is-active { border-color: #438bc8; background: #eaf5ff; }
.ait-mtwt-filter { padding: 13px; background: #fff; border: 1px solid var(--ait-border); border-radius: 10px; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ait-mtwt-filter input { min-width: 260px; max-width: 100%; }
.ait-mtwt-count { margin-left: auto; color: #6c7e90; font-size: 12px; }
.ait-mtwt-table-scroll { overflow: auto; border-radius: 10px; border: 1px solid var(--ait-border); background: white; }
.ait-mtwt-table td, .ait-mtwt-table th { padding: 13px 11px; vertical-align: middle; }
.ait-mtwt-table thead { background: #eef4fa; }
.ait-mtwt-reason { max-width: 360px; min-width: 180px; white-space: normal; }
.ait-mtwt-badge { display: inline-block; padding: 5px 9px; border-radius: 30px; font-size: 12px; font-weight: 600; }
.ait-mtwt-badge.ok { background: #e2f4e9; color: #287749; }
.ait-mtwt-badge.waiting { background: #fff0dc; color: #a45e11; }
.ait-mtwt-account { width: 100%; max-width: 860px; }
.ait-mtwt-account label { display: block; margin: 0 0 7px; }
.ait-mtwt-account select, .ait-mtwt-account textarea { width: 100%; max-width: 100%; border: 1px solid #b6cada; border-radius: 6px; padding: 10px; }
.ait-mtwt-account textarea { min-height: 120px; resize: vertical; }


.ait-mtwt-current, .ait-mtwt-existing {
    background: var(--ait-bg);
    border: 1px solid var(--ait-border);
    padding: 17px;
    /* border-radius: 9px; */
    margin-bottom: 10px;
}



/* Notice generated by check_my_sklad_status_message() can appear outside
   the transfer endpoint, above the WooCommerce My Account header. Keep its
   styling self-contained; do not change the Flatsome layout or navigation. */
.ait-mtwt .ait-mtwt-ok, .ait-mtwt.ait-mtwt-ok,
.ait-mtwt .ait-mtwt-warning, .ait-mtwt.ait-mtwt-warning {
    width: 100%;
    max-width: 100%;
    margin: 14px 0 20px;
    padding: 16px 20px;
    border: 1px solid transparent;
    border-radius: 9px;
    clear: both;
    overflow-wrap: anywhere;
    line-height: 1.5;
}
.ait-mtwt .ait-mtwt-ok, .ait-mtwt.ait-mtwt-ok { background: #e8f8ef; border-color: #cce9d9; color: #236b46; }
.ait-mtwt .ait-mtwt-warning, .ait-mtwt.ait-mtwt-warning { background: #fff1dd; border-color: #f3d9b4; color: #8c510d; }

/* Flatsome's list margins place bullets OUTSIDE the notice container.
   Normalize only the voucher-transfer notice, never generic account lists. */
.ait-mtwt .ait-mtwt-warning ul, .ait-mtwt.ait-mtwt-warning ul {
    list-style: none !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    display: grid;
    gap: 6px;
}
.ait-mtwt .ait-mtwt-warning li, .ait-mtwt.ait-mtwt-warning li {
    position: relative;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 0 0 17px !important;
    line-height: 1.5;
}
.ait-mtwt .ait-mtwt-warning li::before, .ait-mtwt.ait-mtwt-warning li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #b16a16;
    font-weight: 700;
}
.ait-mtwt .ait-mtwt-warning strong, .ait-mtwt.ait-mtwt-warning strong { color: inherit; }

.ait-mtwt-feedback { margin: 8px 0; padding: 8px 0; }
.ait-mtwt-feedback.error { color: #b72424; }
.ait-mtwt-feedback.success { color: #227047; }
.ait-mtwt .button { margin: 3px 2px 3px 0; }
@media (max-width: 700px) {
    .ait-mtwt-table-scroll { overflow-x: auto; }
    .ait-mtwt-account { padding: 15px; }
    .ait-mtwt-filter input { min-width: 0; width: 100%; }
    .ait-mtwt-count { margin-left: 0; }
    .ait-mtwt .ait-mtwt-warning, .ait-mtwt.ait-mtwt-warning { padding: 14px 16px; }
}


/* v1.0.3: Transfer status card, rendered by check_my_sklad_status_message()
   on store pages as well as My Account. Every selector is isolated. */
.ait-mtwt.ait-mtwt-transfer-notice {
    --mtwt-accent: #ba7524;
    --mtwt-ink: #583d24;
    width: 100%;
    max-width: 100%;
    padding: 19px 22px;
    border: 1px solid #efcea2;
    background: linear-gradient(120deg, #fff8ed 0%, #ffeed8 100%);
    color: var(--mtwt-ink);
    box-shadow: 0 5px 19px rgba(102, 68, 27, .055);
    clear: both;
    overflow-wrap: anywhere;
    line-height: 1.48;
}
.ait-mtwt-transfer-notice.ait-mtwt-transfer-notice--ready {
    --mtwt-accent: #217451;
    --mtwt-ink: #235740;
    border-color: #bcdcca;
    border-left-color: #39996a;
    background: linear-gradient(120deg, #f4fcf7 0%, #e8f7ef 100%);
}
/* v1.0.4 — approval is NOT a completed transfer. Make the approved state
   reassuringly green while unmet requirements remain clearly urgent. */
.ait-mtwt.ait-mtwt-transfer-notice--approved {
    --mtwt-accent: #27784e;
    --mtwt-ink: #24533b;
    border-color: #b8dfc7;
    background: linear-gradient(120deg, #f4fff7 0%, #e6f8ed 100%);
    box-shadow: 0 6px 22px rgba(30, 117, 71, .075);
}
.ait-mtwt-transfer-notice--approved .ait-mtwt-transfer-notice__status {
    border-color: #b0dec0;
    background: #e0f5e8;
    color: #1b7349;
}
.ait-mtwt-transfer-notice--approved .ait-mtwt-transfer-notice__warehouse {
    border-color: rgba(38, 136, 85, .20);
}
.ait-mtwt-transfer-notice--approved .ait-mtwt-transfer-notice__requirements {
    background: #fff6f6;
    box-shadow: 0 3px 14px rgba(159, 38, 51, .05);
}
.ait-mtwt-transfer-notice--approved .ait-mtwt-transfer-notice__requirements-title {
    color: #a4212d;
}
.ait-mtwt-transfer-notice .ait-mtwt-transfer-notice__requirements-help {
    margin: 6px 0 9px;
    font-size: 12px;
    line-height: 1.55;
}
.ait-mtwt-transfer-notice--approved .ait-mtwt-transfer-notice__requirements-help {
    color: #93303a;
}
.ait-mtwt.ait-mtwt-transfer-notice--approved ul.ait-mtwt-transfer-notice__list li {
    color: #a51f2b;
    background: #fff4f4;
    border-radius: 4px;
    padding: 8px 11px 8px 34px !important;
    font-weight: 700;
    animation: ait-mtwt-condition-pulse 2.6s ease-in-out infinite;
}
.ait-mtwt.ait-mtwt-transfer-notice--approved ul.ait-mtwt-transfer-notice__list li::before {
    left: 11px;
    top: 11px;
    background: #c42b39;
    box-shadow: 0 0 0 3px rgba(210, 45, 64, .10);
}
.ait-mtwt.ait-mtwt-transfer-notice--approved ul.ait-mtwt-transfer-notice__list li:nth-child(2n) {
    animation-delay: -1.3s;
}
@keyframes ait-mtwt-condition-pulse {
    0%, 100% {
        background-color: #fff4f4;
        border-color: rgba(203, 45, 64, .35);
        box-shadow: 0 0 0 0 rgba(205, 43, 59, 0);
    }
    50% {
        background-color: #ffe4e7;
        border-color: rgba(203, 45, 64, .85);
        box-shadow: 0 0 0 3px rgba(205, 43, 59, .11);
    }
}
@media (prefers-reduced-motion: reduce) {
    .ait-mtwt.ait-mtwt-transfer-notice--approved ul.ait-mtwt-transfer-notice__list li {
        animation: none;
        border-color: #cf3b4a;
    }
}

.ait-mtwt-transfer-notice__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.ait-mtwt-transfer-notice__icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(185,120,38,.19);
    color: var(--mtwt-accent);
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
}
.ait-mtwt-transfer-notice__heading-copy { flex: 1 1 auto; min-width: 0; }
.ait-mtwt-transfer-notice__eyebrow {
    color: var(--mtwt-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}
.ait-mtwt .ait-mtwt-transfer-notice__title,
.ait-mtwt-transfer-notice.ait-mtwt .ait-mtwt-transfer-notice__title {
    margin: 3px 0 0;
    padding: 0;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.25;
    color: var(--mtwt-ink);
    text-transform: none;
}
.ait-mtwt-transfer-notice__status {
    flex: 0 0 auto;
    align-self: center;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--mtwt-accent);
    background: rgba(255,255,255,.8);
    border: 1px solid rgba(185,120,38,.22);
    border-radius: 999px;
}
.ait-mtwt-transfer-notice .ait-mtwt-transfer-notice__intro {
    margin: 12px 0;
    padding: 0;
    color: var(--mtwt-ink);
    font-size: 14px;
    line-height: 1.55;
}
.ait-mtwt-transfer-notice__route {
    display: grid;
    grid-template-columns: minmax(0,1fr) 26px minmax(0,1fr);
    gap: 9px;
    align-items: stretch;
    margin: 12px 0;
}
.ait-mtwt-transfer-notice__warehouse {
    padding: 9px 12px;
    border: 1px solid rgba(176,121,49,.20);
    border-radius: 8px;
    background: rgba(255,255,255,.64);
    min-width: 0;
}
.ait-mtwt-transfer-notice__warehouse span {
    display: block;
    color: var(--mtwt-accent);
    font-weight: 750;
    font-size: 10px;
    letter-spacing: .045em;
    margin-bottom: 3px;
}
.ait-mtwt-transfer-notice__warehouse strong {
    display: block;
    color: var(--mtwt-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
.ait-mtwt-transfer-notice__arrow {
    align-self: center;
    text-align: center;
    color: var(--mtwt-accent);
    font-size: 22px;
    font-weight: bold;
}
.ait-mtwt-transfer-notice__requirements {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,.46);
    border: 1px solid rgba(176,121,49,.15);
    border-radius: 8px;
}
.ait-mtwt-transfer-notice__requirements-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--mtwt-ink);
}
.ait-mtwt.ait-mtwt-transfer-notice ul.ait-mtwt-transfer-notice__list {
    display: grid;
    gap: 6px;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.ait-mtwt.ait-mtwt-transfer-notice ul.ait-mtwt-transfer-notice__list li {
    display: block;
    position: relative;
    margin: 0 !important;
    padding: 0 0 0 19px !important;
    list-style: none !important;
    color: var(--mtwt-ink);
    font-size: 13px;
    line-height: 1.5;
}
.ait-mtwt.ait-mtwt-transfer-notice ul.ait-mtwt-transfer-notice__list li::before {
    content: "!";
    position: absolute;
    top: 2px;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: #fff;
    background: var(--mtwt-accent);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}
.ait-mtwt-transfer-notice__complete {
    margin-top: 12px;
    padding: 11px 13px;
    background: rgba(255,255,255,.6);
    border-radius: 8px;
    color: var(--mtwt-ink);
    font-size: 13px;
    font-weight: 650;
}
.ait-mtwt-transfer-notice .ait-mtwt-transfer-notice__reason {
    margin: 10px 0 0;
    color: var(--mtwt-ink);
    font-size: 12px;
    opacity: .85;
}
.ait-mtwt-transfer-notice__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid rgba(176,121,49,.17);
    font-size: 12px;
    color: var(--mtwt-ink);
}
.ait-mtwt-transfer-notice .ait-mtwt-transfer-notice__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid var(--mtwt-accent);
    border-radius: 7px;
    background: var(--mtwt-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}
.ait-mtwt-transfer-notice .ait-mtwt-transfer-notice__link:hover,
.ait-mtwt-transfer-notice .ait-mtwt-transfer-notice__link:focus {
    color: #fff;
    background: #87501b;
    border-color: #87501b;
    text-decoration: none;
}
.ait-mtwt-transfer-notice--ready .ait-mtwt-transfer-notice__link:hover,
.ait-mtwt-transfer-notice--ready .ait-mtwt-transfer-notice__link:focus {
    background: #16593d;
    border-color: #16593d;
}
@media (max-width: 700px) {
    .ait-mtwt.ait-mtwt-transfer-notice { padding: 15px; margin: 12px 0 18px; }
    .ait-mtwt-transfer-notice__heading { flex-wrap: wrap; }
    .ait-mtwt-transfer-notice__icon { flex-basis: 36px; width: 36px; height: 36px; font-size: 22px; }
    .ait-mtwt-transfer-notice__heading-copy { flex-basis: calc(100% - 48px); }
    .ait-mtwt-transfer-notice__status { margin-left: 48px; }
    .ait-mtwt .ait-mtwt-transfer-notice__title { font-size: 17px; }
    .ait-mtwt-transfer-notice__route { grid-template-columns: minmax(0,1fr); gap: 4px; }
    .ait-mtwt-transfer-notice__arrow { line-height: 1; transform: rotate(90deg); font-size: 18px; }
    .ait-mtwt-transfer-notice__footer { align-items: flex-start; }
}


/* v1.0.5 — compact automatic transfer state, scoped to this plugin only. */
.ait-mtwt.ait-mtwt-transfer-notice--auto {
    padding: 20px 24px;
}
.ait-mtwt.ait-mtwt-transfer-notice--auto .ait-mtwt-transfer-notice__auto-route {
    margin: 12px 0 14px;
    font-size: 13px;
    color: #306b4e;
    line-height: 1.55;
}
.ait-mtwt-transfer-notice__auto-route span { padding: 0 7px; }
.ait-mtwt .ait-mtwt-auto-progress {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-width: 0;
    padding: 15px 17px;
    background: rgba(255,255,255,.78);
    border: 1px solid #cbe4d5;
    border-radius: 10px;
    color: #215b3d;
}
.ait-mtwt .ait-mtwt-auto-spinner {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid #d4eadc;
    border-top-color: #248052;
    animation: ait-mtwt-auto-spin .9s linear infinite;
}
@keyframes ait-mtwt-auto-spin { to { transform: rotate(360deg); } }
.ait-mtwt .ait-mtwt-auto-progress__copy { flex: 1 1 auto; min-width: 0; }
.ait-mtwt .ait-mtwt-auto-progress__title {
    display: block;
    color: #1d6847;
    font-size: 15px;
    line-height: 1.45;
}
.ait-mtwt .ait-mtwt-auto-progress__detail {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #3b6d53;
    line-height: 1.5;
}
.ait-mtwt .ait-mtwt-auto-progress--success .ait-mtwt-auto-spinner {
    animation: none;
    border-color: #248052;
    background: #248052;
}
.ait-mtwt .ait-mtwt-auto-progress--error {
    border-color: #edc4c8;
    background: #fff5f5;
}
.ait-mtwt .ait-mtwt-auto-progress--error .ait-mtwt-auto-spinner {
    animation: none;
    border-color: #d45e67;
    border-top-color: transparent;
}
.ait-mtwt .ait-mtwt-auto-progress--error .ait-mtwt-auto-progress__title,
.ait-mtwt .ait-mtwt-auto-progress--error .ait-mtwt-auto-progress__detail { color: #a0323f; }
.ait-mtwt .ait-mtwt-auto-progress__refresh {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid #a0323f;
    border-radius: 7px;
    background: #fff;
    color: #9b2936;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
@media (max-width: 650px) {
    .ait-mtwt .ait-mtwt-auto-progress { flex-wrap: wrap; }
    .ait-mtwt .ait-mtwt-auto-progress__refresh { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .ait-mtwt .ait-mtwt-auto-spinner { animation: none; }
}


/* v1.0.6: Flatsome has its own select height/vertical padding. On the
   warehouse destination dropdown these can clip Cyrillic text. Restrict the
   correction to this field; preserve the theme's native arrow/background. */
.ait-mtwt-account .ait-mtwt-request-form select#ait-mtwt-dest {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 48px !important;
    min-height: 48px;
    padding: 0 42px 0 14px !important;
    line-height: normal !important;
    font-size: 15px;
    font-weight: 400;
    vertical-align: middle;
    text-overflow: ellipsis;
    background-position: right 12px center;
}
