/* V3.1.56 Design System / Motion / UI Consistency
   This layer intentionally uses existing project classes. It does not change business logic. */
:root {
    --xa-green-50: #effcf1;
    --xa-green-100: #dcf7df;
    --xa-green-500: #37bf2a;
    --xa-green-600: #24a81f;
    --xa-blue-50: #eef6ff;
    --xa-blue-600: #1d5fbf;
    --xa-amber-50: #fff8e7;
    --xa-amber-600: #b7791f;
    --xa-red-50: #fff1f1;
    --xa-red-600: #c24141;
    --xa-surface-soft: #f8fafc;
    --xa-surface-raised: #ffffff;
    --xa-border-soft: #e5ebf2;
    --xa-shadow-card: 0 18px 50px rgba(15, 23, 42, 0.06);
    --xa-shadow-card-hover: 0 24px 70px rgba(15, 23, 42, 0.10);
    --xa-shadow-modal: 0 28px 90px rgba(15, 23, 42, 0.28);
    --xa-radius-sm: 12px;
    --xa-radius-md: 16px;
    --xa-radius-lg: 22px;
    --xa-motion-fast: 140ms;
    --xa-motion-normal: 220ms;
    --xa-motion-slow: 360ms;
    --xa-ease-out: cubic-bezier(.16, 1, .3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

:focus-visible {
    outline: 3px solid rgba(55, 191, 42, 0.32);
    outline-offset: 3px;
}

::selection {
    background: rgba(55, 191, 42, 0.22);
    color: #0f172a;
}

.btn,
.xa-header__create,
.xa-nav__toggle,
.xa-nav__link,
.lot-share-button,
.lot-heart-action,
.lot-report-visible-action,
.my-listings-tab,
.notification-tab,
.listing-chip,
.listing-manager-tab {
    transition:
        transform var(--xa-motion-fast) var(--xa-ease-out),
        box-shadow var(--xa-motion-normal) var(--xa-ease-out),
        border-color var(--xa-motion-normal) var(--xa-ease-out),
        background-color var(--xa-motion-normal) var(--xa-ease-out),
        color var(--xa-motion-normal) var(--xa-ease-out),
        opacity var(--xa-motion-normal) var(--xa-ease-out);
}

.btn:hover,
.xa-header__create:hover,
.lot-share-button:hover,
.lot-heart-action:hover,
.lot-report-visible-action:hover {
    transform: translateY(-1px);
}

.btn:active,
.btn.is-pressed,
.xa-header__create:active,
.xa-header__create.is-pressed,
.lot-share-button:active,
.lot-share-button.is-pressed {
    transform: translateY(0) scale(0.985);
}

.btn.is-loading,
button.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.82;
}

.btn.is-loading::after,
button.is-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 999px;
    animation: xa-spin 0.8s linear infinite;
}

.account-card,
.account-box,
.my-listing-card-v2,
.listing-manager-bulk-card,
.listing-manager-table,
.listing-manager-mobile-card,
.notification-card,
.lot-action-dialog__body,
.lot-grid-block,
.lot-highlight-card,
.create-source-card,
.admin-health-card,
.seller-cockpit-card,
.listing-quality-card {
    box-shadow: var(--xa-shadow-card);
}

.my-listing-card-v2,
.listing-manager-mobile-card,
.notification-card,
.lot-highlight-card,
.create-source-card {
    border-color: var(--xa-border-soft);
}

.my-listing-card-v2:hover,
.listing-manager-mobile-card:hover,
.notification-card:hover,
.create-source-card:hover {
    box-shadow: var(--xa-shadow-card-hover);
    transform: translateY(-2px);
}

.my-listing-card-v2,
.listing-manager-mobile-card,
.notification-card,
.create-source-card {
    transition:
        transform var(--xa-motion-normal) var(--xa-ease-out),
        box-shadow var(--xa-motion-normal) var(--xa-ease-out),
        border-color var(--xa-motion-normal) var(--xa-ease-out);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: var(--xa-radius-md);
}

.alert::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.alert-success::before { content: '✓'; background: var(--xa-green-100); color: var(--xa-green-600); }
.alert-error::before { content: '!'; background: var(--xa-red-50); color: var(--xa-red-600); }
.alert-warning::before { content: '!'; background: var(--xa-amber-50); color: var(--xa-amber-600); }
.alert-info::before { content: 'i'; background: var(--xa-blue-50); color: var(--xa-blue-600); }

.status-badge,
.listing-chip,
.account-type-badge,
.lot-ownership-badge,
.notification-severity,
.listing-manager-policy-badge,
.listing-expiration {
    font-weight: 800;
    letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
select,
textarea {
    transition:
        border-color var(--xa-motion-normal) var(--xa-ease-out),
        box-shadow var(--xa-motion-normal) var(--xa-ease-out),
        background-color var(--xa-motion-normal) var(--xa-ease-out),
        transform var(--xa-motion-fast) var(--xa-ease-out);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='number']:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
}

dialog[open] {
    animation: xa-dialog-in var(--xa-motion-slow) var(--xa-ease-out);
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(3px);
    animation: xa-fade-in var(--xa-motion-normal) ease-out;
}

.lot-action-dialog__body,
.lot-photo-dialog__body,
.lot-share-modal,
#bid-wallet-dialog > div,
#buy-now-dialog > div {
    box-shadow: var(--xa-shadow-modal);
}

details > summary {
    cursor: pointer;
    user-select: none;
}

details[open] > summary {
    color: var(--accent);
}

[data-xa-reveal] {
    opacity: 0;
    transform: translateY(10px);
}

[data-xa-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity var(--xa-motion-slow) var(--xa-ease-out),
        transform var(--xa-motion-slow) var(--xa-ease-out);
}

.xa-mobile-action-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(14px);
}

.xa-mobile-action-bar__meta {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.xa-mobile-action-bar__label {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.xa-mobile-action-bar__value {
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xa-mobile-action-bar .btn {
    flex: 0 0 auto;
    min-height: 44px;
    border-radius: 14px;
    padding-inline: 16px;
}

.xa-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.xa-toast-region {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.xa-toast {
    max-width: min(360px, calc(100vw - 36px));
    padding: 12px 14px;
    border: 1px solid var(--xa-border-soft);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
    font-size: 14px;
    font-weight: 700;
    animation: xa-toast-in var(--xa-motion-normal) var(--xa-ease-out);
}

.xa-toast.is-leaving {
    animation: xa-toast-out var(--xa-motion-normal) ease-in forwards;
}

@media (max-width: 760px) {
    body.has-mobile-action-bar {
        padding-bottom: 88px;
    }

    .xa-mobile-action-bar {
        display: flex;
    }

    .account-card,
    .account-box,
    .my-listing-card-v2,
    .listing-manager-mobile-card,
    .notification-card {
        box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
    }
}

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

    [data-xa-reveal] {
        opacity: 1;
        transform: none;
    }
}

@keyframes xa-spin { to { transform: rotate(360deg); } }
@keyframes xa-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes xa-dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes xa-toast-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes xa-toast-out {
    to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* V3.1.59 anti-bot form helpers */
.antibot-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.antibot-captcha {
    margin-top: 14px;
}

.anti-bot-settings-box .feature-flag-grid,
.anti-bot-settings-box .revenue-settings-grid {
    gap: 16px;
}
