/* Minimal CSS for 8.5x11in pages with 0.5in margins and pagination */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap');

/* Global Resets for Consistency */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ensure consistent sizing */
}

/* Basic screen-only styling */
.noprint {
  display: block;
}

.report-banner {
  width: 100%;
  border-bottom: 1px solid #333;
  padding: 8px;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background-color: #fefefe;
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out,
              background-color 0.15s ease-in-out,
              border-color 0.15s ease-in-out,
              box-shadow 0.15s ease-in-out;
}

.banner-left a {
  font-size: 18pt;
  text-decoration: none;
  font-weight: 500;
  color: #4290f5;
}

.banner-left,
.banner-center,
.banner-right {
  display: inline-block;
  vertical-align: middle;
}

.banner-left {
  width: 20%;
  text-align: left;
}

.banner-center {
  width: 50%;
  text-align: center;
  vertical-align: middle;
}

.banner-right {
  width: 20%;
  text-align: right;
}

.banner-right button,
.banner-right a {
  margin-left: 10px;
  padding: 5px 10px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #888;
  background-color: #fff;
  cursor: pointer;
}

.banner-right a {
  display: inline-block;
}

/* Base Font and Text Settings */
body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

/* Page Layout */
.page {
    width: 8.5in;
    min-height: 11in;
    box-sizing: border-box;
}

/* Basic HTML Element Formatting */
h1 {
    font-size: 24px;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 20px;
    margin-bottom: 0.5em;
    page-break-after: avoid;
}

p {
    margin-bottom: 1em;
}

/* Table Formatting */
table {
    page-break-inside: avoid;
    border-collapse: collapse;
    width: 100%;
    max-width: 100%; /* Prevent overflow */
}

th, td {
    border: 1px solid #ddd;
    padding: 0.5em;
    text-align: left;
}

/* Screen-specific styles for WYSIWYG appearance */
@media screen {
    body {
        background: #f0f0f0;
        margin: 0;
        padding: 0;
    }
    .page {
        width: 8.5in;
        min-height: 11in;
        padding: 0.25in;
        background: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        margin: 0 auto 0.5in auto;
    }
    .page-break {
        border-top: 2px dashed #888;
        margin: 2em 0;
        text-align: center;
        position: relative;
    }
    .page-break::before {
        content: "Inserted Page Break";
        font-size: 12px;
        color: #888;
        background: #fff;
        padding: 0 0.5em;
        position: absolute;
        top: -0.8em;
        left: 50%;
        transform: translateX(-50%);
    }
    .signature {
        font-family: 'Dancing Script', cursive;
        font-size: 28px;
        color: #222;
    }
}

/* Print-specific styles for print-preview and wkhtmltopdf */
@media print {
    @page {
        size: 8.5in 11in;
        margin: 0.25in;
    }
    body {
        margin: 0;
        background: #ffffff !important;
    }
    .noprint {
        display: none !important; /* Ensure banner is hidden */
    }
    .page {
        width: 8.5in;
        min-height: 11in;
        box-sizing: border-box;
        page-break-before: auto; /* Prevent unnecessary breaks */
    }
    .last-page {
        page-break-after: avoid; /* Prevent break after last page */
    }
    h2 {
        page-break-after: avoid;
    }
    table {
        page-break-inside: avoid;
    }
   .signature {
    font-family: 'Z003','URW Chancery L', cursive;
    font-size: 28px;
    color: #222;
  }
}

.btn-primary {
  color: #fff;
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

.btn-primary:hover {
  color: #fff;
  background-color: #0b5ed7 !important;
  border-color: #0a58ca !important;
}

.btn-danger {
  color: #fff;
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

.btn-danger:hover {
  color: #fff;
  background-color: #bb2d3b !important;
  border-color: #b02a37 !important;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

.btn-secondary:hover {
  color: #fff;
  background-color: #5c636a !important;
  border-color: #565e64 !important;
}

@media screen and (max-width: 768px) {
  .report-banner {
    display: block;
    text-align: center;
    padding: 10px 5px;
  }
  .banner-left,
  .banner-center,
  .banner-right {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
  .banner-right button,
  .banner-right a {
    display: inline-block;
    margin: 5px 5px 0 5px;
    font-size: 16px;
    width: auto;
  }
  .btn {
    font-size: 16px;
    padding: 10px 15px;
  }
  body {
    padding: 0 10px;
    font-size: 15px;
  }
  .page {
    width: 100%;
    min-height: auto;
    box-shadow: none;
    margin: 0;
  }
  .section {
    padding: 1em 0;
  }
}

@media screen {
    .modal-dialog {
        max-width: 400px !important;
        margin: 10vh auto !important;
        border: none;
        border-radius: 6px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        background: #fff;
    }
    .modal-dialog::backdrop {
        background: rgba(0, 0, 0, 0.5);
    }
    .modal-content {
        padding: 20px;
    }
    .modal-content h2 {
        margin: 0 0 10px;
        font-size: 1.5em;
    }
    .modal-content p {
        margin: 0 0 20px;
        font-size: 1em;
    }
    .modal-buttons {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }
    .modal-button {
        padding: 8px 16px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 1em;
    }
    .modal-button-primary {
        background: #007bff;
        color: #fff;
    }
    .modal-button-primary:hover {
        background: #0056b3;
    }
    .modal-button-success {
        background: #28a745;
        color: #fff;
    }
    .modal-button-success:hover {
        background: #218838;
    }
    .modal-button-secondary {
        background: #6c757d;
        color: #fff;
    }
    .modal-button-secondary:hover {
        background: #5a6268;
    }
}