.calio-inline-products {
    --calio-inline-ink: #182230;
    --calio-inline-muted: #667085;
    --calio-inline-line: #e4e7ec;
    --calio-inline-brand: #1769aa;
    max-width: 1480px;
    color: var(--calio-inline-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.calio-inline-products__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 24px 0 18px;
    padding: 24px 28px;
    border: 1px solid var(--calio-inline-line);
    border-radius: 8px;
    background: #fff;
    animation: calio-inline-fade 360ms ease both;
}

.calio-inline-products__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--calio-inline-brand);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.calio-inline-products__header h1 {
    margin: 0;
    color: var(--calio-inline-ink);
    font-size: 28px;
    letter-spacing: 0;
}

.calio-inline-products__header p {
    margin: 7px 0 0;
    color: var(--calio-inline-muted);
    font-size: 14px;
}

.calio-inline-products__header-icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e7f5ff;
    color: #0a4b78;
}

.calio-inline-products__header-icon .dashicons {
    width: 28px;
    height: 28px;
    font-size: 28px;
}

.calio-inline-products__surface {
    border: 1px solid var(--calio-inline-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    animation: calio-inline-fade 420ms 70ms ease both;
}

.calio-inline-products__toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(220px, auto) auto;
    align-items: end;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--calio-inline-line);
}

.calio-inline-products__search {
    position: relative;
}

.calio-inline-products__search .dashicons {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 18px;
    height: 18px;
    color: #98a2b3;
    font-size: 18px;
    transform: translateY(-50%);
}

.calio-inline-products__search input {
    width: 100%;
    min-height: 38px;
    padding-left: 36px;
}

.calio-inline-products__sort {
    display: grid;
    gap: 5px;
    color: var(--calio-inline-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.calio-inline-products__sort select {
    min-width: 220px;
}

.calio-inline-products__toolbar > .button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 5px;
}

.calio-inline-products__notice {
    min-height: 20px;
    padding: 8px 16px;
    color: var(--calio-inline-muted);
    font-size: 12px;
}

.calio-inline-products__notice.is-success {
    color: #008a20;
}

.calio-inline-products__notice.is-error {
    color: #b32d2e;
}

.calio-inline-products__table-wrap {
    position: relative;
    overflow: auto;
    border-top: 1px solid #f2f4f7;
    border-bottom: 1px solid var(--calio-inline-line);
}

.calio-inline-products__table {
    min-width: 1120px;
    border: 0;
    box-shadow: none;
}

.calio-inline-products__table thead {
    position: sticky;
    z-index: 2;
    top: 0;
}

.calio-inline-products__table th {
    padding: 11px 10px;
    background: #f9fafb;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.calio-inline-products__table td {
    padding: 11px 10px;
    vertical-align: middle;
}

.calio-inline-products__table th:first-child {
    width: 25%;
}

.calio-inline-products__table th:nth-child(3),
.calio-inline-products__table th:nth-child(4) {
    width: 14%;
}

.calio-inline-products__table th:last-child {
    width: 19%;
}

.calio-inline-products__row {
    opacity: 0;
    animation: calio-inline-row 320ms ease forwards;
}

.calio-inline-products__product-name,
.calio-inline-products__product-meta {
    display: block;
}

.calio-inline-products__product-name {
    overflow-wrap: anywhere;
}

.calio-inline-products__product-meta {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 11px;
    text-transform: capitalize;
}

.calio-inline-products__price {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    background: #fff;
}

.calio-inline-products__price:focus-within {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.calio-inline-products__price > span {
    padding: 0 8px;
    color: #667085;
    font-size: 12px;
}

.calio-inline-products__price input {
    width: 100%;
    min-width: 74px;
    border: 0;
    border-left: 1px solid #e4e7ec;
    border-radius: 0;
    box-shadow: none;
}

.calio-inline-products__price input:focus {
    border-color: #e4e7ec;
    box-shadow: none;
}

.calio-inline-products__price input:disabled {
    background: #f2f4f7;
    color: #98a2b3;
}

.calio-inline-products__stock,
.calio-inline-products__status {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.calio-inline-products__stock.is-instock,
.calio-inline-products__status.is-publish {
    background: #ecfdf3;
    color: #027a48;
}

.calio-inline-products__stock.is-outofstock,
.calio-inline-products__status.is-draft {
    background: #fef3f2;
    color: #b42318;
}

.calio-inline-products__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.calio-inline-products__readonly {
    max-width: 130px;
    color: #667085;
    font-size: 11px;
    line-height: 1.3;
}

.calio-inline-products__loading {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--calio-inline-muted);
}

.calio-inline-products__loading[hidden] {
    display: none;
}

.calio-inline-products__loading .spinner {
    float: none;
    margin: 0;
}

.calio-inline-products__empty {
    padding: 40px !important;
    color: var(--calio-inline-muted);
    text-align: center;
}

.calio-inline-products__pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: var(--calio-inline-muted);
    font-size: 12px;
}

.calio-inline-products__pagination > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calio-inline-products__pagination .button {
    display: inline-flex;
    align-items: center;
}

.calio-inline-products__modal {
    position: fixed;
    z-index: 100100;
    inset: 0;
}

.calio-inline-products__modal[hidden] {
    display: none;
}

.calio-inline-products__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.52);
    animation: calio-inline-backdrop 180ms ease both;
}

.calio-inline-products__modal-dialog {
    position: relative;
    width: min(680px, calc(100vw - 40px));
    max-height: min(720px, calc(100vh - 60px));
    margin: 30px auto;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(16, 24, 40, 0.3);
    animation: calio-inline-modal 220ms ease both;
}

.calio-inline-products__modal-dialog > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 22px;
    border-bottom: 1px solid var(--calio-inline-line);
}

.calio-inline-products__modal-dialog > header span {
    color: var(--calio-inline-brand);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.calio-inline-products__modal-dialog h2 {
    margin: 4px 0 0;
    font-size: 20px;
}

.calio-inline-products__modal-close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 5px;
    background: #f2f4f7;
    color: #344054;
    cursor: pointer;
}

.calio-inline-products__modal-content {
    max-height: calc(100vh - 170px);
    padding: 22px;
    overflow: auto;
    color: #475467;
    font-size: 14px;
    line-height: 1.7;
}

.calio-inline-products-modal-open {
    overflow: hidden;
}

@keyframes calio-inline-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes calio-inline-row {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes calio-inline-backdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes calio-inline-modal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 782px) {
    .calio-inline-products__toolbar {
        grid-template-columns: 1fr;
    }

    .calio-inline-products__sort select {
        width: 100%;
        min-width: 0;
    }

    .calio-inline-products__pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .calio-inline-products__header,
    .calio-inline-products__surface,
    .calio-inline-products__row,
    .calio-inline-products__modal-backdrop,
    .calio-inline-products__modal-dialog {
        animation: none;
    }
}
