/* =========================================================
   Labco Vial Builder — Frontend Styles
   Version: 1.9 | Storm Development
   ========================================================= */

.labco-vb {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 24px;
    font-family: inherit;
}

/* ---- Title ---- */
.labco-vb-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1d4723;
    margin: 0 0 24px;
    text-align: center;
}

/* ---- Progress Bar ---- */
.labco-vb-progress {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}

.labco-vb-progress-fill {
    height: 100%;
    background: #1d4723;
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

/* ---- Breadcrumb ---- */
.labco-vb-breadcrumb {
    font-size: 12px;
    color: #999;
    margin-bottom: 28px;
    min-height: 18px;
    text-align: center;
    letter-spacing: 0.02em;
}

.labco-vb-breadcrumb span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.labco-vb-breadcrumb span + span::before {
    content: '›';
    margin: 0 2px;
    color: #ccc;
}

.labco-vb-breadcrumb .vb-bc-current {
    color: #1d4723;
    font-weight: 600;
}

/* ---- Steps ---- */
.labco-vb-step {
    display: none;
    animation: labcoVbFadeIn 0.25s ease;
}

.labco-vb-step.active {
    display: block;
}

@keyframes labcoVbFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.labco-vb-step-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1d4723;
    margin: 0 0 20px;
    text-align: center;
}

/* ---- Option layouts ---- */
.labco-vb-options--grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

/* ---- Cards ---- */
.labco-vb-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 14px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    text-align: center;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.labco-vb-card:hover {
    border-color: #1d4723;
    background: #f0f7f1;
    transform: translateY(-2px);
}

.labco-vb-card.selected {
    border-color: #1d4723;
    background: #e8f5e9;
}

.labco-vb-card-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.labco-vb-card-label {
    font-weight: 600;
    font-size: 14px;
    color: #222;
    line-height: 1.3;
    width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.labco-vb-card-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    display: block;
}

/* Ensure options grid doesn't overflow */
.labco-vb-options--cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* ---- Capacity grid items ---- */
.labco-vb-capacity-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
    text-align: center;
}

.labco-vb-capacity-btn:hover {
    border-color: #1d4723;
    background: #f0f7f1;
}

.labco-vb-capacity-btn.selected {
    border-color: #1d4723;
    background: #e8f5e9;
}

.labco-vb-capacity-btn .cap-ml {
    font-size: 18px;
    font-weight: 700;
    color: #1d4723;
}

.labco-vb-capacity-btn .cap-dia {
    font-size: 11px;
    color: #888;
}

/* ---- Colour swatches ---- */
.labco-vb-options--colours {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 8px 0;
}

.labco-vb-colour-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    padding: 4px;
}

.labco-vb-swatch-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #e0e0e0;
    transition: border-color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.labco-vb-colour-swatch:hover .labco-vb-swatch-circle {
    transform: scale(1.1);
    border-color: #1d4723;
}

.labco-vb-colour-swatch.selected .labco-vb-swatch-circle {
    border-color: #1d4723;
    outline: 3px solid #1d4723;
    outline-offset: 2px;
}

.labco-vb-swatch-label {
    font-size: 11px;
    color: #555;
    font-weight: 500;
}

/* ---- Result area ---- */
.labco-vb-result-wrap {
    min-height: 120px;
}

.labco-vb-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px;
    color: #888;
    font-size: 14px;
}

.labco-vb-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #1d4723;
    border-radius: 50%;
    animation: labcoVbSpin 0.8s linear infinite;
}

@keyframes labcoVbSpin {
    to { transform: rotate(360deg); }
}

.labco-vb-product-header {
    background: #1d4723;
    color: #fff;
    padding: 16px 20px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}

.labco-vb-product-header h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.labco-vb-product-header .vb-sku {
    font-size: 12px;
    opacity: 0.75;
    font-family: monospace;
}

/* ---- Pack sizes ---- */
.labco-vb-pack-sizes {
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

.labco-vb-pack-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.12s;
}

.labco-vb-pack-row:last-child {
    border-bottom: none;
}

.labco-vb-pack-row:hover {
    background: #f9f9f9;
}

.labco-vb-pack-row.selected {
    background: #e8f5e9;
}

.labco-vb-pack-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.labco-vb-pack-sku {
    font-size: 11px;
    color: #999;
    font-family: monospace;
}

.labco-vb-pack-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.labco-vb-pack-price {
    font-size: 16px;
    font-weight: 700;
    color: #1d4723;
}

.labco-vb-cart-btn {
    background: #1d4723;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.labco-vb-cart-btn:hover {
    background: #163619;
}

.labco-vb-cart-btn.adding {
    opacity: 0.6;
    pointer-events: none;
}

.labco-vb-cart-btn.added {
    background: #0a3622;
}

/* ---- Disclaimer ---- */
.labco-vb-pack-unpriced {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

.labco-vb-pricing-notice {
    padding: 16px 20px;
    background: #fff8e8;
    border: 1px solid #f0c060;
    border-radius: 4px;
    font-size: 14px;
    color: #7a5500;
    line-height: 1.6;
    margin: 0;
}

.labco-vb-pricing-notice a {
    color: #1d4723;
    font-weight: 600;
}
    font-size: 12px;
    color: #999;
    text-align: center;
    padding: 0 8px 8px;
    line-height: 1.5;
}

/* ---- No match / error ---- */
.labco-vb-no-match {
    text-align: center;
    padding: 32px 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

.labco-vb-error-msg {
    color: #856404;
    font-size: 14px;
    margin-bottom: 16px;
}

.labco-vb-contact-btn {
    display: inline-block;
    background: #1d4723;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

/* ---- Navigation ---- */
.labco-vb-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.labco-vb-back,
.labco-vb-reset {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    font-family: inherit;
    transition: all 0.15s;
}

.labco-vb-back:hover,
.labco-vb-reset:hover {
    border-color: #1d4723;
    color: #1d4723;
}

/* ---- Summary sidebar ---- */
.labco-vb-summary {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e8e8e8;
}

.labco-vb-summary h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin: 0 0 10px;
    font-weight: 600;
}

.labco-vb-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.labco-vb-summary-item:last-child { border-bottom: none; }
.labco-vb-summary-key { color: #888; font-size: 12px; }
.labco-vb-summary-val { font-weight: 600; color: #1d4723; font-size: 12px; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .labco-vb { padding: 20px 12px; }
    .labco-vb-options--cards { grid-template-columns: 1fr; }
    .labco-vb-pack-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .labco-vb-pack-right { width: 100%; justify-content: space-between; }
}
