/* ==========================================================================
   AGE CALCULATOR - STYLES
   Pixel-accurate matching to Calculator Archive, reference images & classic layout
   ========================================================================== */

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

/* Breadcrumbs */
.age-breadcrumbs {
  font-size: 13px;
  color: #555555;
  margin-bottom: 12px;
}

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

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

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

.age-breadcrumbs .current {
  color: #333333;
  font-weight: normal;
}

/* Page Title & Intro */
.age-title {
  font-size: 26px;
  font-weight: bold;
  color: #0844a4;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.age-description {
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 18px;
}

/* Main Layout: Left Content & Right Sidebar */
.age-main-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

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

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

@media (max-width: 860px) {
  .age-main-layout {
    flex-direction: column;
  }
  .age-sidebar-col {
    width: 100%;
  }
}

/* Calculator Form Card */
.age-card {
  border: 1px solid #2b5a88;
  border-radius: 4px;
  overflow: hidden;
  background-color: #ffffff;
  margin-bottom: 24px;
}

.age-card-header {
  background-color: #2b5a88;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.age-header-icon {
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.age-header-icon svg {
  width: 10px;
  height: 10px;
  fill: #2b5a88;
}

.age-card-body {
  padding: 16px 20px;
  background-color: #f7f9fc;
  border-bottom: 1px solid #dbe2ea;
}

/* Form Table Layout */
.age-form-table {
  width: 100%;
  border-collapse: collapse;
}

.age-form-table td {
  padding: 8px 6px;
  vertical-align: middle;
}

.age-form-table td.label-col {
  width: 150px;
  text-align: right;
  font-size: 13px;
  font-weight: bold;
  color: #333333;
  padding-right: 12px;
}

.age-date-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.age-select {
  height: 28px;
  padding: 2px 6px;
  font-size: 13px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background-color: #ffffff;
  color: #222222;
  outline: none;
}

.age-select:focus {
  border-color: #0844a4;
  box-shadow: 0 0 3px rgba(8, 68, 164, 0.4);
}

.age-year-input {
  width: 68px;
  height: 28px;
  padding: 2px 6px;
  font-size: 13px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background-color: #ffffff;
  color: #222222;
  text-align: center;
  outline: none;
}

.age-year-input:focus {
  border-color: #0844a4;
  box-shadow: 0 0 3px rgba(8, 68, 164, 0.4);
}

/* Pixel-perfect classic Calendar Icon button matching image */
.age-cal-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: background-color 0.15s;
}

.age-cal-btn:hover {
  background-color: #eaf1f8;
}

.age-cal-btn-icon {
  width: 20px;
  height: 20px;
}

/* Hidden native datepicker invoked by calendar button */
.age-native-date {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Button Row */
.age-btn-row {
  margin-top: 14px;
  padding-left: 156px;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 600px) {
  .age-form-table td.label-col {
    width: 100%;
    text-align: left;
    display: block;
    padding-bottom: 2px;
  }
  .age-form-table td {
    display: block;
    padding: 4px 0;
  }
  .age-btn-row {
    padding-left: 0;
  }
}

.age-calc-btn {
  background: linear-gradient(to bottom, #4a943e 0%, #2f7a24 100%);
  border: 1px solid #23611a;
  border-radius: 4px;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: filter 0.15s;
}

.age-calc-btn:hover {
  filter: brightness(1.08);
}

.age-calc-btn:active {
  transform: translateY(1px);
}

.age-btn-triangle {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  text-align: center;
  line-height: 16px;
  font-size: 9px;
}

.age-secondary-btn {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #334155;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
}

.age-secondary-btn:hover {
  background-color: #e2e8f0;
}

/* RESULTS SECTION */
.age-results-container {
  margin-top: 20px;
}

/* Primary Result Callout matching Image 1 */
.age-primary-result-box {
  background-color: #edf7ed;
  border: 1px solid #c8e6c9;
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.age-result-years-text {
  font-size: 19px;
  font-weight: bold;
  color: #1b5e20;
  margin-bottom: 4px;
}

.age-result-days-text {
  font-size: 14px;
  color: #2e7d32;
  font-weight: 500;
}

/* Detailed Intervals Table / Cards */
.age-intervals-card {
  background-color: #ffffff;
  border: 1px solid #d0dbe5;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 20px;
}

.age-intervals-title {
  font-size: 14px;
  font-weight: bold;
  color: #0844a4;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.age-intervals-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: #333333;
}

.age-intervals-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.age-intervals-list li strong {
  color: #0844a4;
  font-weight: bold;
}

/* Life Milestones & Timeline Bar (Charts/Graphs requirement) */
.age-timeline-card {
  background-color: #ffffff;
  border: 1px solid #d0dbe5;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 20px;
}

.age-timeline-title {
  font-size: 14px;
  font-weight: bold;
  color: #0844a4;
  margin-bottom: 12px;
}

.age-progress-bar-wrap {
  width: 100%;
  height: 22px;
  background-color: #e2e8f0;
  border-radius: 11px;
  overflow: hidden;
  position: relative;
  margin: 12px 0 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.age-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50 0%, #0844a4 100%);
  border-radius: 11px;
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
}

.age-milestones-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* Widgets Grid: Birthday Countdown & Zodiac / Astrology */
.age-widgets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .age-widgets-grid {
    grid-template-columns: 1fr;
  }
}

.age-widget-box {
  background-color: #ffffff;
  border: 1px solid #d0dbe5;
  border-radius: 4px;
  padding: 14px;
}

.age-widget-header {
  font-size: 13px;
  font-weight: bold;
  color: #0844a4;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.age-countdown-display {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.age-countdown-item {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  text-align: center;
  padding: 6px 2px;
}

.age-countdown-num {
  font-size: 18px;
  font-weight: bold;
  color: #0844a4;
  line-height: 1.1;
}

.age-countdown-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #64748b;
}

.age-widget-note {
  font-size: 12px;
  color: #475569;
  margin-top: 6px;
}

/* Zodiac & Planetary Info */
.age-zodiac-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.age-zodiac-icon {
  font-size: 28px;
}

.age-zodiac-info {
  font-size: 12px;
  color: #333333;
}

.age-planets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}

.age-planets-table th,
.age-planets-table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.age-planets-table th {
  color: #64748b;
  font-weight: 600;
}

/* Action Toolbar (Print, Save, Share) */
.age-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.age-action-btn {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #0844a4;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.age-action-btn:hover {
  background-color: #f8fafc;
  border-color: #0844a4;
}

.age-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Calculation History Panel */
.age-history-panel {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 24px;
  display: none; /* toggled via JS */
}

.age-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: bold;
  color: #0844a4;
}

.age-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
}

.age-history-item {
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.age-history-restore-btn {
  color: #0844a4;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
}

/* Sidebar Styling matching image */
.age-sidebar-search {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.age-sidebar-search-wrap {
  position: relative;
  flex: 1;
}

.age-sidebar-search-input {
  width: 100%;
  height: 28px;
  padding: 3px 8px;
  border: 1px solid #7f9db9;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.age-sidebar-search-btn {
  height: 28px;
  padding: 0 12px;
  background-color: #2b5a88;
  color: #ffffff;
  border: 1px solid #1a3c5e;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.age-sidebar-search-btn:hover {
  background-color: #1e4266;
}

/* Sidebar Other Calculators Box matching image */
.age-side-card {
  border: 1px solid #2b5a88;
  background-color: #ffffff;
}

.age-side-card-title {
  background-color: #2b5a88;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 5px 8px;
}

.age-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  gap: 3px 12px;
  font-size: 11.5px;
  background-color: #ffffff;
}

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

.age-side-card-grid a:hover {
  color: #002277;
}

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

.age-side-card-footer {
  background-color: #eef2f6;
  border-top: 1px solid #d0dbe5;
  padding: 6px 8px;
  font-size: 11px;
  color: #555555;
  text-align: center;
}

.age-side-card-footer a {
  color: #0844a4;
  text-decoration: none;
  margin: 0 2px;
}

.age-side-card-footer a:hover {
  text-decoration: underline;
}

.age-side-card-footer a.active-cat {
  color: #000000;
  font-weight: bold;
  text-decoration: none;
}

/* Rich SEO, AEO & GEO Content Sections */
.age-content-section {
  margin-top: 32px;
  line-height: 1.65;
  color: #222222;
  font-size: 13.5px;
}

.age-content-section h2 {
  font-size: 20px;
  font-weight: bold;
  color: #0844a4;
  margin: 28px 0 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

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

.age-content-section p {
  margin-bottom: 14px;
}

.age-content-section ul,
.age-content-section ol {
  margin: 0 0 16px 24px;
  padding: 0;
}

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

/* FAQ Accordion */
.age-faq-accordion {
  margin-top: 20px;
}

.age-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 10px;
  background: #ffffff;
  overflow: hidden;
}

.age-faq-question {
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;
  color: #0844a4;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.age-faq-question:hover {
  background: #f1f5f9;
}

.age-faq-answer {
  padding: 12px 16px;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  border-top: 1px solid #e2e8f0;
  display: none;
}

.age-faq-item.open .age-faq-answer {
  display: block;
}

.age-faq-item.open .age-faq-icon {
  transform: rotate(180deg);
}

.age-faq-icon {
  transition: transform 0.2s;
}

/* Modal System (Print, Share, History) */
.age-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}

.age-modal-content {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

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

.age-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: bold;
  color: #ffffff;
}

.age-modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.age-modal-close:hover {
  opacity: 0.8;
}

.age-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
}

.age-modal-footer {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Printable Sheet within Modal */
.age-print-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 20px;
  font-family: Arial, sans-serif;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.5;
}

.age-print-header {
  border-bottom: 2px solid #003366;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.age-print-brand {
  font-size: 18px;
  font-weight: bold;
  color: #003366;
  margin: 0 0 2px;
}

.age-print-meta {
  font-size: 11px;
  color: #64748b;
}

.age-print-banner {
  background: #edf7ed;
  border: 1px solid #c8e6c9;
  border-radius: 4px;
  padding: 12px;
  margin: 12px 0;
}

.age-print-primary-age {
  font-size: 18px;
  font-weight: bold;
  color: #1b5e20;
}

.age-print-sub-age {
  font-size: 13px;
  color: #2e7d32;
  margin-top: 2px;
}

.age-print-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12px;
}

.age-print-table th,
.age-print-table td {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  text-align: left;
}

.age-print-table th {
  background: #f1f5f9;
  font-weight: bold;
  color: #334155;
}

.age-share-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #1e293b;
}

/* Toast Notifications */
.age-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 100000;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .site-header,
  .age-sidebar-col,
  .age-breadcrumbs,
  .age-actions-toolbar,
  .age-btn-row,
  .site-footer,
  .age-history-panel,
  .age-modal-backdrop,
  .age-toast {
    display: none !important;
  }
  .age-page-container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .age-main-layout {
    display: block !important;
  }
  .age-calc-col {
    width: 100% !important;
  }
  .age-card {
    border: none !important;
  }
  .age-primary-result-box {
    border: 2px solid #1b5e20 !important;
  }
}
