/* ── Tript Prescription Upload ── */

/*
 * Force the prescription block to always occupy its own full-width row,
 * regardless of how the theme lays out form.cart (flex, grid, etc.).
 * We make form.cart wrap and give our block order:-1 so it sorts to the top.
 */
form.cart {
    flex-wrap: wrap !important;
}

.tript-prescription-wrap {
    /* Take the full width of the flex/grid row */
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    /* Sort before everything else inside form.cart */
    order: -1 !important;
    display: block !important;
    clear: both;

    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    font-family: inherit;
    box-sizing: border-box;
}

/* Question heading */
.tript-rx-question {
    font-weight: 700;
    font-size: calc(1rem + 4px);
    margin: 0 0 4px;
    color: #222;
}

.tript-required {
    color: #e2401c;
    margin-left: 2px;
}

.tript-rx-subtitle {
    font-size: calc(0.875rem + 4px);
    color: #555;
    margin: 0 0 12px;
}

/* Radio options */
.tript-rx-radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.tript-rx-radios label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: calc(0.95rem + 4px);
    color: #333;
}

.tript-rx-radios input[type="radio"] {
    accent-color: #0073aa;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Upload section */
.tript-upload-section {
    margin-top: 4px;
}

.tript-upload-label {
    font-weight: 600;
    font-size: calc(0.9rem + 4px);
    margin: 0 0 8px;
    color: #333;
}

/* Drop zone */
.tript-drop-zone {
    border: 2px dashed #c0c0c0;
    border-radius: 5px;
    padding: 28px 20px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.tript-drop-zone:hover,
.tript-drop-zone.tript-drag-over {
    border-color: #0073aa;
    background: #f0f8ff;
}

/* Browse label — clicking this natively opens the file picker, no JS needed */
.tript-browse-label {
    font-size: calc(0.9rem + 4px);
    color: #555;
    cursor: pointer;
    display: block;
    margin: 0;
}

.tript-browse-text {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

/* Visually hide the file input but keep it accessible */
.tript-file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.tript-file-chosen {
    margin: 8px 0 0;
    font-size: calc(0.85rem + 4px);
    color: #2c7a2c;
    font-weight: 600;
    word-break: break-all;
}

/* Upload status line */
.tript-file-status {
    margin: 10px 0 0;
    font-size: calc(0.85rem + 4px);
    font-weight: 600;
    word-break: break-all;
}
.tript-status-ok      { color: #2c7a2c; }
.tript-status-error   { color: #cc1818; }
.tript-status-loading { color: #666; font-style: italic; }

/* Note */
.tript-note {
    font-size: calc(0.82rem + 4px);
    color: #666;
    margin: 8px 0 0;
}

/* Disabled add-to-cart button state */
.single_add_to_cart_button.tript-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Thank You page / order confirmation notice */
.tript-rx-notice {
    background: #fff8e1 !important;
    border-left: 4px solid #ffc107 !important;
    padding: 14px 18px !important;
    margin: 20px 0 !important;
    border-radius: 4px;
}
