/* ============================================================
   RESET AND BASE STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.4;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Main Layout - Three Column Design */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Center Content */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Sidebar Base Styles */
.left-sidebar{
    background: #f8fffa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.right-sidebar {
    background: #fff9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Left Sidebar - Settings */
.left-sidebar {
    border-left: 4px solid #aaeeaa;
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.sidebar-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-group {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.setting-group h4,
.setting-group h5 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.setting-group h5 {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

.setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #007bff;
}

.currency-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

/* Right Sidebar - Monetization */
.right-sidebar {
    border-right: 4px solid #eeaaaa;
}

.widget-section {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.widget-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
}

.widget-description {
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
    line-height: 1.4;
}

.about-text {
    font-size: 13px;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 15px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feature-item {
    font-size: 12px;
    color: #28a745;
    font-weight: 500;
}

/* Coffee Widget Styling */
.coffee-widget {
    text-align: center;
    margin: 15px 0;
}

/* PayPal Widget Styling */
.paypal-widget {
    text-align: center;
    margin: 15px 0;
}

.paypal-widget form {
    display: inline-block;
}

/* Optional Fields Styling */
.optional-field {
    margin-top: 5px;
    transition: all 0.3s ease;
}

.optional-field.show {
    display: block !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 250px 1fr 250px;
        gap: 15px;
    }
    
    .left-sidebar,
    .right-sidebar {
        padding: 15px;
    }
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-sidebar,
    .right-sidebar {
        position: static;
        order: 2;
    }
    
    .center-content {
        order: 1;
    }
    
    .right-sidebar {
        order: 3;
    }
}

@media (max-width: 768px) {
    .main-layout {
        padding: 10px;
    }
    
    .left-sidebar,
    .right-sidebar {
        padding: 15px;
    }
    
    .setting-group,
    .widget-section {
        padding: 12px;
    }
}

/* ============================================================
   Article Links above template
   ============================================================ */


.articles-links {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.article-menu {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.article-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    font-size: 13px;
    transition: all 0.2s ease;
}

.article-link:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

.article-icon {
    font-size: 16px;
    min-width: 20px;
}

.article-title {
    font-weight: 500;
    line-height: 1.3;
}

.article-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #007bff;
}

.article-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 32px;
}

.article-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.article-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin: 20px 0;
    font-size: 16px;
    font-style: italic;
}

.article-content {
    margin-bottom: 40px;
}

.article-content h2 {
    color: #007bff;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 24px;
}

.article-content h3 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 20px;
}

.article-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.article-content ul, .article-content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 8px;
}

.highlight-box {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.highlight-box h4 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 16px;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.warning-box h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 16px;
}

.article-navigation {
    display: flex;
	flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.nav-button {
    display: inline-block;
    padding: 12px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background: #0056b3;
    color: white;
}

.nav-button.secondary {
    background: #6c757d;
}

.nav-button.secondary:hover {
    background: #545b62;
}

/* Responsive Design for Articles */
@media (max-width: 768px) {
    .article-page {
        padding: 15px;
    }
    
    .article-header h1 {
        font-size: 28px;
    }
    
    .article-content h2 {
        font-size: 22px;
    }
    
    .article-navigation {
        flex-direction: row;
        gap: 15px;
    }
    
    .nav-button {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   INVOICE TEMPLATE
   ============================================================ */
.invoice-template {
    background: white;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    min-height: 1056px; /* 11in at 96dpi */
    width: 816px;       /* 8.5in at 96dpi - avoids html2canvas inch-unit issues */
    margin: 0 auto 20px auto;
	position: relative;
}

/* ============================================================
   PAID STAMP STYLES
   ============================================================ */
   
/* PAID Control Checkbox */
.paid-control {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.paid-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    user-select: none;
}

/* Custom Checkbox Styling */
.paid-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #28a745;
}

.paid-checkbox:checked + .checkmark::after {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-left: 5px;
}

/* PAID Stamp Overlay */
.paid-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    z-index: 100;
    pointer-events: none; /* Allows clicking through the stamp */
    user-select: none;
}

.stamp-text {
    /* Garish styling */
    font-size: 120px;
    font-weight: 900;
    font-family: 'Arial Black', Arial, sans-serif;
    color: #dc3545;
    text-shadow: 
        3px 3px 0px #fff,
        -3px -3px 0px #fff,
        3px -3px 0px #fff,
        -3px 3px 0px #fff,
        4px 4px 8px rgba(0,0,0,0.3);
    
    /* Semi-transparent background */
    background: rgba(220, 53, 69, 0.15);
    border: 8px solid #dc3545;
    border-radius: 20px;
    padding: 20px 40px;
    
    /* Additional garish effects */
    box-shadow: 
        0 0 20px rgba(220, 53, 69, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    
    /* Animation for extra attention */
    animation: stampPulse 2s ease-in-out infinite alternate;
}

/* Stamp animation */
@keyframes stampPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.02);
        opacity: 1;
    }
}


/* ============================================================
   INVOICE HEADER
   ============================================================ */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

/* Left side: logo + company details side by side */
.company-info {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
}

/* Logo container sizes itself to its content - no fixed width */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* don't compress logo when space is tight */
}

/* Company name and address stack vertically */
.company-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

/* Right side: invoice number/dates */
.invoice-info {
    float: right;
	text-align: right;
    flex-shrink: 0;
}

.invoice-info h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 15px;
}

.invoice-number,
.invoice-date,
.due-date,
.po-number {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-end;
}

.invoice-info label {
    font-weight: bold;
    min-width: 100px;
}


/* ============================================================
   LOGO UPLOAD AREA
   ============================================================ */
.logo-upload-area {
    width: 120px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
    position: relative;
    overflow: hidden;
}

.logo-upload-area:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.logo-upload-area.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.logo-placeholder {
    text-align: center;
    padding: 10px;
    color: #666;
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 5px;
}

.upload-formats {
    font-size: 10px;
    color: #999;
}

.logo-controls {
    display: flex;
    gap: 5px;
}


/* ============================================================
   COMPANY NAME AND ADDRESS INPUTS
   ============================================================ */
.company-name {
    font-size: 18px;
    font-weight: bold;
    border: none;
    background: transparent;
    border-bottom: 1px solid #ccc;
    padding: 5px 0;
}

.company-address {
    border: none;
    background: transparent;
    border-bottom: 1px solid #ccc;
    padding: 5px 0;
    resize: none;
    height: 60px;
}


/* ============================================================
   BILL TO + NOTES (side by side)
   ============================================================ */
.bill-to-section {
    display: flex;
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.terms-section {
    display: flex;
	flex: 1;
	flex-direction: column;
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.bill-to {
    flex: 1;
}

.bill-to h3 {
    margin-bottom: 10px;
}

.notes-section {
    flex: 0 0 50%;
}

.notes-section h4 {
    margin-bottom: 10px;
    color: #333;
}

.notes-field {
    width: 100%;
    height: 80px;
    resize: vertical;
}


/* ============================================================
   ITEMS TABLE
   ============================================================ */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.items-table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    font-weight: bold;
}

.items-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.item-amount {
    text-align: right;
    font-weight: bold;
}

/* Last column (remove button) */
.items-table th:last-child,
.items-table td:last-child {
    width: 50px;
    text-align: center;
}

/* Table controls (add row button, row count) */
.table-controls {
    margin: 10px 0 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.row-info {
    color: #666;
    font-size: 14px;
}

.remove-row-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-row-btn:hover {
    background: #c82333;
}


/* ============================================================
   TOTALS SECTION
   ============================================================ */

.totals-section {
    width: 100%;
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;  /* pushes .totals to the right */
}

.totals {
    min-width: 300px;
    /* float: right; -- remove this */
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.total-row-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.total-final {
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    font-size: 18px;
    margin-top: 10px;
    padding-top: 15px;
}

input.tax-input {
    width: 60px;
    text-align: center;
	display: inline-block;
}


/* ============================================================
   INPUT FIELDS
   ============================================================ */
.input-field {
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    padding: 5px 0;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.3s;
}

.input-field:focus {
    outline: none;
    border-bottom-color: #007bff;
    background-color: #f8f9ff;
}

.input-field::placeholder {
    color: #999;
    font-style: italic;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    //padding: 12px 24px;
    //margin: 0 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-buttons {
    display: flex;
    justify-content: space-evenly;
}



/* ============================================================
   EXAMPLE TEMPLATES SECTION
   ============================================================ */
.examples-section {
    width: 816px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.examples-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    margin: 0;
}

.examples-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-example {
    background-color: #f0f4ff;
    color: #3a5adb;
    border: 1px solid #c0cef7;
    border-radius: 5px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-example:hover {
    background-color: #dce6ff;
    border-color: #3a5adb;
}

/* ============================================================
   EMAIL MODAL
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-actions {
    text-align: right;
    margin-top: 20px;
}


/* ============================================================
   FEEDBACK WIDGET
   ============================================================ */
.feedback-widget-section {
    border: 2px solid #ffc107;
    background: #fffdf0;
}

.feedback-widget-section h4 {
    color: #856404;
}

.btn-feedback {
    width: 100%;
    padding: 10px;
    background-color: #ffc107;
    color: #212529;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s;
}

.btn-feedback:hover {
    background-color: #e0a800;
}

.btn-feedback:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Honeypot — completely hidden from real users */
.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    tabindex: -1;
}

.modal-subtext {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.required {
    color: #dc3545;
}

.char-counter {
    display: block;
    text-align: right;
    color: #999;
    font-size: 11px;
    margin-top: 3px;
}

/* ============================================================
   PRINT / HTML2CANVAS STYLES

   html2canvas has its own layout engine that cannot reliably
   resolve flexbox container widths — elements collapse or
   center unexpectedly. Strategy: replace every flex layout
   inside the invoice with floats + explicit widths, which
   html2canvas handles correctly.
   ============================================================ */
@media print {

    /* --- Hide everything outside the invoice --- */
    .left-sidebar,
    .right-sidebar,
    .no-print,
    #bmc-wbtn,
    #BMC-Widget {
        display: none !important;
    }

    /* --- Page chrome --- */
    body {
        background: white;
        padding: 0;
    }

    .main-layout {
        display: block;
        padding: 0;
        margin: 0;
        max-width: none;
        min-height: unset;
    }

    .center-content {
        display: block;
        width: 100%;
    }

    .invoice-container {
        width: 100%;
    }

    .invoice-template {
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 20px;
        width: 100%;
        min-height: unset;
        /* invoice-template is position:relative — needed for PAID stamp */
    }

    /* --- PAID stamp --- */
    .paid-stamp {
        position: absolute !important;
        z-index: 100 !important;
    }

    .stamp-text {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        print-color-adjust: exact;
    }

    /* -------------------------------------------------------
       INVOICE HEADER
       Float-based replacement for display:flex
       justify-content:space-between on .invoice-header.
       Left column (company-info) = 50%, right column
       (invoice-info) = 45%, 5% absorbed by the gap between.
    ------------------------------------------------------- */
    .invoice-header {
        display: block;
        overflow: hidden; /* clearfix — contains the floated children */
        width: 100%;
    }

    .company-info {
        display: block;
        overflow: hidden; /* clearfix — contains the floated logo-container */
        float: left;
        width: 50%;
    }

    /* logo-container floats left inside company-info and sizes itself
       to its content. When .logo-not-uploaded is present, hiding the
       entire container removes it from flow — company-details then
       starts at the left edge with no gap.                           */
    .logo-container {
        float: left;
        margin-right: 12px;
    }

    .logo-container:has(.logo-not-uploaded) {
        display: none !important;
    }

    /* company-details fills whatever width remains after logo-container */
    .company-details {
        display: block;
        overflow: hidden;
    }

    /* invoice-info floats right to mirror justify-content:space-between */
    .invoice-info {
        float: right;
        width: 45%;
        text-align: right;
    }
	
	.invoice-info .input-field {
		width: auto;
	}

    /* invoice-number, invoice-date, due-date are display:flex
       justify-content:flex-end on screen — replace with text-align:right */
	.invoice-number,
    .invoice-date,
    .due-date,
	.po-number	{
        display: block;
        text-align: right;
    }

    /* -------------------------------------------------------
       LOGO UPLOAD AREA
       Strip the dashed box — just show the image if present.
    ------------------------------------------------------- */
    .logo-upload-area {
        border: none;
        background: transparent;
        width: auto;
        height: auto;
        display: block;
    }

    .logo-placeholder {
        display: none !important;
    }

    /* -------------------------------------------------------
       BILL-TO SECTION
       Float-based replacement for display:flex on
       .bill-to-section (50/50 columns).
    ------------------------------------------------------- */
    .bill-to-section {
        display: block;
        overflow: hidden; /* clearfix */
        width: 100%;
    }

    .bill-to {
        float: left;
        width: 48%;
    }

    .terms-section {
        float: right;
        width: 48%;
        display: block; /* override flex */
    }

    /* payment-terms and notes-section stack naturally as blocks */
    .payment-terms,
    .notes-section {
        display: block;
        width: 100%;
    }

    /* -------------------------------------------------------
       TOTALS SECTION
       Float-based replacement for display:flex
       justify-content:flex-end on .totals-section.
    ------------------------------------------------------- */
    .totals-section {
        display: block;
        overflow: hidden; /* clearfix */
        width: 100%;
    }

    .totals {
        float: right;
        min-width: 300px;
    }

    /* total-row is display:flex justify-content:space-between —
       replace with float so html2canvas can resolve widths      */
    .total-row {
        display: block;
        overflow: hidden;
    }

    .total-row > span:first-child {
        float: left;
    }

    .total-row > span:last-child {
        float: right;
        text-align: right;
    }

    /* total-row-group is display:flex flex-direction:column —
       plain block stacking is the correct replacement          */
    .total-row-group {
        display: block;
    }
	
	/* Optional fields: ensure they remain visible when toggled on */
	.optional-field.show {
		display: block !important;
	}

	/* poField sits inside invoice-info — override flex to block for print */
	#poField.show {
		display: block !important;
		text-align: right;
	}

    /* --- Input fields: strip interactive styling --- */
    .input-field {
		border-top: none;
		border-left: none;
		border-right: none;
		border-bottom: 1px solid #ccc;
		background: transparent;
		color: black;
		width: 100%;
	}

    .input-field:focus {
        background: transparent;
    }

    .input-field::placeholder {
        color: transparent;
    }

    input.tax-input {
        border: none;
        background: transparent;
    }
}


/* ============================================================
   RESPONSIVE (MOBILE)
   ============================================================ */
@media (max-width: 768px) {
    .invoice-template {
        width: 100%;
        padding: 20px;
    }

    .invoice-header {
        flex-direction: column;
        gap: 20px;
    }
	
    .stamp-text {
        font-size: 80px;
        padding: 15px 30px;
        border-width: 6px;
    }

    .company-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .logo-upload-area {
        width: 100px;
        height: 100px;
    }

    .invoice-info {
        text-align: right;
    }

    .items-table {
        font-size: 12px;
    }

    .totals-section {
        justify-content: center;
    }
}