/* ==========================================================================
   HOURS CALCULATOR - STYLES
   Pixel-perfect match to Calculator Archive, reference images & classic layout
   ========================================================================== */

.hours-page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 18px 40px;
  font-family: Arial, Helvetica, sans-serif;
  color: #333333;
}

/* Top Bar & Breadcrumbs */
.hours-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.hours-breadcrumbs {
  font-size: 13px;
  color: #555555;
  margin-bottom: 0;
}

.hours-breadcrumbs a {
  color: #0844a4;
  text-decoration: none;
}

.hours-breadcrumbs a:hover {
  text-decoration: underline;
}

.hours-breadcrumbs .sep {
  margin: 0 4px;
  color: #666666;
}

.hours-breadcrumbs .current {
  color: #0844a4;
  font-weight: normal;
}

.hours-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hours-top-btn {
  background: #ffffff;
  border: 1px solid #7f9db9;
  color: #0844a4;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hours-top-btn:hover {
  background: #f0f4f8;
  border-color: #0b386b;
  color: #0b386b;
}

.hours-top-btn svg {
  width: 13px;
  height: 13px;
}

/* Page Title & Header */
.hours-title {
  font-size: 26px;
  font-weight: bold;
  color: #0b386b;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.hours-intro-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #222222;
  margin: 0 0 16px 0;
}

.hours-intro-desc a {
  color: #0844a4;
  text-decoration: underline;
}

.hours-intro-desc a:hover {
  color: #0b386b;
}

/* Two-column Layout */
.hours-main-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.hours-calc-col {
  flex: 1;
  min-width: 0;
}

.hours-sidebar-col {
  width: 290px;
  flex-shrink: 0;
}

/* Section Headings */
.hours-section-heading {
  font-size: 18px;
  font-weight: bold;
  color: #003366;
  margin: 24px 0 10px 0;
}

/* Classic Form Card (Image 2 exact match) */
.hours-card-box {
  background-color: #f2f2f2;
  border: 1px solid #d4d4d4;
  border-radius: 2px;
  padding: 12px 14px;
  max-width: 320px;
  box-sizing: border-box;
}

.hours-form-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-form-table td {
  padding: 5px 2px;
  vertical-align: middle;
  font-size: 13px;
}

.hours-label-cell {
  width: 78px;
  color: #000000;
  font-weight: normal;
  white-space: nowrap;
}

.hours-input-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.hours-text-input {
  width: 76px;
  height: 24px;
  padding: 2px 5px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  background: #ffffff;
  color: #000000;
}

.hours-text-input:focus {
  outline: 1px solid #0844a4;
  border-color: #0844a4;
}

.hours-select {
  height: 24px;
  padding: 1px 3px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  font-size: 12px;
  font-family: inherit;
  background: #ffffff;
  color: #000000;
  cursor: pointer;
}

.hours-now-link {
  color: #0844a4;
  text-decoration: underline;
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 2px;
  font-family: inherit;
}

.hours-now-link:hover {
  color: #001f5c;
}

.hours-swap-cell {
  width: 22px;
  text-align: center;
  padding-left: 2px !important;
}

.hours-swap-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #333333;
  font-size: 16px;
  line-height: 1;
  padding: 2px;
  border-radius: 3px;
  transition: background 0.15s ease;
}

.hours-swap-btn:hover {
  background: #e0e0e0;
  color: #0844a4;
}

/* Date Pickers (Mode 2) */
.hours-date-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.hours-year-input {
  width: 58px;
  height: 24px;
  padding: 2px 4px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  font-size: 12px;
  box-sizing: border-box;
}

.hours-cal-btn {
  background: #ffffff;
  border: 1px solid #7f9db9;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  border-radius: 1px;
  position: relative;
}

.hours-cal-btn:hover {
  background: #eef4fc;
}

/* Mini Calendar Icon matching image */
.mini-cal-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.native-hidden-date {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  cursor: pointer;
}

/* Button Row */
.hours-btn-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hours-calc-btn {
  background: #447d28;
  border: 1px solid #33611e;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.hours-calc-btn:hover {
  background: #3a6b22;
}

.hours-calc-btn .play-icon {
  font-size: 10px;
}

.hours-clear-btn {
  background: #8e98a3;
  border: 1px solid #79828c;
  color: #ffffff;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.hours-clear-btn:hover {
  background: #7a838d;
}

/* Result Box */
.hours-result-card {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px solid #ccd8e8;
  border-left: 4px solid #447d28;
  border-radius: 3px;
  padding: 14px 16px;
  max-width: 580px;
}

.hours-result-title {
  font-size: 15px;
  font-weight: bold;
  color: #003366;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hours-result-highlight {
  font-size: 22px;
  font-weight: bold;
  color: #336600;
  margin-bottom: 8px;
}

.hours-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px 14px;
  margin: 12px 0;
  font-size: 13px;
}

.hours-res-item {
  background: #ffffff;
  border: 1px solid #e1e8f0;
  border-radius: 2px;
  padding: 6px 10px;
}

.hours-res-item .item-lbl {
  font-size: 11px;
  color: #555555;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.hours-res-item .item-val {
  font-size: 14px;
  font-weight: bold;
  color: #0b386b;
}

.hours-result-notes {
  font-size: 12px;
  color: #555555;
  line-height: 1.5;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d5dee8;
}

/* Visualization Charts */
.hours-chart-container {
  margin-top: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
}

.hours-chart-heading {
  font-size: 12px;
  font-weight: bold;
  color: #003366;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hours-charts-flex {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* Right Sidebar (Exact Image 2 Match) */
.hours-search-form {
  position: relative;
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.hours-search-input {
  flex: 1;
  height: 26px;
  padding: 2px 6px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  font-size: 13px;
  box-sizing: border-box;
}

.hours-search-input:focus {
  outline: 1px solid #0844a4;
}

.hours-search-btn {
  background: #185a9d;
  border: 1px solid #0f4375;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 2px 12px;
  border-radius: 1px;
  cursor: pointer;
  height: 26px;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.hours-search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 2px;
}

.hours-search-dropdown.active {
  display: block;
}

.hours-search-item {
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color: #0f172a;
  text-decoration: none;
  transition: background 0.12s ease;
}

.hours-search-item:last-child {
  border-bottom: none;
}

.hours-search-item:hover,
.hours-search-item.highlighted {
  background: #eef4fb;
  color: #0b386b;
}

.hours-search-item-cat {
  font-size: 11px;
  color: #64748b;
  margin-left: 8px;
  white-space: nowrap;
}

.hours-search-btn:hover {
  background: #114477;
}

/* Other Calculators Box (Exact Image 2 Match) */
.hours-side-card {
  border: 1px solid #2c5f88;
  border-radius: 1px;
  overflow: hidden;
  background: #ffffff;
}

.hours-side-card-header {
  background: #2c5f88;
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  padding: 5px 10px;
}

.hours-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  row-gap: 6px;
  column-gap: 10px;
  font-size: 13px;
}

.hours-side-card-grid a {
  color: #0844a4;
  text-decoration: underline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hours-side-card-grid a:hover {
  color: #001f5c;
}

.hours-side-card-grid a.active {
  font-weight: bold;
  color: #000000;
  text-decoration: none;
}

.hours-side-card-footer {
  border-top: 1px solid #dcdcdc;
  padding: 6px 10px;
  font-size: 12px;
  background: #f7f9fb;
  color: #555555;
  text-align: center;
}

.hours-side-card-footer a {
  color: #0844a4;
  text-decoration: underline;
  margin: 0 3px;
}

.hours-side-card-footer a:hover {
  color: #001f5c;
}

/* History Modal / Drawer */
.hours-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hours-modal-overlay.active {
  display: flex;
}

.hours-modal-dialog {
  background: #ffffff;
  border: 1px solid #7f9db9;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.hours-modal-header {
  background: #003366;
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hours-modal-title {
  font-size: 15px;
  font-weight: bold;
  margin: 0;
}

.hours-modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.hours-modal-body {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
  font-size: 13px;
}

.hours-modal-footer {
  padding: 10px 14px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #f8fafc;
}

/* History List */
.hours-history-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hours-history-item:last-child {
  border-bottom: none;
}

/* SEO Educational Content Styling */
.hours-content-section {
  margin-top: 36px;
  border-top: 1px solid #d5dee8;
  padding-top: 24px;
}

.hours-content-section h2 {
  font-size: 20px;
  font-weight: bold;
  color: #0b386b;
  margin: 20px 0 10px 0;
}

.hours-content-section h3 {
  font-size: 16px;
  font-weight: bold;
  color: #003366;
  margin: 16px 0 8px 0;
}

.hours-content-section p {
  font-size: 13.5px;
  line-height: 1.65;
  color: #333333;
  margin-bottom: 14px;
}

.hours-content-section ul, .hours-content-section ol {
  font-size: 13.5px;
  line-height: 1.6;
  color: #333333;
  margin: 0 0 14px 20px;
  padding: 0;
}

.hours-content-section li {
  margin-bottom: 6px;
}

/* Conversion Table */
.hours-table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px 0;
}

.hours-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hours-data-table th {
  background: #2c5f88;
  color: #ffffff;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid #1c4b72;
}

.hours-data-table td {
  padding: 6px 10px;
  border: 1px solid #d9e2ec;
}

.hours-data-table tr:nth-child(even) {
  background-color: #f7f9fb;
}

.hours-data-table tr:hover {
  background-color: #edf2f7;
}

/* FAQ Accordion / Box */
.hours-faq-box {
  margin: 16px 0;
  border: 1px solid #ccd8e8;
  border-radius: 3px;
  overflow: hidden;
}

.hours-faq-item {
  border-bottom: 1px solid #e1e8f0;
}

.hours-faq-item:last-child {
  border-bottom: none;
}

.hours-faq-question {
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: bold;
  color: #003366;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
}

.hours-faq-question:hover {
  background: #eef4fb;
}

.hours-faq-answer {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #333333;
  background: #ffffff;
}

/* Responsive */
@media (max-width: 860px) {
  .hours-main-layout {
    flex-direction: column;
  }
  .hours-sidebar-col {
    width: 100%;
  }
  .hours-card-box {
    max-width: 100%;
  }
}

/* ==========================================================================
   PRINT MEDIA & MODAL PRINTING STYLES
   ========================================================================== */
@media print {
  /* Hide all non-printable UI components */
  .site-header,
  .site-footer,
  .hours-top-actions,
  .hours-sidebar-col,
  .hours-search-form,
  .hours-search-dropdown,
  .hours-side-card,
  .hours-btn,
  .hours-calc-btn,
  .hours-clear-btn,
  .hours-now-link,
  .hours-swap-btn,
  .hours-tabs,
  .hours-faq-section,
  .hours-content-section,
  .hours-modal-close,
  .hours-modal-footer,
  .no-print {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11pt !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* When printing from the modal report */
  body.hours-printing-modal .hours-modal-overlay#hours-print-modal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    inset: auto !important;
  }

  body.hours-printing-modal .hours-modal-dialog {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    max-height: none !important;
    width: 100% !important;
    padding: 0 !important;
  }

  body.hours-printing-modal .hours-modal-header {
    display: none !important;
  }

  body.hours-printing-modal .hours-modal-body {
    padding: 0 !important;
    overflow: visible !important;
  }

  body.hours-printing-modal .hours-main-layout,
  body.hours-printing-modal .hours-intro-desc,
  body.hours-printing-modal .hours-title {
    display: none !important;
  }

  /* When printing whole page directly (Ctrl+P outside modal) */
  body:not(.hours-printing-modal) .hours-modal-overlay {
    display: none !important;
  }

  body:not(.hours-printing-modal) .hours-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body:not(.hours-printing-modal) .hours-main-layout {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }

  body:not(.hours-printing-modal) .hours-content-col {
    max-width: 100% !important;
    width: 100% !important;
  }

  body:not(.hours-printing-modal) .hours-card-box {
    border: 1px solid #777 !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    margin-bottom: 16px !important;
  }

  body:not(.hours-printing-modal) .hours-result-card {
    border: 1px solid #777 !important;
    background: #ffffff !important;
    page-break-inside: avoid !important;
  }

  .hours-print-sheet {
    display: block !important;
    width: 100% !important;
    font-family: Arial, Helvetica, sans-serif !important;
    color: #000000 !important;
    line-height: 1.4 !important;
  }

  .hours-print-sheet table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .hours-print-sheet th,
  .hours-print-sheet td {
    border: 1px solid #444444 !important;
    padding: 5pt 7pt !important;
  }
}
