/* Due Date Calculator - Accurate Clinical EDD, Trimester & Milestones Stylesheet */

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

/* TOP BAR: BREADCRUMBS & TOP ACTIONS */
.duedate-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.duedate-breadcrumbs {
  font-size: 13px;
  color: #57606a;
}
.duedate-breadcrumbs a {
  color: #0844a4;
  text-decoration: none;
}
.duedate-breadcrumbs a:hover {
  text-decoration: underline;
}
.duedate-breadcrumbs .sep {
  margin: 0 5px;
  color: #8c959f;
}
.duedate-breadcrumbs .current {
  color: #24292f;
  font-weight: 500;
}
.duedate-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.duedate-saved-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f4f6f8;
  border: 1px solid #b5c7d8;
  border-radius: 3px;
  color: #0844a4;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.duedate-saved-btn:hover {
  background: #e8eef5;
  border-color: #0844a4;
}
.duedate-saved-btn svg {
  flex-shrink: 0;
}
.duedate-print-link {
  color: #0844a4;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.duedate-print-link:hover {
  text-decoration: underline;
}

/* TITLE & INTRO */
.duedate-title {
  font-size: 28px;
  font-weight: 700;
  color: #0844a4;
  margin: 0 0 10px 0;
  letter-spacing: -0.3px;
}
.duedate-intro {
  font-size: 14px;
  line-height: 1.55;
  color: #333333;
  margin-bottom: 22px;
  max-width: 820px;
}

/* LAYOUT GRID */
.duedate-main-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.duedate-content-col {
  flex: 1;
  min-width: 0;
}
.duedate-sidebar-col {
  width: 290px;
  flex-shrink: 0;
}

/* CALCULATOR BOX - CLONE STYLING */
.duedate-calc-box {
  background: #f2f2f2;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.duedate-form-group {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.duedate-form-label {
  width: 220px;
  font-size: 14px;
  font-weight: 600;
  color: #24292f;
  flex-shrink: 0;
}
.duedate-form-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* INPUTS & SELECTS */
.duedate-select,
.duedate-input {
  height: 30px;
  padding: 2px 8px;
  font-size: 14px;
  border: 1px solid #abadb3;
  border-radius: 2px;
  background-color: #fff;
  color: #111;
  outline: none;
}
.duedate-select:focus,
.duedate-input:focus {
  border-color: #0844a4;
  box-shadow: 0 0 3px rgba(8, 68, 164, 0.4);
}
.duedate-select-method {
  min-width: 170px;
  height: 30px;
}
.duedate-select-month {
  width: 72px;
}
.duedate-select-day {
  width: 58px;
}
.duedate-input-year {
  width: 68px;
  text-align: center;
}
.duedate-select-cycle {
  min-width: 120px;
}
.duedate-date-picker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #abadb3;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  color: #b91c1c;
  margin-left: 2px;
  vertical-align: middle;
}
.duedate-date-picker-icon:hover {
  background: #f1f5f9;
}

/* BUTTONS */
.duedate-btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  margin-left: 220px;
}
.duedate-btn-calculate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #2e7d32;
  color: #ffffff;
  border: 1px solid #1e5a22;
  border-radius: 3px;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.duedate-btn-calculate:hover {
  background: #256628;
}
.duedate-btn-calculate .play-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #ffffff;
  margin-left: 1px;
}
.duedate-btn-clear {
  background: #f6f8fa;
  color: #333333;
  border: 1px solid #d0d7de;
  border-radius: 3px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.duedate-btn-clear:hover {
  background: #eaeef2;
}

/* RELATED SECTION */
.duedate-related-section {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 10px;
}
.duedate-related-tab {
  background: #555555;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: 0.2px;
}
.duedate-related-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.duedate-related-btn {
  color: #0844a4;
  font-size: 13px;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #dbe2ea;
  padding: 4px 10px;
  border-radius: 2px;
  transition: all 0.15s ease;
}
.duedate-related-btn:hover {
  background: #edf3fa;
  border-color: #0844a4;
  text-decoration: underline;
}

/* RESULTS CARD */
.duedate-result-card {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.duedate-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e1e4e8;
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.duedate-result-title {
  font-size: 20px;
  font-weight: 700;
  color: #0844a4;
  margin: 0;
}
.duedate-result-actions {
  display: flex;
  gap: 8px;
}
.duedate-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #0844a4;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
}
.duedate-action-btn:hover {
  background: #eef2f6;
}

/* PRIMARY HIGHLIGHT BOX */
.duedate-hero-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.duedate-hero-main {
  flex: 1;
}
.duedate-hero-label {
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.duedate-hero-value {
  font-size: 26px;
  font-weight: 800;
  color: #14532d;
}
.duedate-hero-sub {
  font-size: 13px;
  color: #374151;
  margin-top: 4px;
}

/* KEY METRICS GRID */
.duedate-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.duedate-metric-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px 14px;
}
.duedate-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}
.duedate-metric-val {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}
.duedate-metric-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* PROGRESS & TRIMESTER BAR */
.duedate-progress-section {
  background: #fbfcfe;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 24px;
}
.duedate-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}
.duedate-progress-track {
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
}
.duedate-progress-bar {
  height: 100%;
  background: #2e7d32;
  transition: width 0.4s ease;
  position: relative;
}
.duedate-trimester-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* TERM PROBABILITY BOXES */
.duedate-probability-card {
  margin-bottom: 24px;
}
.duedate-sub-heading {
  font-size: 16px;
  font-weight: 700;
  color: #0844a4;
  margin: 0 0 10px 0;
}
.duedate-term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.duedate-term-item {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px;
  text-align: center;
  background: #ffffff;
}
.duedate-term-item.full-term {
  border-color: #86efac;
  background: #f0fdf4;
}
.duedate-term-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 4px;
}
.duedate-term-item.full-term .duedate-term-name {
  color: #166534;
}
.duedate-term-dates {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}
.duedate-term-weeks {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* MILESTONE TABLE */
.duedate-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}
.duedate-milestone-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.duedate-milestone-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
}
.duedate-milestone-table td {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.duedate-milestone-table tr:nth-child(even) {
  background: #f8fafc;
}
.duedate-milestone-table tr.highlight-due {
  background: #e8f5e9;
  font-weight: 600;
}
.duedate-milestone-table tr.highlight-due td {
  border-color: #a7f3d0;
  color: #14532d;
}

/* SIDEBAR - CLONE STYLING */
.duedate-side-search-form {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}
.duedate-side-search-wrap {
  position: relative;
  flex: 1;
}
.duedate-side-search-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #abadb3;
  border-radius: 2px;
  box-sizing: border-box;
}
.duedate-side-search-btn {
  background: #2b5a88;
  color: #fff;
  border: 1px solid #1e4265;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  height: 32px;
}
.duedate-side-search-btn:hover {
  background: #1e4265;
}

.duedate-sidebar-card {
  border: 1px solid #b5c7d8;
  border-radius: 3px;
  margin-bottom: 20px;
  background: #fff;
  overflow: hidden;
}
.duedate-sidebar-card-header {
  background: #2b5a88;
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}
.duedate-sidebar-card-body {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 12px;
  line-height: 1.6;
}
.duedate-sidebar-card-body a {
  color: #0844a4;
  text-decoration: none;
  display: block;
}
.duedate-sidebar-card-body a:hover {
  text-decoration: underline;
}
.duedate-sidebar-card-body a.active {
  font-weight: 700;
  color: #111111;
}
.duedate-sidebar-card-footer {
  background: #eef3f8;
  border-top: 1px solid #d4e0ec;
  padding: 6px 10px;
  font-size: 11px;
  color: #4a5568;
}
.duedate-sidebar-card-footer a {
  color: #0844a4;
  text-decoration: none;
}
.duedate-sidebar-card-footer a:hover {
  text-decoration: underline;
}

/* SEO / AEO / GEO CONTENT SECTION */
.duedate-seo-section {
  margin-top: 32px;
  border-top: 1px solid #e1e4e8;
  padding-top: 24px;
  font-size: 14px;
  line-height: 1.7;
  color: #333333;
}
.duedate-seo-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0844a4;
  margin: 22px 0 10px;
}
.duedate-seo-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 18px 0 8px;
}
.duedate-seo-section p {
  margin-bottom: 14px;
}
.duedate-seo-section ul,
.duedate-seo-section ol {
  margin-left: 20px;
  margin-bottom: 16px;
}
.duedate-seo-section li {
  margin-bottom: 6px;
}

/* AEO CALLOUT CARD */
.aeo-direct-card {
  background: #f0f7ff;
  border-left: 4px solid #0844a4;
  padding: 16px 20px;
  border-radius: 0 4px 4px 0;
  margin: 20px 0;
}
.aeo-direct-card .aeo-q {
  font-weight: 700;
  color: #0844a4;
  font-size: 15px;
  margin-bottom: 6px;
}
.aeo-direct-card .aeo-a {
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.6;
}

/* FORMULA BOX */
.formula-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 14px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #0f172a;
  margin: 16px 0;
  line-height: 1.5;
}

/* MODALS */
.duedate-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.duedate-modal-backdrop.active {
  display: flex;
}
.duedate-modal-dialog {
  background: #ffffff;
  border-radius: 6px;
  max-width: 650px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  padding: 24px;
  position: relative;
}
.duedate-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
}
.duedate-modal-close:hover {
  color: #0f172a;
}
.duedate-saved-item {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

/* AUTOCOMPLETE DROPDOWN */
.duedate-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #abadb3;
  border-top: none;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}
.duedate-search-dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  color: #24292f;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.duedate-search-dropdown-item:hover {
  background: #f0f7ff;
  color: #0844a4;
}

/* RESPONSIVE DESIGN */
@media (max-width: 860px) {
  .duedate-main-layout {
    flex-direction: column;
  }
  .duedate-sidebar-col {
    width: 100%;
  }
  .duedate-form-label {
    width: 100%;
    margin-bottom: 6px;
  }
  .duedate-btn-row {
    margin-left: 0;
  }
}

/* PRINT MEDIA QUERY */
@media print {
  header, footer, .duedate-top-bar, .duedate-calc-box, .duedate-related-section, .duedate-sidebar-col, .duedate-seo-section, .duedate-result-actions {
    display: none !important;
  }
  .duedate-page-container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .duedate-result-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .duedate-hero-box {
    border: 1px solid #333 !important;
    background: #fff !important;
  }
}
