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

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

:root {
    --rm-bg: #F4F7FC;
    --rm-card: #FFFFFF;
    --rm-input: #FFFFFF;
    --rm-text: #151515;
    --rm-muted: #535353;
    --rm-border: #E2E8F0;
    --rm-blue: #007AFF;
    --rm-blue-hover: #0062d6;
    --rm-blue-soft: #EBF3FF;
    --rm-step: #F5F9FF;
    --rm-navy: #050C2A;
    --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;
}

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

.form_field.cost_div,
.form_field.checkLabl,
.form_field.blank_space {
    padding-left: 0 !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 #E1E7EE;
    border-radius: 40px;
    background: #fff;
    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: rgba(255, 255, 255, 0.72);
    margin-bottom: var(--space-40);
}


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

.receipt_main_form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 470px;
    gap: 25px;
}

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

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

@media (max-width: 1200px) {
    .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: #fff;
    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: 20px;
    flex-direction: column;
}

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

.rm-form-block,
.rm-address-block,
.rm-notes-block {
    display: grid;
    gap: 20px;
    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;
    height: 40px !important;
    margin: 0 !important;
    padding: 10px !important;
    font-size: 0.95rem !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;
    padding-top: 18px !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 rgba(0, 122, 255, 0.12) !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: 0.75rem !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: static !important;
    display: block;
    color: #DC2626;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    background: transparent !important;
    line-height: 1.3;
}

.companylogo_er:empty {
    display: none;
}

.companylogo_er {
    color: #DC2626;
    font-size: 13px;
    display: block;
    margin-top: 6px;
}

.email-error {
    display: block;
    color: #DC2626;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.rm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px !important;
    color: #00000080 !important;
}

.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;
}


/* ============================================================
   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;
}

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

.upload-logo-box.logo-preview .close-add-logo {
    display: flex;
}

.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: 720px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--rm-border);
    border-radius: 16px;
}

.rm-items-table {
    --rm-items-grid: minmax(170px, 2fr) 50px 70px 55px 55px minmax(120px, 1fr);
    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: 10px;
    align-items: center;
    width: 100%;
}

.rm-items-table thead tr {
    background: #F5F5F5;
    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: 10px;
}

.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;
}

.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: 4px;
}

.amount_value {
    width: 100%;
    border: 1px solid var(--rm-border) !important;
    border-radius: 8px;
    background: var(--rm-card);
    min-height: 40px;
    padding: 11px;
}


.rm-items-table input,
.rm-items-table textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    background: var(--rm-card);
    color: var(--rm-text);
    padding: 11px;
    font-size: 0.85rem;
    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:focus {
    border: 1px solid var(--rm-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.rm-items-table .rm-item-desc {
    position: relative;
    display: block;
}

.rm-items-table textarea {
    display: block;
    min-height: 44px;
    height: 44px;
    resize: none;
    /* Scrollable without a scrollbar, so the row height never jumps while typing. */
    overflow-y: auto;
    scrollbar-width: none;
    /* A transparent border keeps the box the same size once focus adds one. */
    border: 1px solid transparent;
    border-radius: 8px;
    background: #F5F5F5;
    color: var(--rm-text);
    line-height: 1.25;
}

.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);
    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;
}

.rm-items-table tbody td:nth-of-type(7) .product_total {
    flex: 1;
    color: var(--rm-text);
    font-weight: 500;
    padding-left: 3px;
}

.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;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 7px;
    border: 1px solid var(--rm-border) !important;
    border-radius: 8px;
    cursor: pointer;
}

.delete_items svg {
    opacity: 0.55;
}

.delete_items:hover svg {
    opacity: 1;
}

.delete_items:hover svg path:nth-child(1),
.delete_items:hover svg path:nth-child(2),
.delete_items:hover svg path:nth-child(3) {
    stroke: red !important;
    fill: red !important;
}

.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-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);
}


/* ============================================================
   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;
}

.rm-totals .wrap_div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--rm-text);
}

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

.rm-totals .bg_black span {
    color: #fff !important;
}

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

#instantSaveBtn {
    background: var(--rm-blue);
    color: #fff !important;
    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: #fff !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: #18181b;
    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: #18181b;
    color: #ffffff;
    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;
}

.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;
}

.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: 29px 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;
}

.receipt-paper-wrapper {
    background: var(--rm-card);
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-height: 635px;
    max-width: 100%;
}

.unique-invoice-preview-wrapper {
    position: relative;
}

.receipt-paper-wrapper .preview-loading-overlay {
    background: var(--rm-card) !important;
    padding: 0;
    margin: 0;
    inset: auto !important;
    width: 100%;
    z-index: 1;
}


.receipt-paper-wrapper .pdf-scroll-container {
    background: transparent;
}

/* 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: rgba(0, 122, 255, 0.08);
}

/* 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: #18181b;
    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: #18181b;
    color: #ffffff;
    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: #fff;
    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: #F7F8FC;
}

.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: #fff;
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    height: 100%;
    overflow: hidden;
    box-shadow: 0px 0px 24px 0px #0000000F;

}

.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: #F1F5F9;
    color: #475569;
    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,
        #007aff 0%,
        #007aff 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: #fff;
    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 #666666;
    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 #0000000D;
}

.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(--primary-blue) transparent;
}

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

.template-tabs-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

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

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

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

.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: #fff;
    color: var(--rm-blue) !important;
    box-shadow: 2px 3.01px 10px 0px #0000000D;
}

.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: #fff;
    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: #000 !important;
}

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

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


/* ============================================================
   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));
    }
}

@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,
    .rm-address-head {
        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;
    }
}

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

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

    .preview-sticky-container {
        position: static;
    }

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

@media (max-width: 991.98px) {

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

    .infographic-container {
        padding: 20px;
    }

    .receipt-paper-wrapper {
        padding: 16px;
    }

    .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;
        border-radius: 0;
    }

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

    .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;
    }

    .receipt-paper-wrapper {
        min-height: 510px;
    }

}

@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;
    }

    .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;
    }

    .form_field>input:-webkit-autofill,
    .form_field>textarea:-webkit-autofill,
    .form_field>select:-webkit-autofill {
        -webkit-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;
    }

    .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: #fff !important;
    }

    .fotter_buttons {
        border-top: 1px solid #151d2a;
        background: #1e293b;
    }

    .rmThemes_list,
    .bg_lightblue,
    .step-list-number {
        background: #1e1e1e;
    }

    .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: #fff;
    }

    .template-tab-btn svg path {
        stroke: #fff;
    }

    .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 h6 {
        color: #000 !important;
    }


}