:root {
    --wkwc-pa-label-background-color: var(--wkvot-accent, #60a5fa);
    --wkwc-pa-label-font-color: var(--wkvot-bg, #fff);
}

.wkwc-pa-label {
    background-color: var(--wkwc-pa-label-background-color);
    color: var(--wkwc-pa-label-font-color);
    display: inline-block;
    font-weight: 600;
    line-height: normal;
    margin-top: 12px;
}

/* "After Product Image" label wrapper. Spans a full row so, before JS relocates it into
   the gallery column, it never becomes an extra column beside the image on grid/flex themes. */
.wkwc-pa-after-image-label {
    clear: both;
    display: block;
    grid-column: 1 / -1;
    margin-top: 12px;
    width: 100%;
}

/* Once moved inside the gallery it should read as a caption directly below the image. */
.woocommerce-product-gallery>.wkwc-pa-after-image-label {
    margin-top: 10px;
}

.wkwc-pa-desc {
    color: var(--wkvot-ink-3, #6b6b6f);
    display: block;
    font-size: 0.9em;
    line-height: 1.5;
    margin-top: 8px;
}

.wkwc-pa-hide {
    display: none !important;
}

.woocommerce-help-tip {
    color: var(--wkvot-ink-3, #6b6b6f);
    display: inline-block;
    font-size: 1.1em;
    font-style: normal;
    height: 13px;
    line-height: 13px;
    position: relative;
    width: 13px;
}

.woocommerce-help-tip:after {
    font-family: Dashicons;
    font-variant: normal;
    font-weight: 400;
    line-height: 1;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    content: "";
    cursor: help;
    height: 100%;
    left: 0;
    margin: 0;
    position: absolute;
    text-align: center;
    text-indent: 0;
    top: 0;
    width: 100%;
}

#tiptip_holder.tip_top {
    padding-bottom: 5px;
}

#tiptip_holder {
    display: none;
    left: 0;
    position: absolute;
    top: 7px;
    z-index: 8675309;
}

#tiptip_arrow,
#tiptip_arrow_inner {
    height: 0;
    position: absolute;
    width: 0;
}

#tiptip_holder.tip_top #tiptip_arrow_inner {
    border-top-color: var(--wkvot-ink, #1c1c1e);
}

#tiptip_content,
.chart-tooltip,
.wc_error_tip {
    background: var(--wkvot-ink, #1c1c1e);
    border-radius: var(--wkvot-radius, 4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    color: var(--wkvot-bg, #fff);
    font-size: .8em;
    max-width: 150px;
    padding: .618em 1em;
    text-align: center;
}

.wkwc-pa-status {
    border-radius: var(--wkvot-radius, 4px);
    color: var(--wkvot-bg, #fff);
    display: inline-block;
    font-weight: 600;
    line-height: normal;
    padding: 4px 8px;
    text-transform: uppercase;
    font-size: 11px;
}

.wkwc-pa-status.wkwc-pa-status-attachments_pending {
    background-color: var(--wkvot-ink-3, #6b6b6f);
}

.wkwc-pa-status.wkwc-pa-status-pending {
    background-color: var(--wkvot-accent-warn, #c2410c);
}

.wkwc-pa-status.wkwc-pa-status-approved {
    background-color: var(--wkvot-accent-success, #2c8d65);
}

.wkwc-pa-status.wkwc-pa-status-rejected {
    background-color: var(--wkvot-accent-danger, #d92d20);
}

.wkwcpa-alert {
    border: 1px solid transparent;
    border-radius: var(--wkvot-radius, 4px);
    margin-bottom: 1rem;
    padding: .75rem 1.25rem;
    position: relative;
}

.wkwcpa-alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}


/* Re-establish a clean float context for the cart layout that follows. */
#cart_prescription.wkwcpa_classic_cart::after {
    clear: both;
    content: "";
    display: table;
}

/* Cart layout guard (see guardProceedToCheckoutLayout in wkwc_pa_front.js).
   When the card is hooked onto woocommerce_proceed_to_checkout it renders inside the
   theme's .wc-proceed-to-checkout wrapper. Themes that make that wrapper a flex/grid
   row (e.g. Tailwind `.flex` in the Ethereal theme) turn our card and the checkout
   button into sibling flex items, distorting the button. These rules only take effect
   on the exact container our card was injected into — every other theme, page and the
   button on a normal cart stay completely untouched.
   .wkwcpa-proceed-has-rx is added by JS (works everywhere); the :has() selector is a
   no-JS progressive enhancement that browsers without :has() simply ignore. */
.wc-proceed-to-checkout.wkwcpa-proceed-has-rx,
.wc-proceed-to-checkout:has(> #cart_prescription.wkwcpa_classic_cart) {
    display: block;
}

.wc-proceed-to-checkout.wkwcpa-proceed-has-rx>.checkout-button,
.wc-proceed-to-checkout:has(> #cart_prescription.wkwcpa_classic_cart)>.checkout-button {
    width: 100%;
    box-sizing: border-box;
}

/* Keep the injected card on its own full-width row regardless of the surrounding
   layout context (flex item, grid cell or plain block). */
#cart_prescription.wkwcpa_classic_cart {
    box-sizing: border-box;
    width: 100%;
    flex-basis: 100%;
}

.wc-proceed-to-checkout.wkwcpa-proceed-has-rx>#cart_prescription.wkwcpa_classic_cart,
.wc-proceed-to-checkout:has(> #cart_prescription.wkwcpa_classic_cart)>#cart_prescription.wkwcpa_classic_cart {
    margin-top: 14px;
}

.wkwcpa_classic_cart .wkwc_pa_prescription-card {
    max-width: 100%;
    width: 100%;
}

/* Block Cart / Checkout: the card is appended after the woocommerce/cart or
   woocommerce/checkout block (see wkwc_pa_inject_prescription_in_blocks). Give it the
   same page gutter the blocks use and a little separation from the block above. */
.wkwcpa_block_cart {
    box-sizing: border-box;
    width: 100%;
    margin: 24px auto 0;
}

.wkwcpa_classic_cart .wkwc_pa_prescription-card .wkwc_pa_prescription-header {
    align-items: center;
    background: var(--wkvot-bg-soft, #fafaf8);
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--wkvot-line, #ececec);
    border-radius: var(--wkvot-radius-lg, 8px) var(--wkvot-radius-lg, 8px) 0 0;
}

.wkwcpa_classic_cart .wkwc_pa_prescription-card .wkwc_pa_prescription-header .wkwcpa_left_aligned {
    align-self: flex-start;
}

.wkwcpa_classic_cart .wkwc_pa_prescription-card .wkwcpa_attachment_body {
    padding-top: 20px;
}

.wkwcpa_classic_cart .wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box {
    height: 160px;
    padding: 15px;
    width: 100%;
}

.wkwcpa_classic_cart .wkwc_pa_prescription-card .wkwc-pa-prescription-attachment-box {
    padding-bottom: 70px;
}

.wkwc_pa_prescription-card {
    background: var(--wkvot-bg, #ffffff);
    border: 1px solid var(--wkvot-line, #ececec);
    border-radius: var(--wkvot-radius-lg, 8px);
    box-shadow: 0 2px 12px rgba(28, 28, 30, 0.04);
    font-family: var(--wkvot-font, Inter, "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    max-width: 500px;
    padding: 20px !important;
}

.wkwc_pa_prescription-card .wkwc_pa_prescription-header {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.wkwc_pa_prescription-card .wkwc_pa_prescription-header h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    font-family: var(--wkvot-font, inherit);
    color: var(--wkvot-ink, #1c1c1e);
}

.wkwc_pa_prescription-card .wkwc_pa_prescription-header .wkwc_pa_info-icon {
    align-items: center;
    background: var(--wkvot-bg-soft, #fafaf8);
    border: 1px solid var(--wkvot-line, #ececec);
    border-radius: 50%;
    color: var(--wkvot-ink-3, #6b6b6f);
    cursor: help;
    display: flex;
    font-size: 12px;
    height: 18px;
    justify-content: center;
    width: 18px;
}

.wkwc_pa_prescription-card .wkwc_pa_prescription-actions {
    margin-bottom: 10px;
}

.wkwc_pa_prescription-card .wkwc_pa_prescription-actions label {
    color: var(--wkvot-ink-2, #3a3a3c);
    font-size: 13.5px;
    font-family: var(--wkvot-font, inherit);
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box {
    background: var(--wkvot-bg-soft, #fafaf8);
    border: 2px dashed var(--wkvot-line-2, #e4e4e1);
    border-radius: var(--wkvot-radius-lg, 8px);
    cursor: pointer;
    padding: 30px;
    position: relative;
    text-align: center;
    transition: background var(--wkvot-dur-base, .2s) ease, border-color var(--wkvot-dur-base, .2s) ease;
    width: 100%;
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box .wkwc_pa_upload-icon {
    color: var(--wkvot-ink-3, #6b6b6f);
    font-size: 32px;
    margin-bottom: 10px;
    transition: color var(--wkvot-dur-base, .2s) ease;
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box p {
    color: var(--wkvot-ink, #1c1c1e);
    font-size: 14px;
    margin: 0;
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box span {
    color: var(--wkvot-ink-3, #6b6b6f);
    font-size: 12px;
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box .wkwc_pa_file-input {
    cursor: pointer;
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box:hover {
    background: var(--wkvot-bg-tile, #f3f1ec);
    border-color: var(--wkvot-accent, #60a5fa);
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box:hover .wkwc_pa_upload-icon {
    color: var(--wkvot-accent, #60a5fa);
}

.wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwcpa-attachments-preview {
    padding-left: 5px;
    width: 62%;
}

.wkwc_pa_prescription-card .wkwcpa-attachments-preview label {
    display: inline-block;
    height: 100px;
    padding-left: 5px;
    width: 100px;
}

.wkwc_pa_prescription-card .wkwcpa-attachments-preview label .wkwc-pa-remove-prescription {
    left: 75%;
    position: relative;
    top: 20px;
}

.wkwc_pa_prescription-card .wkwcpa-attachments-preview label .wkwc-pa-remove-prescription:before {
    background: var(--wkvot-accent-danger, #d92d20);
    border: 1px solid var(--wkvot-accent-danger, #d92d20);
    border-radius: 50%;
    box-shadow: 0 2px 8px 0 rgba(99, 99, 99, .2);
    color: #fff;
    content: "x";
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    padding: 0 5px;
    z-index: 99;
    cursor: pointer;
}

.wkwc_pa_prescription-card .wkwc-pa-prescription-attachment-box {
    display: block !important;
    margin: 0;
}

@media (max-width: 720px) {
    .wkwc_pa_prescription-card .wkwc_pa_upload-area {
        flex-direction: column;
        align-items: stretch;
    }

    .wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwc_pa_upload-box {
        width: 100%;
        margin-bottom: 16px;
    }

    .wkwc_pa_prescription-card .wkwc_pa_upload-area .wkwcpa-attachments-preview {
        width: 100%;
        padding-left: 0;
    }
}


/* Main Wrapper */
.wkwc-pa-pillbox-wrapper {
    font-family: var(--wp--preset--font-family--body, "Inter", "Helvetica Neue", Arial, sans-serif);
    margin-top: 10px;
}

.wkwc-pa-pillbox-wrapper h3,
.wkwc-vault-wrapper .wkwc-dashboard-header h3,
.wkwc-medical-header h3 {
    font-family: var(--wp--preset--font-family--display, "Playfair Display", Georgia, serif);
    font-size: 24px;
    font-weight: 500;
    color: var(--wp--preset--color--ink, #0f1a2b);
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

/* Dashboard Headers */
.wkwc-dashboard-header {
    background: var(--wp--preset--color--surface, #f7f5f0);
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    padding: 30px;
    margin-bottom: 30px;
}

.wkwc-dashboard-header p {
    margin: 0;
    color: var(--wp--preset--color--muted, #6b6b6b);
    font-family: var(--wp--preset--font-family--body, "Inter", sans-serif);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
}

/* Form Styles */
.wkwc-pa-pillbox-form {
    background: var(--wp--preset--color--paper, #ffffff);
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    padding: 30px;
    margin-bottom: 40px;
}

.wkwc-pa-pillbox-form .wkwc-form-row {
    margin-bottom: 20px;
}

.wkwc-pa-pillbox-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--wp--preset--color--ink, #0f1a2b);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wkwc-pa-pillbox-form .input-text {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    border-radius: 0;
    background-color: var(--wp--preset--color--paper, #ffffff);
    color: var(--wp--preset--color--text, #1a1a1a);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wkwc-pa-pillbox-form .input-text:focus {
    border-color: var(--wp--preset--color--accent, #c9a14a);
    outline: none;
}

/* Custom formatting for standard / select2 dropdowns */
.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--wp--preset--color--rule, #e6e2da) !important;
    background-color: var(--wp--preset--color--paper, #ffffff) !important;
    border-radius: 0 !important;
    padding: 6px !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--wp--preset--color--accent, #c9a14a) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--wp--preset--color--surface, #f7f5f0) !important;
    border: 1px solid var(--wp--preset--color--rule, #e6e2da) !important;
    color: var(--wp--preset--color--text, #1a1a1a) !important;
    font-size: 12px !important;
    padding: 2px 8px !important;
    border-radius: 2px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--wp--preset--color--muted, #6b6b6b) !important;
    margin-right: 5px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--wp--preset--color--accent, #c9a14a) !important;
}

/* Saved List Table Styles */
.wkwc-pa-table,
.wkwc-records-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    background: var(--wp--preset--color--paper, #ffffff);
}

.wkwc-pa-table thead tr,
.wkwc-records-table thead tr {
    background: var(--wp--preset--color--surface, #f7f5f0);
    border-bottom: 1px solid var(--wp--preset--color--rule, #e6e2da);
}

.wkwc-pa-table th,
.wkwc-records-table th {
    padding: 16px 20px;
    font-weight: 500;
    color: var(--wp--preset--color--ink, #0f1a2b);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border: none;
}

.wkwc-pa-table td,
.wkwc-records-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--wp--preset--color--rule, #e6e2da);
    color: var(--wp--preset--color--text, #1a1a1a);
    font-size: 14px;
    vertical-align: middle;
    font-weight: 400;
}

.wkwc-pa-table tr:last-child td,
.wkwc-records-table tr:last-child td {
    border-bottom: none;
}

.wkwc-pa-table td.box-name {
    font-weight: 500;
    color: var(--wp--preset--color--ink, #0f1a2b);
}

.wkwc-pa-table td.box-name strong,
.wkwc-pa-table td.box-name b {
    font-weight: 500 !important;
}

.wkwc-pa-table td.medicine-list {
    color: var(--wp--preset--color--text, #1a1a1a);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
}

.wkwc-empty-folders-text,
.wkwc-no-attachment-text {
    color: var(--wp--preset--color--muted, #6b6b6b);
    font-style: italic;
    font-size: 13px;
}

.wkwc-record-id-badge {
    background: var(--wp--preset--color--surface, #f7f5f0);
    padding: 4px 8px;
    font-size: 11px;
    color: var(--wp--preset--color--muted, #6b6b6b);
    display: inline-block;
    margin-top: 6px;
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    font-weight: 400;
}

.wkwc-assigned-meds-list {
    margin: 0;
    padding-left: 18px;
    list-style-type: square;
    color: var(--wp--preset--color--text, #1a1a1a);
    font-weight: 400;
}

.wkwc-assigned-meds-list li {
    margin-bottom: 6px;
}

.wkwc-med-qty-badge {
    color: var(--wp--preset--color--accent, #c9a14a);
    font-weight: 400;
}

.wkwc-records-table-container {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    margin-bottom: 30px;
}

.wkwc-actions-th,
.wkwc-actions-td {
    text-align: right !important;
}

/* Action Buttons (Orange #ff6a00, black, white theme) */
.wkwc-pa-btn-submit,
.wkwc-pa-btn-buy,
.btn-fast-reorder,
.btn-order,
.wkwc-vault-wrapper .wkwc-upload-box button[type="submit"] {
    display: inline-block !important;
    background-color: #ff6a00 !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    font-size: 12px !important;
    font-family: var(--wp--preset--font-family--body, "Inter", sans-serif) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
    box-shadow: none !important;
    text-align: center;
}

.wkwc-pa-btn-submit:hover,
.wkwc-pa-btn-buy:hover,
.btn-fast-reorder:hover,
.btn-order:hover,
.wkwc-vault-wrapper .wkwc-upload-box button[type="submit"]:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Secondary / Ghost CTA buttons */
.btn-view-presc,
.btn-download {
    display: inline-block !important;
    background-color: transparent !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    padding: 10px 20px !important;
    font-size: 12px !important;
    font-family: var(--wp--preset--font-family--body, "Inter", sans-serif) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
    box-shadow: none !important;
    text-align: center;
}

.btn-view-presc:hover,
.btn-download:hover {
    background-color: #ff6a00 !important;
    border-color: #ff6a00 !important;
    color: #ffffff !important;
}

/* Danger / Delete buttons */
.wkwc-delete-btn,
.wkwc-pa-table td .wkwc-delete-btn,
.wkwc-rx-card .rx-actions-row a.btn-delete {
    background: transparent !important;
    color: #dc2626 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    text-decoration: underline !important;
    display: inline-block !important;
    cursor: pointer;
    transition: color 0.2s ease !important;
    box-shadow: none !important;
}

.wkwc-delete-btn:hover,
.wkwc-pa-table td .wkwc-delete-btn:hover,
.wkwc-rx-card .rx-actions-row a.btn-delete:hover {
    color: #991b1b !important;
    background: transparent !important;
}

/* Vault: Analyze button + status message */
.wkwc-rx-card .rx-actions-row button.btn-analyze {
    display: inline-block !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    font-size: 12px !important;
    font-family: var(--wp--preset--font-family--body, "Inter", sans-serif) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease !important;
    box-shadow: none !important;
    text-align: center;
}

.wkwc-rx-card .rx-actions-row button.btn-analyze:hover {
    background-color: #ff6a00 !important;
    color: #ffffff !important;
}

.wkwc-rx-card .rx-actions-row button.btn-analyze:disabled {
    opacity: 0.7;
    cursor: default;
}

.wkwc-rx-card .rx-analyze-msg {
    margin: 4px 0 10px;
    font-size: 12px;
    font-weight: 500;
}

/* Vault: analysis result popup */
.wkwc-vault-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.wkwc-vault-modal {
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    overflow: auto;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.wkwc-vault-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eef0f2;
}

.wkwc-vault-modal-head h3 {
    margin: 0;
    font-size: 18px;
}

.wkwc-vault-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
}

.wkwc-vault-modal-body {
    padding: 20px;
}

.wkwc-vault-conf {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #dcdcde;
    background: #f6f7f7;
}

.wkwc-vault-conf span {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.wkwc-vault-conf.wkwc-vault-conf-high {
    background: #edf7ed;
    color: #1e4620;
    border-color: #c3e6cb;
}

.wkwc-vault-conf.wkwc-vault-conf-medium {
    background: #fffbeb;
    color: #854d0e;
    border-color: #fef08a;
}

.wkwc-vault-conf.wkwc-vault-conf-low {
    background: #fde8e8;
    color: #9b1c1c;
    border-color: #f8b4b4;
}

.wkwc-vault-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 14px;
}

.wkwc-vault-field-label {
    width: 130px;
    color: #6b7280;
    font-weight: 600;
}

.wkwc-vault-field-value {
    flex: 1;
}

.wkwc-vault-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.wkwc-vault-chip-found {
    background: #def7ec;
    color: #03543f;
}

.wkwc-vault-chip-missing {
    background: #fde8e8;
    color: #9b1c1c;
}

.wkwc-vault-chip-neutral {
    background: #eef2ff;
    color: #3730a3;
}

.wkwc-vault-med-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 13px;
}

.wkwc-vault-med-table th,
.wkwc-vault-med-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #eef0f2;
}

.wkwc-vault-med-table th {
    color: #6b7280;
}

.wkwc-vault-empty {
    margin-top: 16px;
    font-style: italic;
    color: #6b7280;
}

/* Divider Line */
.wkwc-pa-divider {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid var(--wp--preset--color--rule, #e6e2da);
}

/* Dashboard Prescriptions Vault Layout */
.wkwc-vault-wrapper .wkwc-upload-box {
    background: var(--wp--preset--color--paper, #ffffff);
    border: 2px dashed var(--wp--preset--color--rule, #e6e2da);
    border-radius: 0;
    padding: 40px 30px;
    margin-bottom: 40px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.wkwc-vault-wrapper .wkwc-upload-box:hover {
    border-color: var(--wp--preset--color--accent, #c9a14a);
}

.wkwc-vault-wrapper .wkwc-upload-box .upload-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.7;
}

.wkwc-vault-wrapper .wkwc-upload-box label {
    font-weight: 500;
    color: var(--wp--preset--color--ink, #0f1a2b);
    font-size: 14px;
    display: block;
    margin-bottom: 15px;
}

.wkwc-vault-wrapper .wkwc-upload-box input[type="file"] {
    display: inline-block;
    padding: 8px 12px;
    background: var(--wp--preset--color--surface, #f7f5f0);
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    border-radius: 0;
    font-size: 13px;
    color: var(--wp--preset--color--muted, #6b6b6b);
    margin-bottom: 20px;
}

.wkwc-vault-wrapper .wkwc-prescriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.wkwc-rx-card {
    background: var(--wp--preset--color--paper, #ffffff);
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease;
}

.wkwc-rx-card:hover {
    border-color: var(--wp--preset--color--accent, #c9a14a);
}

.wkwc-rx-card .rx-image-wrap {
    height: 200px;
    overflow: hidden;
    background: var(--wp--preset--color--surface, #f7f5f0);
    border-bottom: 1px solid var(--wp--preset--color--rule, #e6e2da);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wkwc-rx-card .rx-image-wrap span.rx-pdf-icon {
    font-size: 48px;
    opacity: 0.7;
}

.wkwc-rx-card .rx-image-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    padding: 15px;
}

.wkwc-rx-card .rx-card-details {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wkwc-rx-card .rx-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.wkwc-rx-card .rx-status-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wkwc-rx-card .rx-status-badge.rx-status-approved {
    background: #e6f4ea;
    color: #137333;
}

.wkwc-rx-card .rx-status-badge.rx-status-rejected {
    background: #fce8e6;
    color: #c5221f;
}

.wkwc-rx-card .rx-status-badge.rx-status-pending {
    background: var(--wp--preset--color--surface, #f7f5f0);
    color: var(--wp--preset--color--muted, #6b6b6b);
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
}

.wkwc-rx-card .rx-date {
    font-size: 11px;
    color: var(--wp--preset--color--muted, #6b6b6b);
    font-weight: 400;
}

.wkwc-rx-card h4 {
    margin: 0 0 8px 0;
    font-family: var(--wp--preset--font-family--display, "Playfair Display", Georgia, serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--wp--preset--color--ink, #0f1a2b);
}

.wkwc-rx-card p.rx-reg-id {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--wp--preset--color--muted, #6b6b6b);
    font-weight: 400;
}

.wkwc-rx-card .rx-meds-box {
    background: var(--wp--preset--color--surface, #f7f5f0);
    border: 1px solid var(--wp--preset--color--rule, #e6e2da);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 24px;
    flex-grow: 1;
}

.wkwc-rx-card .rx-meds-box p.rx-meds-title {
    margin: 0 0 10px 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--wp--preset--color--ink, #0f1a2b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wkwc-rx-card .rx-meds-box ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--wp--preset--color--text, #1a1a1a);
    line-height: 1.5;
    font-weight: 400;
}

.wkwc-rx-card .rx-meds-box p.no-meds-info {
    margin: 0;
    font-size: 12px;
    color: var(--wp--preset--color--muted, #6b6b6b);
    font-style: italic;
    font-weight: 400;
}

.wkwc-rx-card .rx-actions-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--wp--preset--color--rule, #e6e2da);
    padding-top: 20px;
    margin-top: auto;
}

.wkwc-vault-info-box {
    border: 1px solid var(--wp--preset--color--rule, #e6e2da) !important;
    background-color: var(--wp--preset--color--surface, #f7f5f0) !important;
    color: var(--wp--preset--color--text, #1a1a1a) !important;
    border-left: 4px solid var(--wp--preset--color--accent, #c9a14a) !important;
    padding: 16px 20px;
    font-weight: 400;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {

    /* Prevent table distortion on mobile by enabling horizontal scroll on minimum width tables */
    .wkwc-records-table,
    .wkwc-pa-table {
        min-width: 700px;
    }

    .wkwc-pa-pillbox-form {
        padding: 20px;
    }
}

/* Sidebar navigation icons matching the theme style */
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--wkwc-medical-records a::before,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--my-prescriptions a::before,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--my-pill-box a::before {
    content: "";
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 20px 20px;
    mask-size: 20px 20px;
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--wkwc-medical-records a::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 3a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2M3 4h10v10H3z M6 7h4 M6 10h4'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 3a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2M3 4h10v10H3z M6 7h4 M6 10h4'/></svg>");
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--my-prescriptions a::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M3 2h7l3 3v9H3z'/><path d='M9 2v3h3'/><path d='M6 7h4 M6 10h4'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M3 2h7l3 3v9H3z'/><path d='M9 2v3h3'/><path d='M6 7h4 M6 10h4'/></svg>");
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--my-pill-box a::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='5' width='12' height='6' rx='3'/><path d='M8 5v6'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='5' width='12' height='6' rx='3'/><path d='M8 5v6'/></svg>");
}

/* Redesigned Prescription Card & States */
.m3-card {
    background-color: var(--wkvot-bg, #ffffff);
    border: 1px solid var(--wkvot-line, #ececec);
    border-radius: var(--wkvot-radius-lg, 8px);
    box-shadow: 0 2px 12px rgba(28, 28, 30, 0.04);
    color: var(--wkvot-ink, #1c1c1e);
    display: flex;
    flex-direction: column;
    font-size: 16px;
    font-weight: 400;
    max-width: 500px;
    padding: 24px;
    text-align: start;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    margin-top: 15px;
    margin-bottom: 15px;
}

.m3-head {
    align-items: center;
    background-color: transparent;
    display: flex;
    flex-direction: row;
    height: auto;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
}

.m3-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: var(--wkvot-ink, #1c1c1e);
    font-family: var(--wkvot-font, inherit);
}

.m3-help {
    align-items: center;
    background-color: transparent !important;
    background: transparent !important;
    border-radius: 999px;
    color: var(--wkvot-ink-3, #6b6b6f);
    cursor: help;
    display: grid;
    height: 20px;
    width: 20px;
    border: none !important;
    box-shadow: none !important;
}

.m3-help.woocommerce-help-tip:after {
    content: none !important;
    display: none !important;
}

/* Drag and Drop Upload Area */
.m3-upload-zone {
    align-items: center;
    background-color: var(--wkvot-bg-soft, #fafaf8);
    border: 2px dashed var(--wkvot-line-2, #e4e4e1);
    border-radius: var(--wkvot-radius-lg, 8px);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: background-color var(--wkvot-dur-base, 0.2s) ease, border-color var(--wkvot-dur-base, 0.2s) ease;
    width: 100%;
    box-sizing: border-box;
}

.m3-upload-zone:hover {
    background-color: var(--wkvot-bg-tile, #f3f1ec);
    border-color: var(--wkvot-accent, #c9a14a);
}

.m3-upload-zone svg {
    color: var(--wkvot-ink-3, #6b6b6f);
    margin-bottom: 12px;
    transition: color var(--wkvot-dur-base, 0.2s) ease;
}

.m3-upload-zone:hover svg {
    color: var(--wkvot-accent, #c9a14a);
}

.dz-strong {
    color: var(--wkvot-ink, #1c1c1e);
    font-size: 16px;
    font-weight: 500;
}

.dz-hint {
    color: var(--wkvot-ink-3, #6b6b6f);
    font-size: 12.5px;
    margin-top: 4px;
    margin-bottom: 16px;
}

/* Buttons */
.m3-card .m3-btn {
    align-items: center;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: row;
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    justify-content: center;
    padding: 0 20px;
    transition: background-color var(--wkvot-dur-base, 0.2s) ease, color var(--wkvot-dur-base, 0.2s) ease;
    gap: 8px;
    text-decoration: none !important;
    white-space: nowrap !important;
    width: auto !important;
}

.m3-card .m3-btn-filled {
    background-color: var(--wkvot-accent, #c9a14a);
    color: var(--wkvot-bg, #ffffff) !important;
}

.m3-card .m3-btn-filled:hover {
    background-color: var(--wkvot-ink, #1c1c1e);
    color: var(--wkvot-bg, #ffffff) !important;
}

.m3-card .m3-btn-tonal {
    background-color: var(--wkvot-bg-soft, #fafaf8);
    border: 1px solid var(--wkvot-line, #ececec);
    color: var(--wkvot-ink, #1c1c1e) !important;
}

.m3-card .m3-btn-tonal:hover {
    background-color: var(--wkvot-bg-tile, #f3f1ec);
}

/* File list rows */
.m3-frow {
    align-items: center;
    background-color: transparent;
    border: 1px solid var(--wkvot-line, #ececec);
    border-radius: var(--wkvot-radius, 4px);
    display: flex;
    flex-direction: row;
    height: 60px;
    margin-bottom: 12px;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
}

.m3-fthumb {
    align-items: center;
    background-color: var(--wkvot-bg-soft, #fafaf8);
    border-radius: var(--wkvot-radius, 4px);
    display: grid;
    height: 40px;
    width: 40px;
    overflow: hidden;
    place-items: center;
}

.m3-fthumb img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.m3-fthumb svg {
    color: var(--wkvot-accent, #c9a14a);
}

.m3-fmeta {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-left: 12px;
    overflow: hidden;
    text-align: left;
}

.m3-fname {
    color: var(--wkvot-ink, #1c1c1e);
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.m3-fsize {
    color: var(--wkvot-ink-3, #6b6b6f);
    font-size: 12px;
    margin-top: 2px;
}

.m3-card .m3-iconbtn {
    align-items: center;
    background-color: transparent;
    border: none;
    border-radius: 999px;
    color: var(--wkvot-accent-danger, #d92d20);
    cursor: pointer;
    display: grid;
    height: 36px;
    place-items: center;
    width: 36px;
    padding: 0;
    transition: background-color var(--wkvot-dur-base, 0.2s) ease;
}

.m3-card .m3-iconbtn:hover {
    background-color: var(--wkvot-bg-soft, #fafaf8);
}

.m3-frow span {
    color: var(--wkvot-accent-success, #2c8d65);
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.m3-card input[type="file"].wkwc_pa_file-input {
    cursor: pointer;
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
}

/* Also style the original classes to support blocks checkout if fallback is needed */
.wkwc_pa_prescription-card {
    background-color: var(--wkvot-bg, #ffffff);
    border: 1px solid var(--wkvot-line, #ececec);
    border-radius: var(--wkvot-radius-lg, 8px);
    box-shadow: 0 2px 12px rgba(28, 28, 30, 0.04);
    color: var(--wkvot-ink, #1c1c1e);
    padding: 24px;
    box-sizing: border-box;
}

.wkwc_pa_prescription-header h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: var(--wkvot-ink, #1c1c1e);
}

.wkwc_pa_upload-area {
    border: none !important;
    padding: 0 !important;
}

.wkwc_pa_prescription-card .wkwcpa-attachments-preview label {
    border: 1px solid var(--wkvot-line, #ececec) !important;
    border-radius: var(--wkvot-radius, 4px) !important;
    padding: 5px !important;
    background: transparent !important;
}

/* ==========================================================================
   Frontend Prescription Search (Quick Order) — theme-aligned UI
   ========================================================================== */
.wkwc-frontend-rx-container {
    background: var(--wkvot-bg, #ffffff);
    border: 1px solid var(--wkvot-line, #ececec);
    border-radius: var(--wkvot-radius-lg, 16px);
    box-shadow: 0 2px 14px rgba(28, 28, 30, 0.05);
    box-sizing: border-box;
    color: var(--wkvot-ink, #1c1c1e);
    font-family: var(--wkvot-font, Inter, "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    margin: 20px 0;
    padding: 22px 24px;
}

.wkwc-rx-head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.wkwc-rx-head-icon {
    align-items: center;
    background: var(--wkvot-bg-tile, #f3f1ec);
    border-radius: 50%;
    color: var(--wkvot-ink, #1c1c1e);
    display: inline-flex;
    flex: 0 0 auto;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.wkwc-rx-head-text {
    min-width: 0;
}

.wkwc-frontend-rx-container .rx-title {
    color: var(--wkvot-ink, #1c1c1e);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px;
}

.wkwc-frontend-rx-container .rx-subtitle {
    color: var(--wkvot-ink-3, #6b6b6f);
    font-size: 13.5px;
    line-height: 1.45;
    margin: 0;
}

.wkwc-frontend-rx-container .rx-flex-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Custom-styled file picker (native input visually hidden) */
.wkwc-rx-file {
    align-items: center;
    background: var(--wkvot-bg-soft, #fafaf8);
    border: 1px dashed var(--wkvot-line-2, #e4e4e1);
    border-radius: 999px;
    color: var(--wkvot-ink-2, #3a3a3c);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 11px 18px;
    position: relative;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.wkwc-rx-file:hover {
    background: var(--wkvot-bg-tile, #f3f1ec);
    border-color: var(--wkvot-accent, #60a5fa);
    color: var(--wkvot-ink, #1c1c1e);
}

.wkwc-rx-file input[type="file"] {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.wkwc-rx-file-icon {
    color: var(--wkvot-ink-3, #6b6b6f);
    display: inline-flex;
    flex: 0 0 auto;
}

.wkwc-rx-file-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wkwc-rx-file.has-file {
    background: var(--wkvot-bg-tile, #f3f1ec);
    border-style: solid;
    border-color: var(--wkvot-accent, #60a5fa);
    color: var(--wkvot-ink, #1c1c1e);
}

/* Pill buttons matching the theme */
.wkwc-rx-btn {
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 22px;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
    white-space: nowrap;
}

.wkwc-rx-btn:focus-visible {
    outline: 2px solid var(--wkvot-accent, #60a5fa);
    outline-offset: 2px;
}

.wkwc-rx-btn--primary {
    background: var(--wkvot-ink, #1c1c1e);
    color: var(--wkvot-bg, #ffffff);
}

.wkwc-rx-btn--primary:hover {
    background: var(--wkvot-ink-2, #3a3a3c);
    color: var(--wkvot-bg, #ffffff);
}

.wkwc-rx-btn--primary:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.wkwc-rx-btn--ghost {
    background: transparent;
    border-color: var(--wkvot-line, #ececec);
    color: var(--wkvot-ink-2, #3a3a3c);
    /* Hidden until a filter is active; JS toggles visibility */
    display: none;
}

.wkwc-rx-btn--ghost:hover {
    background: var(--wkvot-bg-soft, #fafaf8);
    border-color: var(--wkvot-line-2, #e4e4e1);
    color: var(--wkvot-ink, #1c1c1e);
}

/* Loader — hidden by default, shown only while scanning */
.wkwc-rx-loader {
    align-items: center;
    color: var(--wkvot-ink-3, #6b6b6f);
    display: none;
    font-size: 13.5px;
    font-weight: 500;
    gap: 8px;
}

.wkwc-rx-loader.is-visible {
    display: inline-flex;
}

.wkwc-rx-spinner {
    animation: wkwc-rx-spin .7s linear infinite;
    border: 2px solid var(--wkvot-line-2, #e4e4e1);
    border-radius: 50%;
    border-top-color: var(--wkvot-accent, #60a5fa);
    display: inline-block;
    height: 15px;
    width: 15px;
}

@keyframes wkwc-rx-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status banner shell — colors are set inline by JS */
#rx_filter_status_banner {
    border-radius: var(--wkvot-radius, 10px);
    display: none;
    font-size: 13.5px;
    font-weight: 500;
    margin-top: 16px;
    padding: 11px 16px;
}

@media (max-width: 600px) {
    .wkwc-frontend-rx-container .rx-flex-row {
        align-items: stretch;
        flex-direction: column;
    }

    .wkwc-rx-file,
    .wkwc-rx-btn {
        justify-content: center;
        width: 100%;
    }
}