/* =======================================
   calendar-print.css - Print functionality for calendar page
   ======================================= */

/* Print button - hidden in print */
.print-toolbar {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
}

.print-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.print-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Mobile adjustments for print button */
@media (max-width: 768px) {
  .print-toolbar {
    position: static;
    margin: 10px auto 20px;
    text-align: center;
    width: fit-content;
  }
}

/* =======================================
   PRINT STYLES - Override desktop calendar layout
   ======================================= */
@media print {
  /* Hide elements that shouldn't print */
  .print-toolbar {
    display: none !important;
  }
  
  .topnav {
    display: none !important;
  }
  
  .strip::after {
    display: none !important;
  }
  
  /* Page setup */
  @page {
    size: 8.5in 11in;
    margin: 0.75in;
  }
  
  /* Page numbering */
  @page {
    @bottom-center {
      content: "Kalendārs - Lapa " counter(page);
      font-size: 12px;
      color: #666;
    }
  }
  
  /* Body adjustments */
  body {
    font-size: 14px;
    line-height: 1.6;
    background: white !important;
  }
  
  body::before {
    display: none; /* Remove background texture */
  }
  
  /* Header adjustments */
  .strip {
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  
  .brand-logo {
    height: 60px; /* Smaller for print */
    filter: none; /* Remove drop shadow */
  }
  
  /* Calendar title */
  .kalendars h2 {
    font-size: 22px;
    text-align: center;
    margin: 20px 0;
    color: #000;
  }
  
  /* OVERRIDE: Reset desktop calendar layout for print */
  .kal-long {
    margin: 0;
    padding: 0;
  }
  
  .kal-long li {
    /* Reset all desktop positioning */
    position: static !important;
    display: block !important;
    background: #f8f9fa !important;
    border: 2px solid #ddd !important;
    border-left: 6px solid #1e6a67 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 16px !important;
    margin: 0 0 20px 0 !important;
    page-break-inside: avoid;
    
    /* Remove hover effects */
    transform: none !important;
  }
  
  .kal-long li:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  
  /* OVERRIDE: Reset date styling */
  .kal-date {
    /* Remove absolute positioning */
    position: static !important;
    width: auto !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 0 12px 0 !important;
    text-align: left !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #000 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  
  /* OVERRIDE: Reset entry styling */
  .kal-entry {
    /* Remove grid layout */
    display: block !important;
    grid-template-columns: none !important;
    column-gap: 0 !important;
    margin: 8px 0 !important;
    padding-left: 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #000 !important;
  }
  
  .kal-entry .time {
    /* Make time inline with content */
    display: inline !important;
    text-align: left !important;
    font-weight: bold !important;
    color: #333 !important;
    white-space: nowrap !important;
    margin-right: 12px !important;
    font-size: 14px !important;
    
    /* Add visual separator */
    border-right: 2px solid #666;
    padding-right: 12px;
  }
  
  /* Notes section */
  .kal-notes {
    margin-top: 30px !important;
    padding: 16px !important;
    background: #f0f0f0 !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    page-break-inside: avoid;
  }
  
  .kal-notes li {
    margin: 8px 0 !important;
    color: #333 !important;
  }
  
  /* Month headings in print */
  #kal-months h3 {
    font-size: 20px !important;
    color: #000 !important;
    margin: 30px 0 15px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #333 !important;
    page-break-after: avoid;
  }
  
  /* Ensure good contrast for all text */
  * {
    color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
}