/* Receipt Maker CSS — grouped to match receipt-maker.blade.php sections. */

/* ============================================================
   0. Tokens and shared helpers
   ============================================================ */

:root {
    /* Core palette */
    --rm-white: #FFFFFF;
    --rm-black: #000000;
    --rm-bg: #F4F7FC;
    --rm-card: var(--rm-white);
    --rm-input: var(--rm-white);
    --rm-text: #151515;
    --rm-muted: #535353;
    --rm-border: #E2E8F0;
    --rm-border-light: #E1E7EE;
    --rm-blue: #007AFF;
    --rm-blue-hover: #0062d6;
    --rm-blue-soft: #EBF3FF;
    --rm-step: #F5F9FF;
    --rm-navy: #050C2A;
    --rm-on-primary: var(--rm-white);

    /* Semantic */
    --rm-error: red;
    --rm-delete-hover: red;
    --rm-text-faint: #00000080;
    --rm-text-strong: #020202;
    --rm-text-subtle: rgba(0, 0, 0, 0.5);
    --rm-hero-subtext: rgba(255, 255, 255, 0.72);

    /* Surfaces */
    --rm-surface-neutral: #F5F5F5;
    --rm-surface-panel: #F7F8FC;
    --rm-preview-canvas-bg: #F1F5F9;
    --rm-preview-bg: #F3F4F6;

    /* Slate / secondary text */
    --rm-slate-label: #475569;
    --rm-slate-body: #334155;
    --rm-slate-heading: #1E293B;
    --rm-accent-label: #54658D;

    /* Tooltips */
    --rm-tooltip-bg: #18181B;
    --rm-tooltip-text: var(--rm-white);

    /* Modal & download (legacy invoice tokens) */
    --rm-modal-border: #DCDCDC;
    --rm-modal-divider: #C2C2C2;
    --rm-modal-error: #EF4444;
    --rm-modal-btn-hover: #1565C0;
    --rm-modal-muted: #777777;
    --rm-modal-surface-soft: #F8FAFC;
    --rm-modal-placeholder: #8E8E8E;
    --rm-modal-icon-muted: #4A5568;
    --rm-modal-icon-faint: #A0AEC0;
    --rm-modal-hover-bg: #DDDDDD;

    /* Invoice / preview chrome */
    --rm-inv-border: #D1D5DB;
    --rm-inv-divider: #E5E7EB;
    --rm-inv-link: #0D6EFD;
    --rm-inv-primary-alt: #2D7DF6;
    --rm-inv-link-bright: #007FFA;
    --rm-premium: #FFA412;
    --rm-spinner-track: #F3F3F3;
    --rm-spinner-active: #3B82F6;
    --rm-shadow-text: #666666;

    /* Dark-theme component surfaces (light mode defaults; overridden in dark) */
    --rm-dark-surface: #1E293B;
    --rm-dark-surface-alt: #1E1E1E;
    --rm-dark-border: #151D2A;
    --rm-dark-modal: #474747;
    --rm-dark-modal-hover: #5C5C5C;
    --rm-dark-modal-active: #353434;

    /* Overlays & focus */
    --rm-overlay-backdrop: rgba(0, 0, 0, 0.4);
    --rm-overlay-backdrop-strong: rgba(0, 0, 0, 0.6);
    --rm-blue-focus-ring: rgba(0, 122, 255, 0.12);
    --rm-blue-hover-bg: rgba(0, 122, 255, 0.08);
    --rm-shadow-color-soft: #0000000F;
    --rm-shadow-color-md: #0000000D;
    --rm-modal-divider-alpha: #C2C2C280;

    --rm-radius: 16px;
    --rm-input-radius: 10px;
    color: var(--rm-text);
    background: var(--rm-bg);
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    float: none !important;
}

.margin-top-32 {
    margin-top: 32px;
}

.row-gap-20 {
    row-gap: 20px !important;
}

body:has(.rm-maker) {
    overflow-x: clip;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.form_field:not(.cost_div)>span:not(.custom_span) {
    display: none !important;
}

.form_field.cost_div,
.form_field.checkLabl,
.form_field.blank_space {
    padding-left: 0 !important;
}

.form_field.cost_div span.custom_span {
    /* padding-left: 20px !important; */
    font-size: 13px !important;
}

.form_field.cost_div span.place_val.add_symbol {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 10px;
    top: 20px;
    transform: translateY(-50%);
    z-index: 2;
    width: max-content;
    height: 38px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 400;
    color: var(--rm-text) !important;
    pointer-events: none;
}

.form_field.cost_div span.place_val.add_symbol::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 1px;
    height: calc(100% - 4px);
    /* background: rgba(0, 0, 0, 0.12); */
}

.form_field.cost_div > input.shipping_cost {
    padding-left: var(--rm-shipping-input-pl, 34px) !important;
}

.form_field>input[type="number"] {
    -moz-appearance: textfield;
}

.form_field>input[type="number"]::-webkit-outer-spin-button,
.form_field>input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* ============================================================
   1. Hero / receipt banner
   ============================================================ */

.receiptbanner_section {
    background: url(https://cdn.mooninvoice.com/image/newsletter_images/newsletter_bannersections.webp) no-repeat;
    background-size: 100% 100%;
}

.badge-pill-custom {
    padding: 8px 16px;
    border: 1px solid var(--rm-border-light);
    border-radius: 40px;
    background: var(--rm-white);
    display: block;
    width: max-content;
}

.heading-primary {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--rm-text);
    line-height: 1.2;
    margin-bottom: 12px;
}

.heading-primary span {
    color: var(--rm-blue);
}

.subheading-text {
    color: var(--rm-hero-subtext) !important;
    margin-bottom: var(--space-40);
}


/* ============================================================
   2. Create receipt — layout, header, stepper
   ============================================================ */

.receipt_main_form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 580px);;
    gap: 25px;
    align-items: start;
}

.receipt_main_form .receipt_form_fields {
    min-width: 0;
}

.receipt_main_form .receipt_form_preview {
    min-width: 0;
}

@media (max-width: 1280px) {
    .receipt_main_form {
        grid-template-columns: 1fr;
    }

    .receipt_main_form .receipt_form_preview {
        width: 100%;
    }
}

.receiptheader_section {
    padding: 24px;
    border-bottom: 1px solid var(--rm-border);
}

.card-custom {
    background: var(--rm-card);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    min-width: 0;
}

.form_section {
    position: relative;
}

.receipt_form {
    padding: 24px;
}

.rm-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rm-text);
}

.stepper-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    background: var(--rm-step);
    padding: 14px 24px;
}

.stepper-wrapper::-webkit-scrollbar {
    display: none;
    height: 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rm-muted);
    white-space: nowrap;
    font-size: 14px !important;
}

.step-item.active {
    color: var(--rm-blue) !important;
}

.step-number {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rm-blue);
    color: var(--rm-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}


/* ============================================================
   3. Create receipt — grids and address/notes blocks
   ============================================================ */

.rm-page-grid {
    display: grid;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

.rm-page-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rm-page-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rm-grid {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.rm-grid-1 {
    grid-template-columns: 1fr;
}

.rm-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rm-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rm-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rm-grid-logo {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: stretch;
    margin-bottom: 16px;
}

.business_details_fields {
    display: flex;
    gap: 22px;
    flex-direction: column;
}

.business_fields_logo {
    width: 100%;
    min-width: 0;
}

.rm-form-block,
.rm-address-block,
.rm-notes-block {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.rm-notes-block {
    height: max-content;
}

.rm-notes-block .static-label-field {
    display: block;
}

.rm-notes-block .static-label-field>.custom_span,
.rm-notes-block .static-label-field>textarea+.custom_span,
.rm-notes-block .static-label-field>textarea:focus+.custom_span,
.rm-notes-block .static-label-field>textarea:not(:placeholder-shown)+.custom_span {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: var(--rm-text) !important;
    z-index: auto !important;
    pointer-events: auto !important;
}

.rm-notes-block .static-label-field>textarea {
    min-height: 70px !important;
    border-radius: 8px !important;
    border-color: var(--rm-border) !important;
    background: var(--rm-card) !important;
    font-size: 12px !important;
    color: var(--rm-text) !important;
}

.rm-form-block {
    margin-bottom: 8px;
}

.rm-address-split {
    margin-top: 32px;
    align-items: start;
}

.rm-address-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
}

.rm-address-head .rm-section-title,
.rm-address-block>.rm-section-title {
    margin: 0;
}

.receipt_form .mb-4 {
    margin-top: 32px;
}


/* ============================================================
   4. Create receipt — floating labels and fields
   ============================================================ */

.form_field {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    overflow: visible !important;
    margin: 0 !important;
}

.form_field>input,
.form_field>textarea,
.form_field>select,
.form_field>select.form-control {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    height: 40px !important;
    margin: 0 !important;
    padding: 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: normal !important;
    color: var(--rm-text) !important;
    background-color: var(--rm-card) !important;
    border: 1px solid var(--rm-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
    -webkit-appearance: none;
    color-scheme: inherit;
}

.form_field>textarea {
    height: auto !important;
    min-height: 110px !important;
    border-radius: 16px !important;
    resize: vertical;
}

.form_field>select,
.form_field>select.form-control {
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 14px !important;
}

.form_field>input:focus,
.form_field>textarea:focus,
.form_field>select:focus {
    border-color: var(--rm-blue) !important;
    box-shadow: 0 0 0 4px var(--rm-blue-focus-ring) !important;
}

/* Browser autofill: keep normal field background (light + dark) */
.rm-maker .form_field>input:-webkit-autofill,
.rm-maker .form_field>input:-webkit-autofill:hover,
.rm-maker .form_field>input:-webkit-autofill:focus,
.rm-maker .form_field>input:-webkit-autofill:active,
.rm-maker .form_field>textarea:-webkit-autofill,
.rm-maker .form_field>textarea:-webkit-autofill:hover,
.rm-maker .form_field>textarea:-webkit-autofill:focus,
.rm-maker .form_field>textarea:-webkit-autofill:active,
.rm-maker .form_field>select:-webkit-autofill,
.rm-maker .form_field>select:-webkit-autofill:hover,
.rm-maker .form_field>select:-webkit-autofill:focus,
.rm-maker .form_field>select:-webkit-autofill:active,
.rm-maker .rm-items-table input:-webkit-autofill,
.rm-maker .rm-items-table input:-webkit-autofill:hover,
.rm-maker .rm-items-table input:-webkit-autofill:focus,
.rm-maker .rm-items-table input:-webkit-autofill:active,
.rm-maker .rm-items-table textarea:-webkit-autofill,
.rm-maker .rm-items-table textarea:-webkit-autofill:hover,
.rm-maker .rm-items-table textarea:-webkit-autofill:focus,
.rm-maker .rm-items-table textarea:-webkit-autofill:active,
.rm-maker .form_field>input:autofill,
.rm-maker .form_field>textarea:autofill,
.rm-maker .form_field>select:autofill,
.rm-maker .rm-items-table input:autofill,
.rm-maker .rm-items-table textarea:autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--rm-card) inset !important;
    box-shadow: 0 0 0 1000px var(--rm-card) inset !important;
    -webkit-text-fill-color: var(--rm-text) !important;
    caret-color: var(--rm-text);
    transition: background-color 99999s ease-out 0s;
}

.rm-maker .rm-items-table textarea:-webkit-autofill,
.rm-maker .rm-items-table textarea:-webkit-autofill:hover,
.rm-maker .rm-items-table textarea:-webkit-autofill:focus,
.rm-maker .rm-items-table textarea:-webkit-autofill:active,
.rm-maker .rm-items-table textarea:autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--rm-surface-neutral) inset !important;
    box-shadow: 0 0 0 1000px var(--rm-surface-neutral) inset !important;
}

.form_field>#customer_date {
    padding-right: 42px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}

.form_field>.custom_span,
.form_field>input+.custom_span,
.form_field>textarea+.custom_span,
.form_field>select+.custom_span {
    position: absolute !important;
    top: 20px !important;
    left: 10px !important;
    transform: translateY(-50%) !important;
    width: auto !important;
    max-width: calc(100% - 32px) !important;
    height: auto !important;
    max-height: none !important;
    display: inline-block !important;
    margin: 0 !important;
    background: var(--rm-card) !important;
    padding: 0 6px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    color: var(--rm-muted) !important;
    border: 0 !important;
    border-radius: 4px !important;
    z-index: 3 !important;
    pointer-events: none !important;
    transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.form_field>textarea+.custom_span {
    top: 34px !important;
    transform: none !important;
}

.form_field>input:focus+.custom_span,
.form_field>input:not(:placeholder-shown)+.custom_span,
.form_field>textarea:focus+.custom_span,
.form_field>textarea:not(:placeholder-shown)+.custom_span,
.form_field>select+.custom_span,
.form_field.is-filled>.custom_span,
.form_field.is-focused>.custom_span:not(.static-label) {
    top: 0px !important;
    transform: translateY(-50%) !important;
    font-size:12px !important;
    font-weight: 600 !important;
    color: var(--rm-muted) !important;
}

.form_field>input:focus+.custom_span,
.form_field>textarea:focus+.custom_span,
.form_field>select:focus+.custom_span,
.form_field.is-focused>.custom_span:not(.static-label) {
    color: var(--rm-blue) !important;
}

.form_field>.custom_span::before,
.form_field>.custom_span::after,
.form_field>input+.custom_span::before,
.form_field>input+.custom_span::after,
.form_field>textarea+.custom_span::before,
.form_field>textarea+.custom_span::after,
.form_field>select+.custom_span::before,
.form_field>select+.custom_span::after {
    display: none !important;
    content: none !important;
    border: 0 !important;
}

label.error {
    position: absolute !important;
    top: calc(100% + 2px);
    left: 0;
    display: block !important;
    width: 100%;
    color: var(--rm-error) !important;
    font-size: 11px !important;
    font-weight: 400;
    line-height: normal;
    margin: 0;
    background: transparent !important;
    z-index: 2;
}

.companylogo_er:empty {
    display: none;
}

.companylogo_er {
    color: var(--rm-error);
    font-size: 13px;
    display: block;
    margin-top: 6px;
}

.rm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px !important;
    color: var(--rm-text-faint) !important;
}
.rm-check input,
.rm-check span{
    cursor: pointer;
}


.login_signup_main input.filled-in {
    position: static !important;
    opacity: 1 !important;
    width: 16px !important;
    height: 16px !important;
    appearance: auto !important;
    pointer-events: auto !important;
    margin: 0 !important;
}

.login_signup_main input.filled-in+span::before,
.login_signup_main input.filled-in+span::after {
    display: none !important;
    content: none !important;
}
.rm-notes-block .form_field>.custom_span,
.rm-notes-block .form_field>input+.custom_span,
.rm-notes-block .form_field>textarea+.custom_span,
.rm-notes-block .form_field>select+.custom_span {
    transform: none !important;
}

/* ============================================================
   5. Create receipt — logo upload
   ============================================================ */

.upload-logo-box {
    border: 1px dashed var(--rm-border);
    border-radius: 8px;
    width: 100%;
    height: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.upload-logo-box img.section_left_img {
    max-height: 72px;
    width: auto;
    object-fit: contain;
}

.upload-logo-box.logo-preview img.section_left_img {
    max-height: 120px;
    max-width: 100%;
}

.add-logo-text {
    display: block;
    margin-top: 8px;
    font-size: 16px !important;
    font-weight: 400;
    color: var(--rm-text);
    text-align: center;
}

.upload-logo-box.logo-preview .add-logo-text {
    display: none;
}

.add-logo-label .close-add-logo {
    display: none;
}

.close-add-logo {
    position: absolute;
    top: 0px !important;
    right: 0px !important;
}

.add-logo-label.logo-preview .close-add-logo,
.upload-logo-box.logo-preview .close-add-logo {
    display: block;
}

.add-logo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}


/* ============================================================
   6. Create receipt — items table
   ============================================================ */

.rm-items-scroll {
    --rm-items-min-width: 0;
    width: 100%;
    max-width: 100%;
    /* Horizontal scroll only when a column truly cannot fit.
       overflow-x:auto would otherwise force overflow-y to auto as well. */
    overflow-x: auto;
    overflow-y: clip;
    overscroll-behavior-x: contain;
    border: 1px solid var(--rm-border);
    border-radius: 16px;
}

.rm-items-table {
    /* Product is 3/10 of the free space (~30%). Gaps are taken out first,
       so the row stays inside the card instead of growing a sideways scrollbar. */
    --rm-items-grid: minmax(0, 2.8fr) minmax(0, 0.9fr) minmax(0, 1.15fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 2.8fr);
    display: block;
    width: 100%;
    min-width: var(--rm-items-min-width);
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: var(--rm-card);
}

.rm-items-table thead,
.rm-items-table tbody {
    display: block;
    width: 100%;
}

.rm-items-table tr {
    display: grid;
    grid-template-columns: var(--rm-items-grid);
    column-gap: 8px;
    align-items: center;
    width: 100%;
}

.rm-items-table thead tr {
    background: var(--rm-surface-neutral);
    border-radius: 16px 16px 0 0;
    padding: 12px 16px;
}

.rm-items-table tbody tr {
    padding: 14px 16px 12px;
    border-top: 1px solid var(--rm-border);
    row-gap: 8px;
}

.rm-items-table tr>input[type="hidden"] {
    display: none !important;
}

.rm-items-table th,
.rm-items-table td {
    padding: 0;
    border: 0;
    background: transparent;
    vertical-align: middle;
    min-width: 0;
}

.rm-items-table th {
    color: var(--rm-text);
    font-size: 0.78rem;
    white-space: nowrap;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rm-items-table thead th:first-child,
.rm-items-table .product_count {
    display: none !important;
}

.rm-items-table tbody td:nth-of-type(2),
.rm-items-table tbody td:nth-of-type(2)>div {
    display: contents;
}

.rm-items-table tbody td:nth-of-type(2) .mb_2 {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.rm-items-table tbody td:nth-of-type(2) .color_light {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
}

.rm-items-table tbody td:nth-of-type(7) .amount_field {
    gap: 8px;
}

.rm-items-table .amount_field,
.rm-items-table .amount_value {
    min-width: 0;
    max-width: 100%;
}

.amount_value {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--rm-border) !important;
    border-radius: 8px;
    background: var(--rm-card);
    min-height: 40px;
    padding: 7px 11px;
    text-align: end;
}

.rm-items-table tbody td:nth-of-type(7) .amount_value .add_symbol {
    flex-shrink: 0;
    font-size: 12px;
}


.rm-items-table input,
.rm-items-table textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    background: var(--rm-card);
    color: var(--rm-text);
    padding: 10px;
    font-size: 13px !important;
    min-height: 40px;
    box-sizing: border-box;
    outline: none !important;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rm-items-table input {
    text-overflow: ellipsis;
    overflow: clip;
    white-space: nowrap;
}

.rm-items-table input:focus {
    border: 1px solid var(--rm-blue);
    box-shadow: 0 0 0 3px var(--rm-blue-focus-ring);
}

.rm-items-table input::placeholder,
.rm-items-table textarea::placeholder {
    color: var(--rm-muted) !important;
    opacity: 1;
}

.rm-items-table input::-webkit-input-placeholder,
.rm-items-table textarea::-webkit-input-placeholder {
    color: var(--rm-muted) !important;
}

.rm-items-table .rm-item-desc {
    position: relative;
    display: block;
    min-width: 0;
    max-width: 100%;
}

.rm-items-table textarea {
    --rm-desc-line: 15px;
    display: block;
    min-height: calc(24px + var(--rm-desc-line));
    max-height: calc(24px + var(--rm-desc-line) * 12);
    height: auto;
    field-sizing: content;
    resize: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    /* A transparent border keeps the box the same size once focus adds one. */
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--rm-surface-neutral);
    color: var(--rm-text);
    line-height: var(--rm-desc-line);
}

.rm-items-table textarea.input-px-10:focus {
    padding: 11px !important;
}

.rm-items-table textarea::-webkit-scrollbar {
    display: none;
}

.rm-items-table textarea:focus {
    border-color: var(--rm-blue);
    box-shadow: none;
}

.rm-items-table .rm-item-desc>.custom_span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--rm-muted) !important;
    pointer-events: none;
}

/* The label acts as a placeholder: it goes away on click and while text is present. */
.rm-items-table .rm-item-desc>textarea:focus+.custom_span,
.rm-items-table .rm-item-desc>textarea:not(:placeholder-shown)+.custom_span {
    display: none;
}

.rm-items-table tbody td:nth-of-type(7) .add_symbol,
.rm-items-table tbody td:nth-of-type(7) .product_total {
    border: 0 !important;
    border-radius: 0;
    min-height: auto;
    padding: 0;
    background: transparent !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    pointer-events: none;
    cursor: default !important;
    caret-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    justify-content: end;
}

.rm-items-table tbody td:nth-of-type(7) .product_total {
    /* flex: 1 1 0; */
    min-width: 0;
    max-width: 100% !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--rm-text);
    font-weight: 500;
    padding-left: 3px;
    font-size: 13px !important;
    display: block;
}

.rm-items-table tbody td:nth-of-type(7) input[type="hidden"] {
    display: none !important;
    pointer-events: none;
}

.max_70 {
    max-width: none !important;
}

.delete_items {
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 7px;
    border: 1px solid var(--rm-border) !important;
    border-radius: 8px;
    color: var(--rm-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.delete_items:hover {
    border-color: var(--rm-delete-hover) !important;
}

.delete_items:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--rm-blue-focus-ring);
    border-color: var(--rm-blue) !important;
}

.delete_items .rm-del-icon {
    display: block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    pointer-events: none;
}

.delete_items .rm-del-icon--default {
    opacity: 0.55;
}

.delete_items .rm-del-icon--hover {
    display: none;
}

.delete_items:hover .rm-del-icon--default {
    display: none;
}

.delete_items:hover .rm-del-icon--hover {
    display: block;
}

.amount_field .delete_items {
    margin-left: 4px;
}

.rm-items-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px;
    border-top: 1px solid var(--rm-border);
    /* Sits inside the scroll container, so it has to match the table width
       or the border stops short once the table is scrolled. */
    width: 100%;
    min-width: var(--rm-items-min-width);
    box-sizing: border-box;
}

.rm-items-actions .add_product,
.rm-items-actions .add_task {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0 !important;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--rm-blue);
    font-size: 14px !important;
    font-weight: 600;
    text-decoration: none;
}

.active_toolbar a.btn span {
    margin: 0 !important;
}

.rm-items-actions .add_product:hover,
.rm-items-actions .add_task:hover {
    color: var(--rm-blue-hover);
    background: transparent !important;
}


/* ============================================================
   7. Create receipt — totals and footer
   ============================================================ */

.rm-totals {
    background: var(--rm-step);
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    padding: 0 !important;
    margin: 22px 0 0 !important;
}

.rm-totals_value {
    padding: 16px 16px 6px;
}

.rm-totals .wrap_div {
    display: grid !important;
    grid-template-columns: minmax(0, 50%) minmax(0, 50%);
    column-gap: 8px;
    row-gap: 4px;
    align-items: start;
    margin-bottom: 10px;
    color: var(--rm-muted);
    width: 100%;
    flex-wrap: nowrap !important;
}

.rm-totals .wrap_div > input[type="hidden"] {
    display: none !important;
}

.rm-maker .total_section.rm-totals .wrap_div > span {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: right;
    padding: 0 2px;
    box-sizing: border-box;
    line-height: 1.35;
}

.rm-maker .total_section.rm-totals .wrap_div > span:first-child {
    grid-column: 1;
    grid-row: 1;
    text-align: right !important;
}

.rm-maker .total_section.rm-totals .wrap_div > span:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    text-align: right !important;
}

.rm-totals .wrap_div > span .add_symbol {
    display: inline;
}

.rm-totals .bg_black {
    background: var(--rm-blue);
    color: var(--rm-on-primary);
    border-radius: 0px 0px 8px 8px;
    padding: 10px 16px;
    margin: 0 !important;
    font-weight: bold;
}

.rm-totals .bg_black span {
    color: var(--rm-on-primary) !important;
}

/* Totals typography — match light-mode muted / accent hierarchy in all themes */
.rm-maker .total_section.rm-totals .color_primary_new {
    color: var(--rm-muted) !important;
}

.rm-maker .total_section.rm-totals .color_primary_new.font_color,
.rm-maker .total_section.rm-totals .wrap_div .font_color {
    color: var(--rm-accent-label) !important;
}

.fotter_buttons {
    padding: 16px;
    border-top: 1px solid var(--rm-border);
    position: sticky;
    bottom: 0px;
    background: var(--rm-white);
    border-radius: 0px 0px 20px 20px;
    z-index: 9;
}

/* iOS keyboard: JS adds .fotter_buttons--visual-viewport (see sticky-footer-keyboard.js) */
.fotter_buttons.fotter_buttons--visual-viewport {
    position: fixed !important;
    left: var(--vv-footer-left, 0);
    width: var(--vv-footer-width, 100%);
    max-width: var(--vv-footer-width, 100%);
    box-sizing: border-box;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--vv-bottom-offset, 0px));
    z-index: 1000;
}

#instantSaveBtn {
    background: var(--color-blue);
    color: var(--rm-on-primary) !important;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    line-height: 1.2;
}

#instantSaveBtn:hover {
    background: var(--rm-blue-hover);
    color: var(--rm-on-primary) !important;
}

.btn-outline-custom,
.add_product,
.add_task {
    background: transparent;
    color: var(--rm-blue) !important;
    font-weight: 600;
    border: 1px solid var(--rm-blue);
    padding: 9px 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
}

.btn-outline-custom:hover,
.add_product:hover,
.add_task:hover {
    background: var(--rm-blue-soft);
    color: var(--rm-blue) !important;
}


/* ============================================================
   8. Live preview
   ============================================================ */

.btn-icon-action {
    position: relative;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    border: 0 !important;
    background: transparent !important;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-icon-action:hover {
    background: var(--rm-blue-soft);
    color: var(--rm-blue);
    border-color: var(--rm-blue);
}

/* Tooltip Styles matching design */
.preview-actions [data-tooltip] {
    position: relative;
}

/* Tooltip Arrow */
.preview-actions [data-tooltip]::before {
    content: "";
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--rm-tooltip-bg);
    border-radius: 1px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1050;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

/* Tooltip Bubble */
.preview-actions [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    background: var(--rm-tooltip-bg);
    color: var(--rm-tooltip-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    padding: 8px 10px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1050;
    letter-spacing: 0.1px;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

/* Tooltip Show on Hover & Focus */
.preview-actions [data-tooltip]:hover::before,
.preview-actions [data-tooltip]:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) rotate(45deg);
}

.preview-actions [data-tooltip]:hover::after,
.preview-actions [data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.preview-sticky-container {
    position: sticky;
    top: 96px;
    min-width: 0;
    align-self: start;
}

/* Preview uses page (body) scroll — no capped inner scroll panel on desktop */

.receipt_form_preview,
.preview-sticky-container {
    width: 100%;
    align-self: start;
}

.preview-outer-card {
    background: var(--rm-card);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    align-self: start;
}

.rm-maker .preview-outer-card.overflow-hidden {
    overflow: visible;
}

.preview-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--rm-border);
    flex-wrap: wrap;
    padding: 27px 24px;
}

.preview-header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rm-text);
    margin: 0;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.preview-outer-card > .receipt-paper-wrapper {
    flex: 0 0 auto;
}

.receipt-paper-wrapper {
    background: var(--rm-card);
    padding: 0;
    position: relative;
    overflow: visible;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    height: auto;
    display: flex;
    flex-direction: column;
}

.rm-preview-stage,
.receipt-paper-wrapper .unique-invoice-preview-wrapper {
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    /* padding: 16px; */
    display: flex;
    flex-direction: column;
    background: var(--rm-step) !important;
}

.receipt-paper-wrapper .preview-loading-overlay {
    /* padding: 12px 16px 16px; */
    margin: 0;
    width: 100%;
    position: absolute;
    inset: 0;
    background: var(--rm-step) !important;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: visible;
}

/* Demo / loader: in document flow so height follows image (page scroll) */
.receipt-paper-wrapper:not(.rm-preview-has-canvas) .preview-loading-overlay:not(.preview-hidden) {
    position: relative;
    inset: auto;
    z-index: 1;
}

.receipt-paper-wrapper .preview-loading-overlay .rm-preview-demo {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    flex: 0 0 auto;
    object-fit: contain;
    object-position: top center;
    display: block;
}

.receipt-paper-wrapper .preview-loading-overlay.preview-hidden {
    display: none !important;
}

.receipt-paper-wrapper:has(.preview-loading-overlay.is-spinning) .rm-preview-stage,
.receipt-paper-wrapper:has(.preview-loading-overlay.is-spinning) .unique-invoice-preview-wrapper {
    min-height: 650px;
}

.receipt-paper-wrapper:not(.rm-preview-has-canvas) .preview-loading-overlay.is-spinning:not(.preview-hidden),
.receipt-paper-wrapper .preview-loading-overlay.is-spinning {
    position: absolute;
    inset: 0;
    min-height: 100%;
    align-items: center;
    justify-content: center;
}

.receipt-paper-wrapper .pdf-scroll-container {
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    overflow: visible;
    background: var(--rm-step) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0;
}

.receipt-paper-wrapper .pdf-scroll-container.is-multi-page {
    overflow: visible;
}

.receipt-paper-wrapper .pdf-page-canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    background: var(--rm-white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.receipt-paper-wrapper.rm-preview-has-canvas {
    min-height: 0;
    max-height: none;
    height: auto;
    overflow: visible;
    flex: 0 0 auto;
}

.receipt-paper-wrapper.rm-preview-has-canvas .rm-preview-stage,
.receipt-paper-wrapper.rm-preview-has-canvas .unique-invoice-preview-wrapper {
    height: auto;
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}

.receipt-paper-wrapper.rm-preview-has-canvas .pdf-scroll-container {
    flex: 0 0 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: visible;
}

.receipt-paper-wrapper.rm-preview-single-page {
    max-height: none;
    min-height: 0;
    height: auto;
    flex: 0 0 auto;
    overflow: visible;
}

.receipt-paper-wrapper.rm-preview-single-page .rm-preview-stage,
.receipt-paper-wrapper.rm-preview-single-page .unique-invoice-preview-wrapper {
    height: auto;
    flex: 0 0 auto;
}

.receipt-paper-wrapper.rm-preview-single-page .pdf-scroll-container {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

.receipt-paper-wrapper.rm-preview-multi-page,
.receipt-paper-wrapper.rm-preview-has-canvas.rm-preview-multi-page {
    max-height: none;
    overflow: visible;
    flex: 0 0 auto;
    min-height: 0;
}

.receipt-paper-wrapper.rm-preview-has-canvas.rm-preview-multi-page .pdf-scroll-container {
    overflow: visible;
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
}

.receipt-paper-wrapper:has(.pdf-scroll-container canvas) .preview-loading-overlay {
    pointer-events: none;
}

/* Action Toolbar Tooltips */
.preview-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.preview-actions .btn-icon-action {
    position: relative;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    border: 0 !important;
    background: transparent !important;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.preview-actions .btn-icon-action:hover {
    background: var(--rm-blue-hover-bg);
}

.preview-actions .btn-icon-action img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.preview-actions .btn-icon-action img:nth-child(2) {
    display: none;
}

.preview-actions .btn-icon-action:hover img:first-child,
.preview-actions .btn-icon-action:focus-visible img:first-child {
    display: none;
}

.preview-actions .btn-icon-action:hover img:nth-child(2),
.preview-actions .btn-icon-action:focus-visible img:nth-child(2) {
    display: block;
    filter: none;
}

/* Tooltip Arrow */
.preview-actions [data-tooltip] {
    position: relative;
}

.preview-actions [data-tooltip]::before {
    content: "";
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--rm-tooltip-bg);
    border-radius: 1px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1050;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

/* Tooltip Bubble */
.preview-actions [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    background: var(--rm-tooltip-bg);
    color: var(--rm-tooltip-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1050;
    letter-spacing: 0.1px;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

/* Tooltip on Hover / Focus */
.preview-actions [data-tooltip]:hover::before,
.preview-actions [data-tooltip]:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) rotate(45deg);
}

.preview-actions [data-tooltip]:hover::after,
.preview-actions [data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


/* ============================================================
   9. Download apps banner
   ============================================================ */

.section-download-banner {
    background: var(--rm-navy);
    color: var(--rm-on-primary);
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.2) 0%, transparent 60%);
    position: relative;
}

.section-download-banner .container {
    z-index: 1;
    position: relative;
}

.section-download-banner::before {
    content: "";
    background-image: url(https://cdn.mooninvoice.com/image/images/newhome/payment_right_img.png);
    height: 100%;
    width: 30%;
    position: absolute;
    top: 0;
    left: 0;
    background-repeat: no-repeat;
    z-index: 0;
    transform: rotateY(180deg);

}

.section-download-banner::after {
    content: "";
    background-image: url(https://cdn.mooninvoice.com/image/images/newhome/payment_right_img.png);
    height: 100%;
    width: 30%;
    position: absolute;
    top: 0;
    right: 0;
    background-repeat: no-repeat;
    background-position: right;
    z-index: 0;
}

.store_btngroup {
    max-width: 500px;
    margin: 0 auto;
}


/* ============================================================
   10. Themes
   ============================================================ */

.rmThemes_list,
.bg_lightblue {
    background: var(--rm-surface-panel);
}

.theme-card .heading-6 {
    border-top: 1px solid var(--rm-border);
    padding: 16px;
    margin: 0;
}

.theme-card.active {
    border-color: var(--rm-blue);
}

.theme-card-preview-thumb {
    height: auto;
    overflow: hidden;
    position: relative;
}

.theme-card {
    background: var(--rm-white);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    height: 100%;
    overflow: hidden;
    box-shadow: 0px 0px 24px 0px var(--rm-shadow-color-soft);

}

.theme-card-block {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    justify-content: center;
}

.theme-card-block .theme-card-main {
    min-width: 0;
}


/* ============================================================
   11. How to create a customized receipt
   ============================================================ */

.infographic-container {
    min-width: 0;
}

.timeline-wrapper {
    position: relative;
    padding-left: 10px;
}

.step-list-item {
    padding: 18px 0 0;
    gap: 24px;
}

.step-list-item .steplist-content {
    padding-bottom: 25px;
    border-bottom: 1px solid var(--rm-border);
}

.step-list-item:last-child {
    border-bottom: none;
}

.step-list-number {
    min-height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--rm-preview-canvas-bg);
    color: var(--rm-slate-label);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    position: relative;
}

.border-wrap {
    width: 2px;
    height: 100%;
    background: var(--rm-border);
    margin: 10px auto -8px;
}

/* .step-list-item.active .border-wrap {
    background: var(--rm-blue);
} */
.step-list-item.active .border-wrap {
    background: linear-gradient(
        to bottom,
        var(--rm-blue) 0%,
        var(--rm-blue) 100%
    );
    background-size: 100% 0%;
    background-repeat: no-repeat;
    animation: lineLoader 3s linear forwards;
}

@keyframes lineLoader {
    from {
        background-size: 100% 0%;
    }

    to {
        background-size: 100% 100%;
    }
}

.step-list-item.active .step-list-number {
    background: var(--rm-blue);
    color: var(--rm-on-primary);
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
}

.step-list-title {
    color: var(--rm-muted);
    margin-bottom: 8px;
    text-shadow: 0.8px 0px 0px var(--rm-shadow-text);
    letter-spacing: 0.6px;
    font-weight: 400 !important;
}

.step-list-item.active .step-list-title {
    color: var(--rm-blue);
}

.step-list-desc {
    font-size: 0.88rem;
    color: var(--rm-muted);
    line-height: 1.5;
    margin: 0;
}


/* ============================================================
   12. Important elements
   ============================================================ */

.element-card {
    border-bottom: 1px solid var(--rm-border);
    padding-bottom: 24px;
    margin-bottom: 0;
    gap: 12px;
}

.rm-page-grid-2 .element-card:nth-last-child(-n+2) {
    border-bottom: 0;
    padding-bottom: 0;
}

.element-num {
    font-weight: 600;
    color: var(--rm-blue);
    margin-bottom: 8px;
}

.rm-muted {
    color: var(--rm-muted);
}


/* ============================================================
   13. Advantages of the receipt maker
   ============================================================ */

.advantages_cards {
    gap: 24px;
}

.advantage-card {
    background: var(--rm-card);
    border: 1px solid var(--rm-border);
    border-radius: 16px;
    padding: 32px 24px;
    height: 100%;
    box-shadow: 2px 3.01px 10px 0px var(--rm-shadow-color-md);
}

.advantage-icon-circle {
    margin-bottom: 20px;
}


/* ============================================================
   14. Industry-specific templates
   ============================================================ */

.card-custom-templates {
    background: var(--rm-card);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    min-width: 0;
    padding: 16px;
}

.card-custom-templates .category_title {
    background: var(--rm-step);
    border-radius: 8px;
    padding: 9px;
    min-width: 42px;
    min-height: 42px;
}

.template-tabs-wrapper {
    position: relative;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rm-border);
    margin-top: 24px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}


.template-tabs-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 6px;
    margin-bottom: -6px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    -webkit-overflow-scrolling: touch;
    transition: scrollbar-color 0.3s ease;
}

.template-tabs-scroll-container:hover {
    scrollbar-color: var(--rm-blue) transparent;
}

.template-tabs-scroll-container::-webkit-scrollbar {
    height: 2px;
    background: transparent;
    background-color: transparent;
}

.template-tabs-scroll-container::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

.template-tabs-scroll-container::-webkit-scrollbar-track,
.template-tabs-scroll-container::-webkit-scrollbar-track-piece,
.template-tabs-scroll-container::-webkit-scrollbar-corner {
    background: transparent;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.template-tabs-scroll-container::-webkit-scrollbar-thumb {
    background: transparent;
    background-color: transparent;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.template-tabs-scroll-container:hover::-webkit-scrollbar-thumb {
    background: var(--rm-blue);
    background-color: var(--rm-blue);
}

.template-tabs-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--rm-blue-hover, var(--rm-blue));
    background-color: var(--rm-blue-hover, var(--rm-blue));
}

.template-tab-btn {
    background: transparent;
    border: none;
    color: var(--rm-text);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
}

.template-tab-btn.active,
.template-tab-btn:hover {
    background: var(--rm-white);
    color: var(--rm-blue) !important;
    box-shadow: 2px 3.01px 10px 0px var(--rm-shadow-color-md);
}

.template-item-card,
a.template-item-card {
    background: var(--rm-card);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: inherit;
}

.template-item-card .template_title {
    color: var(--text-secondary);
}

.template-item-card:hover,
.template-item-card.active,
a.template-item-card:hover,
a.template-item-card.active {
    background: var(--rm-step);
    text-decoration: none;
    color: inherit;
}

.template-item-card:hover span {
    color: var(--rm-blue) !important;
}

.template-item-card:hover span svg path {
    fill: var(--rm-blue) !important;
}


.templates_list {
    background-image: url("../../image/images/newhome/template_banner.webp");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.templates_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.templates_count {
    color: var(--color-gray);
    margin-left: auto;
}


/* ============================================================
   15. CTA
   ============================================================ */

.cta-section {
    background-image: url(https://cdn.mooninvoice.com/image/images/newhome/cta-background-image-customer.webp);
    background-size: 100% 100%;
    color: var(--rm-on-primary);
    padding: 50px 0;
    text-align: center;
}

.cta-section .inner-content {
    max-width: 775px;
    width: 100%;
    margin: 0 auto;
}

.maxw-1024 {
    max-width: 1024px !important;
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-buttons a {
    padding-block: 15px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
}

.line-blocks>div {
    padding-inline: 0px !important;
}

.tick-icon-div {
    height: 15px;
    width: 15px;
    display: flex;
    align-items: center;
}


.tick-icon-div img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}


/* ============================================================
   16. Download modal helper
   ============================================================ */

.login-dropdown-search-input {
    color: var(--rm-black) !important;
}

.ui-widget-content {
    z-index: 99 !important;
}

.date_field,
.date_field * {
    cursor: pointer;
    user-select: auto;
}

.shipping_method_field {
    text-overflow: ellipsis;
    overflow: hidden !important;
    white-space: nowrap;
    display: block !important;
}

.social-icon {
    max-width: 540px;
    display: flex;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 40px;
    justify-content: center;
}
.social-icon div {
    height: 48px;
}
.social-icon div img {
    height: 100%;
    object-fit: contain;
    cursor: pointer !important;
}
.color_light.text-end input {
    text-align: end !important;
}

/* ============================================================
   17. Responsive, print, dark mode
   ============================================================ */

@media (max-width: 991.98px) {
    .rm-page-grid-2:not(.rm-page-grid-md-2) {
        grid-template-columns: 1fr;
    }

    .rm-page-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }    

    .rm-maker .fotter_buttons {
        position: static;
    }
}

@media (max-width: 767.98px) {

    .rm-page-grid-2,
    .rm-page-grid-3,
    .rm-grid-2,
    .rm-grid-3,
    .rm-grid-4,
    .rm-grid-logo {
        grid-template-columns: 1fr;
    }

    .rm-page-grid-2 .element-card:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--rm-border);
        padding-bottom: 24px;
    }

    .rm-page-grid-2 .element-card:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .badge-pill-custom {
        padding: 4px 12px;
        font-size: 16px !important;
    }
    .rm-items-actions {
        padding: 16px 16px 0;
    }
}

@media (max-width: 1280px) {
    .preview-sticky-container {
        position: static;
        max-height: none;
    }
}

@media (max-width: 1199.98px) {
    .invoice-images-block>div img {
        width: auto !important;
    }

    .heading-primary {
        font-size: 2.15rem;
    }

    .preview-sticky-container {
        position: static;
        max-height: none;
    }

    .templates_grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991.98px) {

    .heading-primary {
        font-size: 1.85rem;
    }

    .infographic-container {
        padding: 20px;
    }

    .templates_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-header-bar,
    .receiptheader_section,
    .receipt_form {
        padding: 16px;
    }
}

@media (max-width: 767.98px) {
    .heading-primary {
        font-size: 1.6rem;
    }

    .stepper-wrapper {
        gap: 16px;
    }

    .rm-items-scroll {
        --rm-items-min-width: 0;
        padding: 0px;
        border: none;
        border-radius: 0;
    }

    .rm-items-table {
        --rm-items-grid: 1fr 1fr;
        min-width: 0;
    }

    .rm-items-table textarea {
        max-height: calc(24px + var(--rm-desc-line, 15px) * 5);
    }

    .rm-items-table thead {
        display: none;
    }

    .rm-items-table tbody {
        display: block;
    }

    .rm-items-table tr {
        display: grid;
        grid-template-columns: var(--rm-items-grid);
    }

    .rm-items-table tbody tr {
        border: 1px solid var(--rm-border);
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 12px;
        background: var(--rm-card);
    }

    .rm-items-table tbody td:nth-of-type(2) .mb_2,
    .rm-items-table tbody td:nth-of-type(2) .color_light,
    .rm-items-table tbody td:nth-of-type(7) {
        grid-column: 1 / -1;
    }

    .line-blocks>div {
        width: 50%;
    }

    .receipt_form {
        padding: 16px;
    }

    .rm-grid-logo {
        grid-template-columns: 1fr;
    }

    .rm-grid-logo>div:first-child {
        order: 1;
    }

    .rm-grid-logo>div:nth-child(2) {
        order: 0;
    }

    .rm-grid,
    .business_details_fields,
    .rm-form-block,
    .rm-address-block,
    .rm-notes-block,
    .rm-items-table tbody tr,
    .row-gap-20 {
        gap: 16px;
    }

    .color_light.text_right {
        margin-top: 0;
    }

    .rm-items-table tbody td:nth-of-type(2) .mb_2 {
        margin-bottom: 0;
    }

    .margin-top-32,
    .rm-address-split,
    .receipt_form .mb-4 {
        margin-top: 25px;
    }

    .rm-totals {
        width: 100% !important;
        margin-top: 10px !important;
    }

    .theme-card-block {
        grid-template-columns: repeat(2, 1fr);
    }

    .theme-card-preview-thumb {
        /* height: 240px; */
    }
}

@media (max-width: 576px) {

    .templates_grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 5px;
    }

    .cta-features,
    .cta-buttons {
        flex-direction: column;
    }

    .line-blocks>div {
        padding-inline: 5px;
        width: 100%;
        border-right: none !important;
    }

    .cta-buttons a,
    .cta-features>div {
        width: 100% !important;
    }

    .badge-pill-custom {
        padding: 4px 12px;
        font-size: 14px !important;
    }

    .rm-preview-stage,
    .receipt-paper-wrapper .unique-invoice-preview-wrapper {
        padding: 0;
    }

    .receipt-paper-wrapper .pdf-scroll-container,
    .receipt-paper-wrapper .preview-loading-overlay {
        padding: 0;
    }

    .preview-header-bar {
        padding: 16px 12px;
    }

}

/* Short viewport: form footer only (preview height = content, page scrolls) */
@media (max-height: 860px) {
    .preview-sticky-container {
        top: 72px;
    }

    .preview-header-bar {
        padding: 16px 20px;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    #rmPaper,
    #rmPaper * {
        visibility: visible;
    }

    #rmPaper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --rm-bg: #0B0F19;
        --rm-card: #151D2A;
        --rm-input: #1E293B;
        --rm-text: #F1F5F9;
        --rm-muted: #94A3B8;
        --rm-border: #CBD5E1;
        --rm-blue: #2563EB;
        --rm-blue-hover: #1D4ED8;
        --rm-blue-soft: #1E293B;
        --rm-step: #1E293B;
        --rm-navy: #030712;
        --rm-preview-canvas-bg: var(--rm-dark-surface);
        --rm-preview-bg: var(--rm-dark-surface);
        --rm-on-primary: var(--rm-white);
    }

    .receiptbanner_section {
        background: url(https://cdn.mooninvoice.com/image/newsletter_images/newsletter_bannersections_dark.webp) no-repeat;
        background-size: 100% 100%;
    }

    .rm-maker {
        color-scheme: dark;
    }

    .rm-maker .form_field>input:-webkit-autofill,
    .rm-maker .form_field>input:-webkit-autofill:hover,
    .rm-maker .form_field>input:-webkit-autofill:focus,
    .rm-maker .form_field>input:-webkit-autofill:active,
    .rm-maker .form_field>textarea:-webkit-autofill,
    .rm-maker .form_field>textarea:-webkit-autofill:hover,
    .rm-maker .form_field>textarea:-webkit-autofill:focus,
    .rm-maker .form_field>textarea:-webkit-autofill:active,
    .rm-maker .form_field>select:-webkit-autofill,
    .rm-maker .form_field>select:-webkit-autofill:hover,
    .rm-maker .form_field>select:-webkit-autofill:focus,
    .rm-maker .form_field>select:-webkit-autofill:active,
    .rm-maker .rm-items-table input:-webkit-autofill,
    .rm-maker .rm-items-table input:-webkit-autofill:hover,
    .rm-maker .rm-items-table input:-webkit-autofill:focus,
    .rm-maker .rm-items-table input:-webkit-autofill:active,
    .rm-maker .form_field>input:autofill,
    .rm-maker .form_field>textarea:autofill,
    .rm-maker .form_field>select:autofill,
    .rm-maker .rm-items-table input:autofill {
        -webkit-box-shadow: 0 0 0 1000px var(--rm-card) inset !important;
        box-shadow: 0 0 0 1000px var(--rm-card) inset !important;
        -webkit-text-fill-color: var(--rm-text) !important;
        caret-color: var(--rm-text);
        transition: background-color 99999s ease-out 0s;
    }

    .rm-maker .rm-items-table textarea:-webkit-autofill,
    .rm-maker .rm-items-table textarea:-webkit-autofill:hover,
    .rm-maker .rm-items-table textarea:-webkit-autofill:focus,
    .rm-maker .rm-items-table textarea:-webkit-autofill:active,
    .rm-maker .rm-items-table textarea:autofill {
        -webkit-box-shadow: 0 0 0 1000px var(--rm-step) inset !important;
        box-shadow: 0 0 0 1000px var(--rm-step) inset !important;
    }

    .form_field>select,
    .form_field>select.form-control {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E") !important;
    }

    .form_field>#customer_date {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z'/%3E%3C/svg%3E") !important;
    }

    .rm-items-table thead tr,
    .rm-items-table textarea,
    .rm-items-table .rm-item-desc textarea {
        background: var(--rm-step);
    }

    .login-dropdown-search-input {
        color: var(--rm-on-primary) !important;
    }

    .fotter_buttons {
        border-top: 1px solid var(--rm-dark-border);
        background: var(--rm-dark-surface);
    }

    .rmThemes_list,
    .bg_lightblue,
    .step-list-number {
        background: var(--rm-dark-surface-alt);
    }

    .templates_list {
        background-image: url("../../image/images/newhome/template_banner_dark.webp") !important;
        background-repeat: no-repeat !important;
        background-size: 100% 100% !important;
    }

    .template-item-card span svg path {
        fill: var(--rm-on-primary);
    }

    .template-tab-btn svg path {
        stroke: var(--rm-on-primary);
    }

    .template-tab-btn:hover svg path,
    .template-tab-btn.active svg path {
        stroke: var(--rm-blue);
    }

    .btn-icon-action img {
        filter: invert(1);
    }

    .theme-card .heading-6 {
        color: var(--rm-black) !important;
    }
    #shipping_method option:not(:first-child) {
        color: var(--rm-on-primary) !important;
    }
    .delete_items {
        border-color: var(--rm-border) !important;
    }

    .delete_items:hover {
        border-color: var(--rm-delete-hover) !important;
    }

    .delete_items .rm-del-icon--default {
        opacity: 0.85;
    }

    .delete_items .rm-del-icon--default .rm-del-lines {
        stroke: var(--rm-card);
    }

    .upload-logo-box:not(.logo-preview) img.section_left_img {
        filter: invert(1);
    }

    .rm-maker .login_signup_main .rm-check input.filled-in.same_as_billing_address {
        appearance: none !important;
        -webkit-appearance: none !important;
        box-sizing: border-box;
        background-color: var(--rm-input) !important;
        border: 1px solid var(--rm-border) !important;
        border-radius: 4px;
    }

    .rm-maker .login_signup_main .rm-check input.filled-in.same_as_billing_address:checked {
        background-color: var(--rm-blue) !important;
        border-color: var(--rm-blue) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5L6.5 11.5L12.5 4.5' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: 14px 14px;
        background-position: center;
        background-repeat: no-repeat;
    }

    .rm-maker .rm-check,
    .rm-maker .rm-check .lever {
        color: var(--rm-text) !important;
    }

    /* Totals: light white body + white emphasis (readable on dark card) */
    .rm-maker .total_section.rm-totals {
        --rm-totals-light: rgba(255, 255, 255, 0.72);
        --rm-totals-white: #FFFFFF;
    }

    .rm-maker .total_section.rm-totals .wrap_div {
        color: var(--rm-totals-light);
    }

    .rm-maker .total_section.rm-totals .color_primary_new {
        color: var(--rm-totals-light) !important;
    }

    .rm-maker .total_section.rm-totals .color_primary_new.font_color,
    .rm-maker .total_section.rm-totals .wrap_div .font_color {
        color: var(--rm-totals-white) !important;
    }

    .rm-maker .total_section.rm-totals .wrap_div > span .add_symbol {
        color: inherit !important;
    }
}

/* ============================================================
   Receipt Maker page-only helpers previously supplied by
   invoice_css_49.css. Loaded only on /receipt-maker.
   ============================================================ */

.rm-maker .font_16 {
    font-size: 16px !important;
    line-height: 20px !important;
}

.rm-maker .f_14 {
    font-size: 14px;
    line-height: 20px;
}

.rm-maker .flex_between {
    justify-content: space-between;
}

.rm-maker .flex_wrap {
    flex-wrap: wrap;
}

.rm-maker .text_left {
    text-align: left;
    width: auto;
}

.rm-maker .color_white,
.rm-maker .color_white:hover {
    color: var(--rm-on-primary);
}

.rm-maker .color_black {
    color: var(--rm-black);
}

.rm-maker .color_primary_new {
    color: var(--rm-text-subtle);
}

.rm-maker .color_primary_new.font_color,
.rm-maker .total_section .font_color {
    color: var(--rm-accent-label);
}

.preview-spinner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 35px;
    margin: auto;
    border: 5px solid var(--rm-spinner-track);
    border-top: 5px solid var(--rm-spinner-active);
    border-radius: 50%;
    animation: rm-spin 1s linear infinite;
    z-index: 2;
}

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

.invTpl-backdrop {
    position: fixed;
    inset: 0;
    background: var(--rm-overlay-backdrop-strong);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 101;
}

.invTpl-backdrop.show .invTpl-box {
    transform: translateY(0);
    opacity: 1;
}

.invTpl-box {
    width: 700px;
    max-width: calc(100% - 32px);
    background: var(--rm-white);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-60px);
    opacity: 0;
    transition: all 0.3s ease;
}

.invTpl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 20px 12px;
    border-bottom: 1px solid var(--rm-modal-divider);
}

.invTpl-title {
    margin: 0;
    font-size: 18px;
}

.invTpl-actions {
    display: flex;
    gap: 10px;
}

.invTpl-btn {
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 400;
}

.invTpl-cancel {
    background: transparent;
    color: var(--rm-text-strong);
}

.invTpl-apply {
    background: var(--rm-inv-primary-alt);
    color: var(--rm-on-primary);
}

.invTpl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.invTpl-card {
    text-align: center;
    cursor: pointer;
}

.invTpl-inner {
    border: 1px solid var(--rm-modal-divider-alpha);
    border-radius: 6px;
    padding: 6px;
    position: relative;
}

.invTpl-inner + p {
    color: var(--rm-black) !important;
    margin-top: 10px;
    font-weight: 400;
}

.invTpl-inner.active {
    border-color: var(--rm-inv-primary-alt);
}

.invTpl-inner.active + p {
    color: var(--rm-inv-link-bright) !important;
}

.invTpl-card img {
    width: 100%;
    border-radius: 4px;
    max-height: 325px;
    object-fit: contain;
}

.invTpl-locked .invTpl-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 6px;
}

.invTpl-lockIcon {
    position: absolute;
    top: 62%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 20px;
    color: orange;
    z-index: 2;
}

.premium-lock {
    height: 50px;
    width: 50px;
}

.premium-lock img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.premium-lock + button {
    padding: 5px 10px;
    border-radius: 34px;
    border: 1px solid var(--rm-premium);
    background: var(--rm-white);
    color: var(--rm-premium);
    font-size: 14px;
    font-weight: 400;
    margin-top: 16px;
}

.premium-lock + button + p {
    font-size: 12px !important;
    margin-top: 10px;
    width: 78px;
    line-height: 100% !important;
}

.invTpl-card.invTpl-locked.premium-active .invTpl-inner::after,
.premium-active .invTpl-lockIcon {
    display: none;
}

.download-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--rm-overlay-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.download-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.download-modal-container {
    width: 474px;
    max-width: 90%;
    background: var(--rm-white);
    border-radius: 10px;
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.4s ease;
}

.download-modal-overlay.active .download-modal-container {
    transform: translateY(0);
    opacity: 1;
}

.download-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    border-bottom: 1px solid var(--rm-modal-divider);
}

.download-modal-close {
    cursor: pointer;
    height: 30px;
    width: 30px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
}

.download-modal-close:hover {
    background-color: var(--rm-modal-hover-bg);
}

.download-modal-subtitle {
    font-size: 14px !important;
    color: var(--rm-text-faint);
}

.download-modal-btn {
    width: 100%;
    padding: 12px;
    background: var(--rm-blue);
    color: var(--rm-on-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
}

.download-modal-btn:hover {
    background: var(--rm-modal-btn-hover);
}

.download-modal-footer {
    font-size: 12px !important;
    font-weight: 400;
    color: var(--rm-modal-muted);
    text-align: center;
    margin-top: 10px;
}

.download-modal-body {
    padding: 20px;
}

.download-modal-title h4,
.download-modal-title p:first-child,
#downloadModalTitle {
    margin-bottom: 5px !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    color: var(--rm-black) !important;
}

.download-modal-field {
    position: relative;
    margin: 20px 0;
    width: 100%;
}

.download-modal-form-field {
    position: relative;
    width: 100%;
    border: 1px solid var(--rm-inv-border);
    border-radius: 4px;
    background-color: var(--rm-white);
}

.download-modal-select-trigger {
    width: 100%;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--rm-black) !important;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-modal-field.open .download-modal-form-field {
    border-color: var(--rm-spinner-active);
}

.download-modal-floating-label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--rm-white);
    padding: 0 3px;
    color: var(--rm-black);
    font-size: 14px;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
    font-weight: 500;
}

.download-modal-field.active .download-modal-floating-label,
.download-modal-field.open .download-modal-floating-label {
    top: -1px;
    font-size: 10px;
    color: var(--rm-text-faint);
    font-weight: 400;
}

.download-modal-panel {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: var(--rm-white);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow-y: auto;
    max-height: 250px;
    padding: 8px 0;
}

.download-modal-field.open .download-modal-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.download-modal-option {
    padding: 12px 20px;
    font-size: 15px;
    color: var(--rm-slate-body);
    cursor: pointer;
}

.download-modal-option:hover,
.download-modal-option.active {
    background-color: var(--rm-modal-surface-soft);
}

.download-modal-select.error .download-modal-form-field {
    border: 1px solid red;
}

.download-modal-select.error .download-modal-floating-label {
    color: red !important;
}

.download-modal-container .login-field-container {
    position: relative;
    height: 45px;
    width: 100%;
}

.download-modal-container .login-floating-label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--rm-white);
    padding: 0 3px;
    color: var(--rm-black);
    font-weight: 400;
    font-size: 14px;
    pointer-events: none;
}

.download-modal-container .login-phone-container {
    display: flex;
    align-items: center;
    border: 1px solid var(--rm-modal-border);
    border-radius: 4px;
    height: 45px;
    position: relative;
    padding-right: 12px;
}

.login-input-groups {
    position: relative;
    margin-bottom: 26px;
}

.login-floating-inputs {
    width: 100%;
    height: 100%;
    padding: 0 45px 0 16px;
    border: 1px solid var(--rm-modal-border);
    border-radius: 4px;
    outline: none;
    font-size: 16px;
    color: var(--rm-black);
    background: transparent;
}

.login-floating-inputs:focus ~ .login-floating-label,
.login-floating-inputs:not(:placeholder-shown) ~ .login-floating-label {
    top: -1px;
    font-size: 10px;
    color: var(--rm-text-faint);
}

.login-country-trigger {
    display: flex;
    align-items: center;
    padding: 0 3px 0 12px;
    cursor: pointer;
    height: 100%;
    gap: 6px;
}

.login-flag-icon {
    width: 20px;
    border-radius: 2px;
}

.login-code-text {
    font-weight: 500;
    color: var(--rm-modal-icon-muted);
    font-size: 16px;
}

.login-phone-input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: var(--rm-black) !important;
}

.login-phone-labels {
    position: absolute;
    left: 8px;
    top: -2px;
    transform: translateY(-50%);
    background: var(--rm-white);
    padding: 0 3px;
    font-size: 10px;
    color: var(--rm-modal-placeholder);
    z-index: 10;
    pointer-events: none;
}

.login-error-message {
    color: var(--rm-modal-error) !important;
    font-size: 12px;
    position: absolute;
    bottom: -18px;
    left: 4px;
    display: none;
}

.login-input-groups.error .login-error-message {
    display: block;
}

.login-input-groups.error .login-floating-inputs,
.login-input-groups.error .login-phone-container,
.login-input-groups.error .login-field-container {
    border-color: var(--rm-modal-error) !important;
}

.login-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 280px;
    background: var(--rm-white);
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.login-dropdown-menu.show {
    display: block;
}

.login-country-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
}

.login-country-name {
    flex: 1;
    font-size: 14px;
    color: var(--rm-modal-icon-muted);
    font-weight: 500;
}

.login-country-code {
    color: var(--rm-modal-icon-faint);
    font-size: 14px;
}

.login-field-container-wrap {
    border: 1px solid var(--rm-modal-border);
    border-radius: 4px;
}

.email-icon-div {
    margin-right: 12px;
}

.drop-down-icon {
    height: 24px;
    width: 24px;
}

.drop-down-icon img {
    height: auto;
    display: block;
}

.login-dropdown-search {
    padding: 12px;
    border-bottom: 1px solid var(--rm-preview-canvas-bg);
    position: sticky;
    top: 0;
    background: var(--rm-white);
}

.login-dropdown-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--rm-border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.unique-preview-window-backdrop {
    position: fixed;
    inset: 0;
    background: var(--rm-overlay-backdrop-strong);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.unique-preview-window-container {
    width: 90%;
    max-width: 730px;
    max-height: 90vh;
    background: var(--rm-white);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.unique-preview-window-backdrop .unique-invoice-preview-wrapper {
    flex: 1;
    min-height: 0 !important;
    display: flex;
}

.unique-preview-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--rm-inv-divider);
    background: var(--rm-white);
}

.preview-pdf {
    font-weight: 700;
    color: var(--rm-slate-heading);
}

.unique-preview-controls {
    display: flex;
    gap: 10px;
}

.unique-preview-controls a {
    font-size: 14px;
}

.unique-preview-controls a:hover,
.unique-preview-controls a:focus {
    text-decoration: underline !important;
    color: var(--rm-inv-link) !important;
}

.unique-preview-controls button {
    height: 30px;
    width: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    background: transparent;
}

.unique-preview-top-bar .unique-preview-controls button:hover {
    background-color: var(--rm-modal-hover-bg);
}

.unique-preview-controls button img {
    object-fit: contain;
}

.unique-preview-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--rm-inv-border);
    background: var(--rm-white);
    cursor: pointer;
    border-radius: 6px;
}

.unique-preview-window-backdrop .pdf-scroll-container {
    flex: 1;
    overflow: auto;
    background: var(--rm-preview-bg);
    display: flex;
    justify-content: start;
    align-items: flex-start;
    flex-direction: column;
}

.unique-preview-window-backdrop #pdfCanvas,
.unique-preview-window-backdrop .pdf-page-canvas {
    background: var(--rm-white);
    width: 100%;
    max-width: 800px;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 575.98px) {
    .invTpl-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-pdf {
        width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .unique-preview-controls {
        gap: 3px !important;
    }

    .unique-preview-window-container {
        width: 100%;
        height: 70% !important;
    }
}

@media (prefers-color-scheme: dark) {
    .invTpl-box,
    .download-modal-container,
    .unique-preview-window-container {
        background: var(--rm-dark-modal) !important;
    }

    .invTpl-inner + p,
    .download-modal-title h4,
    #downloadModalTitle,
    .preview-pdf,
    .text-black {
        color: var(--rm-on-primary) !important;
    }

    .invTpl-locked .invTpl-inner::after {
        background: rgb(27 24 24 / 55%);
    }

    .invTpl-cancel {
        color: var(--rm-on-primary);
    }

    .download-modal-container .login-floating-label,
    .login-phone-labels,
    .download-modal-form-field,
    .download-modal-floating-label,
    .download-modal-panel,
    .login-dropdown-search,
    .login-dropdown-search-input,
    .login-dropdown-menu {
        background: var(--rm-dark-modal) !important;
        color: var(--rm-on-primary) !important;
    }

    .download-modal-close img,
    .drop-down-icon img,
    .unique-preview-controls button img {
        filter: invert(1);
    }

    .login-phone-input::placeholder,
    .login-floating-inputs,
    .login-phone-input {
        color: var(--rm-on-primary) !important;
    }

    .download-modal-option:hover,
    .download-modal-option.active {
        background: var(--rm-dark-modal-hover) !important;
        color: var(--rm-on-primary) !important;
    }

    .unique-preview-top-bar,
    .unique-preview-window-backdrop .pdf-scroll-container {
        background: var(--rm-dark-modal) !important;
    }

    .unique-preview-top-bar {
        border-bottom: 1px solid grey !important;
    }

    .unique-preview-top-bar .unique-preview-controls button:hover,
    .download-modal-close:hover {
        background-color: var(--rm-dark-modal-active) !important;
    }

    .unique-preview-controls svg path {
        fill: white;
    }

    .unique-preview-controls svg g {
        opacity: 1;
    }

    #downloadForm .login-input-groups input:-webkit-autofill,
    #downloadForm .login-input-groups input:-webkit-autofill:hover,
    #downloadForm .login-input-groups input:-webkit-autofill:focus,
    #downloadForm .login-input-groups input:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 30px var(--rm-dark-modal) inset !important;
        -webkit-text-fill-color: white !important;
    }
}