/* 
 * Invoice Preview Stylesheet
 * Provides clean styling for the invoice preview
 */

/**
 * Invoice Preview Styles
 * 
 * A clean, professional style for invoice previews
 */

/* Reset WordPress toolbar padding */
html.wp-toolbar {
    padding-top: 0 !important;
}

/* Base styles */
:root {
    --ei-primary-color: #4e73df;
    --ei-secondary-color: #1cc88a;
    --ei-bg-color: #f8f9fc;
    --ei-text-color: #5a5c69;
    --ei-border-color: #e3e6f0;
    --ei-danger-color: #e74a3b;
    --ei-warning-color: #f6c23e;
    --ei-success-color: #1cc88a;
    --ei-info-color: #36b9cc;
}

body {
    margin-top: 0 !important;
    background-color: var(--ei-bg-color);
    color: var(--ei-text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    padding: 0;
}

/* Hide admin bar in preview */
#wpadminbar {
    display: none !important;
}

.easy-invoice-container {
    max-width: 1024px;
    margin: 40px auto;
    padding: 0 20px;
}

.easy-invoice-paper {
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 40px;
}

/* Header styles */
.easy-invoice-header {
    padding: 20px;
    background-color: #f8f9fc;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.easy-invoice-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--ei-primary-color);
    margin: 0;
}

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

.easy-invoice-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
    text-decoration: none;
}

.easy-invoice-btn-primary {
    background-color: var(--ei-primary-color);
    color: white;
}

.easy-invoice-btn-primary:hover {
    background-color: #2e59d9;
    color: white;
}

.easy-invoice-btn-secondary {
    background-color: var(--ei-secondary-color);
    color: white;
}

.easy-invoice-btn-secondary:hover {
    background-color: #17a673;
    color: white;
}

.easy-invoice-btn-light {
    background-color: #f8f9fc;
    color: #434a54;
    border: 1px solid #e3e6f0;
}

.easy-invoice-btn-light:hover {
    background-color: #e3e6f0;
}

/* Loading and Error states */
.easy-invoice-loading,
.easy-invoice-error {
    padding: 40px;
    text-align: center;
}

.easy-invoice-loading-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 4px solid rgba(78, 115, 223, 0.1);
    border-radius: 50%;
    border-top-color: var(--ei-primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.easy-invoice-loading-text,
.easy-invoice-error-title {
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 8px;
}

.easy-invoice-error-icon {
    color: var(--ei-danger-color);
    font-size: 40px;
}

/* Content styles */
.easy-invoice-content {
    padding: 30px;
}

/* Company and Invoice Info */
.easy-invoice-company-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ei-border-color);
}

.easy-invoice-company-info {
    flex: 1;
}

.easy-invoice-company-logo {
    margin-bottom: 15px;
}

.easy-invoice-company-logo img {
    max-height: 80px;
    max-width: 200px;
}

.easy-invoice-company-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.easy-invoice-company-address,
.easy-invoice-company-contact {
    font-size: 14px;
    color: #6c757d;
}

.easy-invoice-invoice-info {
    text-align: right;
    min-width: 250px;
}

.easy-invoice-invoice-number {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.easy-invoice-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.easy-invoice-meta-label {
    color: #6c757d;
    font-weight: 500;
}

.invoice-status-paid {
    color: var(--ei-success-color);
    font-weight: 600;
}

.invoice-status-pending {
    color: var(--ei-warning-color);
    font-weight: 600;
}

.invoice-status-overdue {
    color: var(--ei-danger-color);
    font-weight: 600;
}

.invoice-status-draft {
    color: #6c757d;
    font-weight: 600;
}

/* Customer and Shipping sections */
.easy-invoice-customer-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.easy-invoice-customer-info,
.easy-invoice-shipping-info {
    flex: 1;
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: 5px;
}

.easy-invoice-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--ei-primary-color);
}

.easy-invoice-customer-name,
.easy-invoice-shipping-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.easy-invoice-customer-address,
.easy-invoice-shipping-address,
.easy-invoice-customer-email {
    font-size: 14px;
    color: #6c757d;
}

/* Items table */
.easy-invoice-items-section {
    margin-bottom: 30px;
}

.easy-invoice-items-table {
    width: 100%;
    border-collapse: collapse;
}

.easy-invoice-items-table th,
.easy-invoice-items-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--ei-border-color);
}

.easy-invoice-items-table th {
    background-color: #f8f9fc;
    font-weight: 600;
    border-top: 1px solid var(--ei-border-color);
}

.easy-invoice-items-table tr:last-child td {
    border-bottom: none;
}

.easy-invoice-item-quantity,
.easy-invoice-item-price,
.easy-invoice-item-amount {
    text-align: right;
}

/* Summary section */
.easy-invoice-summary-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.easy-invoice-summary-table {
    width: 300px;
    border-collapse: collapse;
}

.easy-invoice-summary-table td {
    padding: 8px 15px;
    border-bottom: 1px solid var(--ei-border-color);
}

.easy-invoice-summary-label {
    text-align: left;
    font-weight: 500;
}

.easy-invoice-summary-value {
    text-align: right;
}

.easy-invoice-total-row {
    background-color: #f8f9fc;
    font-weight: 600;
    font-size: 16px;
}

.easy-invoice-total {
    color: var(--ei-primary-color);
}

/* Notes and Payment Instructions */
.easy-invoice-notes-container,
.easy-invoice-payment-instructions-container {
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: 5px;
    margin-bottom: 20px;
}

.easy-invoice-notes,
.easy-invoice-payment-instructions {
    white-space: pre-wrap;
    font-size: 14px;
}

/* Footer */
.easy-invoice-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--ei-border-color);
    font-size: 14px;
    color: #6c757d;
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }
    
    .easy-invoice-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .easy-invoice-paper {
        box-shadow: none;
        border-radius: 0;
    }
    
    .easy-invoice-header,
    .easy-invoice-loading,
    .easy-invoice-error {
        display: none !important;
    }
    
    .easy-invoice-content {
        padding: 0;
    }
    
    .easy-invoice-company-section,
    .easy-invoice-customer-section,
    .easy-invoice-items-section,
    .easy-invoice-summary-section,
    .easy-invoice-notes-container,
    .easy-invoice-payment-instructions-container,
    .easy-invoice-footer {
        page-break-inside: avoid;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .easy-invoice-company-section {
        flex-direction: column;
    }
    
    .easy-invoice-invoice-info {
        text-align: left;
        margin-top: 20px;
    }
    
    .easy-invoice-customer-section {
        flex-direction: column;
    }
    
    .easy-invoice-customer-info,
    .easy-invoice-shipping-info {
        margin-bottom: 15px;
    }
    
    .easy-invoice-items-table {
        display: block;
        overflow-x: auto;
    }
}

/* Global styles */
.easy-invoice-preview {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Header styles */
.easy-invoice-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.easy-invoice-company {
    flex: 2;
}

.easy-invoice-company img {
    max-height: 80px;
    max-width: 240px;
    margin-bottom: 10px;
}

.easy-invoice-company-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.easy-invoice-company-address {
    font-size: 14px;
    color: #555;
}

.easy-invoice-company-contact {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

.easy-invoice-meta {
    flex: 1;
    text-align: right;
}

.easy-invoice-meta-row {
    margin-bottom: 10px;
}

.easy-invoice-meta-label {
    font-weight: bold;
    font-size: 14px;
    color: #777;
}

.easy-invoice-meta-value {
    font-size: 15px;
    margin-top: 2px;
}

.easy-invoice-number {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Status styles */
.easy-invoice-status-paid {
    color: #0a9928;
}

.easy-invoice-status-pending {
    color: #e67e22;
}

.easy-invoice-status-overdue {
    color: #e74c3c;
}

.easy-invoice-status-draft {
    color: #7f8c8d;
}

/* Customer info styles */
.easy-invoice-info-section {
    display: flex;
    margin-bottom: 30px;
}

.easy-invoice-customer-info,
.easy-invoice-shipping-info {
    flex: 1;
    padding-right: 20px;
}

.easy-invoice-info-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
}

.easy-invoice-info-content {
    font-size: 14px;
}

.easy-invoice-customer-name,
.easy-invoice-shipping-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.easy-invoice-customer-email {
    margin-top: 5px;
    color: #555;
}

/* Loading and error states */
.easy-invoice-loading,
.easy-invoice-error {
    text-align: center;
    padding: 40px 0;
}

.easy-invoice-loading {
    min-height: 200px;
}

.easy-invoice-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: easy-invoice-spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

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

.easy-invoice-error-message {
    color: #e74c3c;
    margin-bottom: 15px;
}

.easy-invoice-retry {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.easy-invoice-retry:hover {
    background-color: #2980b9;
}

/* Items table styles */
.easy-invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.easy-invoice-items-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 10px;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    color: #555;
}

.easy-invoice-items-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.easy-invoice-item-quantity,
.easy-invoice-item-price,
.easy-invoice-item-amount {
    text-align: right;
}

/* Summary table styles */
.easy-invoice-summary-table {
    width: 100%;
    max-width: 350px;
    margin-left: auto;
    margin-bottom: 30px;
}

.easy-invoice-summary-row td {
    padding: 8px 0;
}

.easy-invoice-summary-label {
    font-weight: bold;
    color: #555;
}

.easy-invoice-summary-value {
    text-align: right;
}

.easy-invoice-summary-total {
    font-size: 18px;
    font-weight: bold;
    border-top: 1px solid #eee;
    padding-top: 10px !important;
    margin-top: 5px;
}

/* Notes and payment instructions */
.easy-invoice-notes,
.easy-invoice-payment-instructions {
    margin-bottom: 30px;
    color: #555;
}

.easy-invoice-notes-title,
.easy-invoice-payment-instructions-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
}

.easy-invoice-notes-content,
.easy-invoice-payment-instructions-content {
    font-size: 14px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

/* Footer styles */
.easy-invoice-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 13px;
    color: #777;
}

/* Action buttons */
.easy-invoice-actions {
    margin: 20px 0;
    text-align: right;
}

.easy-invoice-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-left: 10px;
    color: white;
    background-color: #3498db;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.easy-invoice-btn:hover {
    background-color: #2980b9;
}

.easy-invoice-btn-pdf {
    background-color: #e74c3c;
}

.easy-invoice-btn-pdf:hover {
    background-color: #c0392b;
}

.easy-invoice-btn-email {
    background-color: #27ae60;
}

.easy-invoice-btn-email:hover {
    background-color: #219d55;
}

.easy-invoice-btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }
    
    .easy-invoice-preview {
        box-shadow: none;
        padding: 0;
    }
    
    .easy-invoice-actions {
        display: none;
    }
    
    .easy-invoice-header,
    .easy-invoice-info-section,
    .easy-invoice-items-table,
    .easy-invoice-summary-table,
    .easy-invoice-notes,
    .easy-invoice-payment-instructions {
        page-break-inside: avoid;
    }
}

/* Basic invoice preview styles */
.easy-invoice-preview {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.easy-invoice-actions {
    margin-bottom: 20px;
    text-align: right;
}

.easy-invoice-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-left: 10px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.easy-invoice-btn:hover {
    background-color: #005177;
}

.easy-invoice-btn-pdf {
    background-color: #d63638;
}

.easy-invoice-btn-pdf:hover {
    background-color: #b32d2e;
}

.easy-invoice-btn-email {
    background-color: #2271b1;
}

.easy-invoice-btn-email:hover {
    background-color: #135e96;
}

/* Loading and error states */
.easy-invoice-loading {
    text-align: center;
    padding: 40px 0;
}

.easy-invoice-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.easy-invoice-error {
    text-align: center;
    padding: 30px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.easy-invoice-retry {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 15px;
}

/* Invoice content styling */
.easy-invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.easy-invoice-logo {
    max-width: 200px;
    max-height: 80px;
    margin-bottom: 10px;
}

.easy-invoice-company-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.easy-invoice-company-address,
.easy-invoice-company-contact {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.easy-invoice-number {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.easy-invoice-meta-row {
    margin-bottom: 5px;
}

.easy-invoice-meta-label {
    font-weight: bold;
    font-size: 14px;
    color: #666;
}

.easy-invoice-meta-value {
    font-size: 14px;
    margin-top: 3px;
}

/* Customer and shipping info */
.easy-invoice-info-section {
    display: flex;
    margin-bottom: 30px;
}

.easy-invoice-customer-info,
.easy-invoice-shipping-info {
    flex: 1;
}

.easy-invoice-info-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
}

.easy-invoice-customer-name,
.easy-invoice-shipping-name {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Items table */
.easy-invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.easy-invoice-items-table th {
    background-color: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px;
    text-align: left;
}

.easy-invoice-items-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* Summary table */
.easy-invoice-summary-table {
    width: 300px;
    margin-left: auto;
    margin-bottom: 30px;
}

.easy-invoice-summary-table td {
    padding: 5px 0;
}

.easy-invoice-summary-label {
    font-weight: bold;
}

.easy-invoice-summary-value {
    text-align: right;
}

/* Notes and payment instructions */
.easy-invoice-notes,
.easy-invoice-payment-instructions {
    margin-bottom: 30px;
}

.easy-invoice-notes-title,
.easy-invoice-payment-instructions-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.easy-invoice-notes-content,
.easy-invoice-payment-instructions-content {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* Footer */
.easy-invoice-footer {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 12px;
}

/* Print styles */
@media print {
    .easy-invoice-actions,
    .easy-invoice-retry {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .easy-invoice-preview {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
}

/**
 * Invoice Preview Styles
 *
 * Styling for the invoice preview interface
 */

/* General Layout */
.invoice-preview-container {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.invoice-preview-content {
    padding: 40px;
}

@media print {
    .invoice-preview-container {
        box-shadow: none;
        max-width: 100%;
    }
    
    .invoice-preview-actions,
    .invoice-preview-header-actions {
        display: none !important;
    }
    
    .invoice-preview-content {
        padding: 0;
    }
}

/* Loading and Error States */
.invoice-preview-loading,
.invoice-preview-error {
    padding: 60px 20px;
    text-align: center;
}

.invoice-preview-loading img {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.invoice-preview-error {
    color: #d63638;
}

.invoice-preview-error-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

/* Header Actions */
.invoice-preview-header-actions {
    background-color: #f9f9f9;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #eee;
}

.invoice-preview-header-actions button {
    margin-left: 10px;
    padding: 8px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.invoice-preview-header-actions button:hover {
    background-color: #f5f5f5;
}

.invoice-preview-header-actions button i {
    margin-right: 8px;
}

/* Invoice Status Bar */
.invoice-status-bar {
    height: 10px;
    width: 100%;
}

.status-draft .invoice-status-bar {
    background-color: #72aee6;
}

.status-pending .invoice-status-bar {
    background-color: #f0c33c;
}

.status-paid .invoice-status-bar {
    background-color: #00a32a;
}

.status-overdue .invoice-status-bar {
    background-color: #d63638;
}

.status-cancelled .invoice-status-bar {
    background-color: #999;
}

/* Invoice Header */
.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.invoice-company-logo {
    margin-bottom: 15px;
}

.invoice-company-logo img {
    max-height: 80px;
    max-width: 200px;
}

.invoice-company-logo h2 {
    font-size: 24px;
    margin: 0;
    color: #333;
}

.invoice-company-info {
    font-size: 14px;
    line-height: 1.5;
}

.invoice-company-name {
    font-weight: bold;
    font-size: 16px;
}

.invoice-info {
    text-align: right;
    font-size: 14px;
}

.invoice-info h1 {
    font-size: 28px;
    color: #333;
    margin: 0 0 20px 0;
    font-weight: normal;
}

.invoice-info-row {
    margin-bottom: 10px;
}

.invoice-info-label {
    color: #777;
    margin-right: 5px;
}

.invoice-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.status-draft .invoice-status {
    background-color: #72aee6;
}

.status-pending .invoice-status {
    background-color: #f0c33c;
    color: #333;
}

.status-paid .invoice-status {
    background-color: #00a32a;
}

.status-overdue .invoice-status {
    background-color: #d63638;
}

.status-cancelled .invoice-status {
    background-color: #999;
}

/* Customer Info */
.invoice-customer-info {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.invoice-customer-info h3 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #777;
    font-weight: normal;
}

.invoice-customer-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.invoice-customer-details {
    font-size: 14px;
    line-height: 1.5;
}

/* Items Table */
.invoice-items {
    margin-bottom: 40px;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.invoice-items-table th {
    background-color: #f5f5f5;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.invoice-items-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.invoice-items-table tr:last-child td {
    border-bottom: 2px solid #ddd;
}

.item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.item-desc {
    font-size: 13px;
    color: #777;
    white-space: pre-line;
}

.item-quantity,
.item-price,
.item-total {
    text-align: right;
    white-space: nowrap;
}

.invoice-items-table th.item-quantity,
.invoice-items-table th.item-price,
.invoice-items-table th.item-total {
    text-align: right;
}

/* Summary */
.invoice-summary {
    margin-left: auto;
    width: 350px;
    margin-bottom: 40px;
}

.invoice-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-summary-table td,
.invoice-summary-table th {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.invoice-summary-table th {
    text-align: left;
    font-weight: normal;
    color: #777;
}

.invoice-summary-table td {
    text-align: right;
}

.invoice-total-row th,
.invoice-total-row td {
    font-weight: bold;
    font-size: 18px;
    border-top: 2px solid #ddd;
    border-bottom: none;
    padding-top: 15px;
}

/* Notes & Payment Instructions */
.invoice-notes,
.invoice-payment-instructions-container {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.invoice-notes h3,
.invoice-payment-instructions-container h3 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #777;
    font-weight: normal;
}

.invoice-notes-content,
.invoice-payment-instructions {
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

/* Footer */
.invoice-footer {
    margin-top: 60px;
    font-size: 13px;
    color: #777;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Actions Bar */
.invoice-preview-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.invoice-preview-actions button {
    padding: 12px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.invoice-print-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd !important;
}

.invoice-download-btn {
    background-color: #2271b1;
    color: #fff;
}

.invoice-email-btn {
    background-color: #00a32a;
    color: #fff;
}

.invoice-preview-actions button:hover {
    opacity: 0.9;
}

.invoice-preview-actions button i {
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .invoice-preview-content {
        padding: 20px;
    }
    
    .invoice-header {
        flex-direction: column;
    }
    
    .invoice-info {
        text-align: left;
        margin-top: 20px;
    }
    
    .invoice-summary {
        width: 100%;
    }
    
    .invoice-items-table {
        font-size: 13px;
    }
    
    .invoice-items-table th {
        padding: 8px;
    }
    
    .invoice-items-table td {
        padding: 8px;
    }
    
    .item-description {
        min-width: 200px;
    }
    
    .invoice-preview-actions {
        flex-direction: column;
    }
    
    .invoice-preview-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .invoice-items-table {
        display: block;
        overflow-x: auto;
    }
}

/* Fix for invoice preview page */
.easy-invoice-app {
    background-color: #f8f9fc;
    min-height: 100vh;
}

/* Fix grid layout on smaller screens */
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    #shipping-section {
        margin-top: 20px;
    }
}

/* Improve table responsiveness */
@media (max-width: 768px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}

/* Button styling */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

/* Resizable preview */
.ei-resizable-preview { width: 100%; min-width: 360px; }
.ei-resize-handle { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: ew-resize; background: transparent; }
.ei-resize-handle:hover { background: rgba(0,0,0,0.05); }

/* Print styles */
@media print {
    body {
        background-color: white;
        margin: 0;
        padding: 0;
    }
    
    .easy-invoice-app {
        background-color: white;
    }
    
    .bg-white.shadow-sm {
        display: none;
    }
    
    .max-w-7xl {
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #invoice-container {
        box-shadow: none !important;
        border: none !important;
    }
    
    .rounded-lg {
        border-radius: 0 !important;
    }
    
    /* Ensure colors print correctly */
    .text-gray-900 { color: black !important; }
    .text-gray-600 { color: #444 !important; }
    .bg-gray-50 { background-color: #f9f9f9 !important; }
    
    /* Table borders */
    table th, table td {
        border-color: #ddd !important;
    }
} 