:root{
    /* CSS variables for easy theming. Themes can override these on the page. */
    --wo-primary: #0b69ff; /* primary accent */
    --wo-accent: #00bfa5; /* secondary accent */
    --wo-surface: #ffffff; /* surface / card background */
    --wo-muted: #6b7280; /* muted text */
    --wo-border: #e5e7eb; /* border color */
    --wo-radius: 12px;
}

.wo-dashboard {
    padding: 30px;
    background: var(--wo-surface);
    border-radius: var(--wo-radius);
    box-shadow: 0 6px 18px rgba(11,105,255,0.06);
    color: #111827;
}

#wo-search {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid var(--wo-border);
    border-radius: 8px;
    box-sizing: border-box;
}

#wo-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#wo-order-table th,
#wo-order-table td {
    border-bottom: 1px solid #ddd;
    padding: 8px;
}

#wo-order-table th {
    text-align: left;
    background: #f9f9f9;
}

.wo-summary {
    background: linear-gradient(180deg, rgba(11,105,255,0.03), rgba(0,0,0,0.00));
    padding: 16px;
    border-radius: 10px;
    width: 320px;
    border: 1px solid rgba(11,105,255,0.06);
}

.wo-summary p, .wo-summary h4 {
    margin: 5px 0;
}

.button-primary, .wo-summary button {
    background: var(--wo-primary);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(11,105,255,0.12);
}

.button-primary:hover {
    background: color-mix(in srgb, var(--wo-primary) 85%, black 15%);
}

/* Make the layout more responsive and SaaS-like */
.wo-order-form{display:flex;gap:24px;flex-wrap:wrap}
.wo-order-form table{flex:1 1 560px}
.wo-summary{flex:0 0 320px}

/* jQuery UI autocomplete menu styling to ensure suggestions are readable and contained */
.ui-autocomplete {
    background: var(--wo-surface);
    border: 1px solid var(--wo-border);
    box-shadow: 0 6px 18px rgba(11,105,255,0.06);
    max-height: 280px;
    overflow-y: auto;
    padding: 0;
    margin-top: 4px;
    z-index: 99999; /* ensure it appears above other elements */
    box-sizing: border-box;
    /* Make sure the menu doesn't extend past the container - limit to parent width */
    min-width: 220px;
    max-width: 100%;
}
.ui-autocomplete li { list-style: none; }
.ui-menu-item-wrapper {
    padding: 10px 14px;
    cursor: pointer;
    color: #111827;
    font-size: 14px;
}
.ui-menu-item-wrapper.ui-state-active,
.ui-menu-item-wrapper:hover {
    background: rgba(11,105,255,0.06);
    color: #0b2548;
}

/* Prevent the menu from overflowing the main dashboard/card */
.wo-dashboard .ui-autocomplete,
.wo-admin-wrap .ui-autocomplete {
    max-width: calc(100% - 40px);
}
