/* File: static/themes/default.css */
/* Default theme - Exactly matching original styles.css with increased spacing */

@import url('https://fonts.googleapis.com/css2?family=Paytone+One&family=Poltawski+Nowy&family=Rufina:wght@700&display=swap');

/* ===== THEME VARIABLES ===== */
.theme-default {
    /* TYPOGRAPHY - Exact from styles.css */
    --font-primary: 'Poltawski Nowy', serif;
    --font-secondary: 'Rufina', serif;
    --line-height: 0.7;

    /* COLORS - Exact from styles.css */
    --text-primary: #000000;
    --text-secondary: #4a4a4a;
    --border-color: #f0f0f0;
    --subtotal-bg: #f9f9f9;
}

/* ===== GLOBAL STYLES - EXACT FROM STYLES.CSS ===== */
.theme-default body {
    font-family: 'Poltawski Nowy', serif !important;
    line-height: 0.7 !important;
    color: #000000 !important;
    background: white !important;
}

/* ===== NAVIGATION HEADER - KEEP INTER FOR CLEAN LOOK ===== */
.theme-default .unified-header {
    background: #334155 !important;
    color: white !important;
    font-family: 'Inter', sans-serif !important;
}

.theme-default .unified-header * {
    font-family: 'Inter', sans-serif !important;
}

/* ===== REPORT CONTENT - 20% SIDE MARGINS ===== */
.theme-default .report-content {
    margin: 2rem 20% !important;  /* 20% margins on each side */
    padding: 30px !important;
    background: white !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ===== REPORT TITLE SECTION - INCREASED SPACING ===== */
.theme-default .company-name {
    font-family: 'Poltawski Nowy', serif !important;
    font-size: 2rem !important;
    font-weight: bold !important;
    line-height: 0.7 !important;
    color: #000000 !important;
    margin-bottom: 1.5rem !important;  /* Added spacing after company name */
}

.theme-default .report-title {
    font-family: 'Poltawski Nowy', serif !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    line-height: 0.7 !important;
    color: #000000 !important;
    margin-bottom: 1.25rem !important;  /* Added spacing after report title */
}

.theme-default .report-period {
    font-family: 'Poltawski Nowy', serif !important;
    font-size: 1.125rem !important;
    line-height: 0.7 !important;
    color: #4a4a4a !important;
    margin-bottom: 1rem !important;  /* Added spacing after period */
}

.theme-default .report-metadata {
    font-family: 'Poltawski Nowy', serif !important;
    font-size: 0.875rem !important;
    color: #4a4a4a !important;
    margin-bottom: 0.75rem !important;  /* Added spacing after metadata */
}

.theme-default .report-title-section {
    text-align: center !important;
    margin-bottom: 2.5rem !important;  /* Increased bottom margin for more space before table */
    padding-bottom: 1.5rem !important;  /* Increased padding */
    border-bottom: 1px solid #f0f0f0 !important;
}

/* ===== TABLE STYLES - EXACT FROM STYLES.CSS ===== */
.theme-default table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-family: 'Poltawski Nowy', serif !important;
    line-height: 0.7 !important;
}

.theme-default th,
.theme-default td {
    padding: 0.5rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-family: 'Poltawski Nowy', serif !important;
}

/* Text alignment */
.theme-default .text-center {
    text-align: center !important;
}

.theme-default .text-end {
    text-align: right !important;
    font-family: 'Poltawski Nowy', serif !important;
}

/* Separator - exact from styles.css */
.theme-default .separator {
    border-bottom: none !important;
}

.theme-default .separator td {
    padding: 0.5rem 0 !important;
}

/* Subtotal - exact from styles.css */
.theme-default .subtotal {
    font-weight: bold !important;
    background-color: #f9f9f9 !important;
    font-family: 'Poltawski Nowy', serif !important;
}

.theme-default .subtotal td {
    font-family: 'Poltawski Nowy', serif !important;
    font-weight: bold !important;
}

/* Total header - exact from styles.css */
.theme-default .total-header {
    font-weight: bold !important;
    padding-left: 1rem !important;
    color: #4a4a4a !important;
    font-family: 'Poltawski Nowy', serif !important;
}

.theme-default .total-header td {
    font-family: 'Poltawski Nowy', serif !important;
    font-weight: bold !important;
}

/* Main header - exact from styles.css */
.theme-default .main-header {
    text-align: left !important;
    padding-left: 15px !important;
    font-family: 'Poltawski Nowy', serif !important;
    font-weight: bold !important;
}

.theme-default .main-header td {
    padding-left: 15px !important;
    font-family: 'Poltawski Nowy', serif !important;
    font-weight: bold !important;
}

/* Item row - RUFINA FONT - exact from styles.css (note the typo was in original: fonnt-family) */
.theme-default .item-row td:first-child {
    padding-left: 30px !important;
    font-family: 'Rufina', serif !important;
}

/* Sub main header - exact from styles.css */
.theme-default .sub_main_header {
    text-align: left !important;
    padding-left: 35px !important;
    font-family: 'Poltawski Nowy', serif !important;
}

.theme-default .sub_main_header td {
    padding-left: 35px !important;
    font-family: 'Poltawski Nowy', serif !important;
}

/* Opening line - exact from styles.css */
.theme-default .opening_line {
    text-align: left !important;
    padding-left: 5px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    font-family: 'Poltawski Nowy', serif !important;
}

.theme-default .opening_line td {
    padding-left: 5px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    font-family: 'Poltawski Nowy', serif !important;
}

/* Grand total */
.theme-default .grand-total {
    font-weight: bold !important;
    background-color: #f9f9f9 !important;
    font-family: 'Poltawski Nowy', serif !important;
}

.theme-default .grand-total td {
    font-family: 'Poltawski Nowy', serif !important;
    font-weight: bold !important;
}

/* ===== PRINT STYLES - WITH PROPER MARGINS ===== */
@page {
    margin: 0.75in 0.5in;  /* Top/bottom: 0.75in, Left/right: 0.5in */
    size: letter;
    -webkit-print-color-adjust: exact;
}

@media print {
    .theme-default html,
    .theme-default body {
        margin: 0 !important;
        padding: 0 !important;
        font-family: 'Poltawski Nowy', serif !important;
        line-height: 0.7 !important;
    }

    /* Add side margins to report content in print */
    .theme-default .report-content {
        margin: 0 8% !important;  /* 8% margins on each side for print */
        padding: 0 !important;
        max-width: none !important;
    }

    /* Ensure fonts are preserved in print */
    .theme-default .item-row td:first-child {
        font-family: 'Rufina', serif !important;
    }

    .theme-default table,
    .theme-default th,
    .theme-default td {
        font-family: 'Poltawski Nowy', serif !important;
        line-height: 0.7 !important;
    }

    /* Print-specific spacing adjustments */
    .theme-default .company-name {
        margin-bottom: 1.25rem !important;
    }

    .theme-default .report-title {
        margin-bottom: 1rem !important;
    }

    .theme-default .report-period {
        margin-bottom: 0.875rem !important;
    }

    .theme-default .report-metadata {
        margin-bottom: 0.625rem !important;
    }

    .theme-default .report-title-section {
        margin-bottom: 2rem !important;
        padding-bottom: 1.25rem !important;
    }
}