/* ============================================================
   SCRIPT BUILDER — Modern UI (Matches Custom Invoice Generator)
============================================================ */

/* Wrapper Card */
.androlab-script-builder-wrapper {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
    font-size: 15px;
    margin-bottom: 30px;
}

/* ============================================
   HEADERS
============================================ */
.script-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    gap: 20px;
}

.header-left h2 {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 600;
}

.header-left label,
.header-right label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

/* ============================================
   SEARCHABLE SELECT + INPUT FIELDS
============================================ */
#sb-user,
#sb-script-ref {
    width: 100%;
    max-width: 380px;
    padding: 12px 14px;
    border-radius: 8px !important;
    border: 1px solid #cfd3d9 !important;
    background: #f9fafb !important;
    font-size: 15px !important;
    color: #333 !important;
}

/* ============================================
   Select2 Styling Override
============================================ */
.select2-container--default .select2-selection--single {
    background-color: #fafafa !important;
    border: 1px solid #cfd3d9 !important;
    border-radius: 8px !important;
    height: 46px !important;
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.select2-selection__rendered {
    font-size: 15px !important;
    line-height: 46px !important;
}

.select2-selection__arrow {
    height: 46px !important;
    right: 10px !important;
}

/* ============================================
   PATIENT INFO BLOCK
============================================ */
.patient-info {
    background: #f7f9fc;
    border: 1px solid #e2e5ec;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.patient-info h3 {
    font-size: 18px;
    margin-bottom: 18px;
    font-weight: 600;
}

.patient-fields input,
.patient-fields textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 8px !important;
    border: 1px solid #cfd3d9 !important;
    background: #fff !important;
    font-size: 15px;
    color: #333;
}

textarea#sb-address {
    min-height: 65px;
    resize: vertical;
}

/* ============================================
   SCRIPT ITEMS TABLE
============================================ */
.script-items-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
}

#sb-items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

#sb-items-table th {
    background: #eef1f7;
    padding: 12px 14px;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #d9dbe0;
}

#sb-items-table td {
    padding: 12px 14px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.sb-med-select,
.sb-dosage-field,
.sb-qty-field {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px !important;
    border: 1px solid #cfd3d9 !important;
    background: #fff !important;
}

/* ============================================
   ADD MEDICATION BUTTON
============================================ */
.script-add-item button {
    background: #F05323;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 15px;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 12px;
}

.script-add-item button:hover {
    background: #F05323;
}

/* Remove button */
.remove-item-btn {
    background: #F05323 !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.remove-item-btn:hover {
    background: #e0281f !important;
}

/* ============================================
   GENERATE BUTTON
============================================ */
#sb-generate-pdf {
    width: 100%;
    background: #F05323;
    color: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 17px;
    margin-top: 20px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

#sb-generate-pdf:hover {
    background: #e0281f;
}

/* Layout spacing */
.sb-patient-info-grid {
    margin-top: 10px;
    margin-bottom: 30px;
}

/* ============================================================
   FORCE OVERRIDE GLOBAL SUPPORT-SUITE STYLES
============================================================ */

.androlab-script-builder-wrapper input[type="text"],
.androlab-script-builder-wrapper input[type="email"],
.androlab-script-builder-wrapper input[type="tel"],
.androlab-script-builder-wrapper select,
.androlab-script-builder-wrapper textarea {
    background: #fff !important;
    border: 1px solid #cfd3d9 !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}
