/* Public Styles for LW Stock on Hand */

/* Wrapper */
.lw-soh-wrapper {
    position: relative;
    width: 100%;
}

/* Table Wrapper with overflow */
.lw-soh-table-wrapper {
    overflow-x: auto;
}

/* Error Wrapper Styles */
.lw-soh-wrapper.lw-soh-na .lw-soh-close-btn {
    display: none;
}

.lw-soh-wrapper.lw-soh-na .lw-soh-table-wrapper p {
    font-size: var(--at-text--3xs);
    color: var(--at-warning);
}

/* Spinner */
.lw-soh-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--at-primary-l-5);
    border-top: 3px solid var(--at-primary);
    border-radius: 50%;
    animation: lw-soh-spin 1s linear infinite;
    margin: 20px 0;
}

@keyframes lw-soh-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Close Button */
.lw-soh-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--at-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 21px;
    height: 21px;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lw-soh-close-btn:hover {
    opacity: 0.8;
}

/* Simple Product Table */
.lw-soh-simple-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--at-border-color);
    font-size: var(--at-text--3xs);
}

.lw-soh-simple-table td {
    padding: 12px;
    border: 1px solid var(--at-border-color);
}

.lw-soh-simple-table .lw-soh-dc-label {
    background: var(--at-neutral-l-5-l-2);
    font-weight: 500;
    width: 60%;
    min-width: 150px;
}

.lw-soh-simple-table .lw-soh-quantity {
    text-align: center;
    width: 40%;
}

/* Variable Product Table */
.lw-soh-variable-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--at-border-color);
    font-size: var(--at-text--3xs);
}

.lw-soh-variable-table th,
.lw-soh-variable-table td {
    padding: 12px;
    border: 1px solid var(--at-border-color);
}

.lw-soh-variable-table thead th {
    background: var(--at-neutral-l-5-l-2);
    font-weight: 600;
    text-align: left;
    font-size: 84%;
}

.lw-soh-variable-table .lw-soh-product-header,
.lw-soh-variable-table .lw-soh-product-cell {
    background: var(--at-neutral-l-5-l-2);
    width: 20%;
    min-width: 140px;
}

.lw-soh-variable-table .lw-soh-quantity {
    text-align: center;
}

.lw-soh-variable-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* SKU and UID Meta Info */
.lw-soh-meta {
    font-size: calc(var(--at-text--2xs) * 0.84);
}

/* Product Name */
.lw-soh-product-name {
    font-weight: 500;
}
