/* PDF-specific styles for WeasyPrint */

@page {
    size: A4;
    margin: 1in;
    @bottom-center {
        content: "Made with love by Kumara Creations • Copyright © 2025 Kumara Creations • Page " counter(page);
        font-size: 9pt;
        color: #666;
        font-family: 'Times New Roman', Times, serif;
    }
}

body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header Section */
.novena-header {
    text-align: center;
    margin-bottom: 30px;
    page-break-inside: avoid;
}

.header-decoration {
    margin-bottom: 20px;
}

.cross-symbol {
    font-size: 48pt;
    color: #8B4513;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.novena-title {
    font-size: 32pt;
    font-weight: bold;
    color: #2c3e50;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.dedication-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #d4af37;
}

.dedication {
    font-size: 24pt;
    font-weight: bold;
    color: #663399;
    margin: 0 0 10px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.purpose {
    font-size: 16pt;
    font-style: italic;
    color: #555;
    margin: 0;
}

.date-info {
    margin: 20px 0;
    font-size: 14pt;
    color: #666;
}

.date-info p {
    margin: 5px 0;
}

/* Scripture Quote Section */
.scripture-quote {
    margin: 20px 0;
    text-align: center;
}

.scripture-quote .blessing {
    font-size: 11pt;
    font-style: italic;
    color: #663399;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    border-left: 4px solid #d4af37;
}

/* Prayer Section */
.prayer-section {
    margin: 30px 0;
    page-break-inside: avoid;
}

.prayer-title {
    font-size: 20pt;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    border-left: 5px solid #d4af37;
    padding-left: 15px;
}

.prayer-text {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    font-size: 11pt;
    line-height: 1.8;
    color: #333;
    text-align: justify;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Practice Section */
.practice-section {
    margin: 30px 0;
    page-break-inside: avoid;
}

.practice-title {
    font-size: 20pt;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    border-left: 5px solid #d4af37;
    padding-left: 15px;
}

.practice-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    font-size: 11pt;
    line-height: 1.6;
    color: #333;
}

.practice-info p {
    margin: 8px 0;
}

.practice-info strong {
    color: #2c3e50;
}

/* Enhanced Progress Bar */
.progress-bar-container {
    margin: 20px 0 30px 0;
    position: relative;
}

.progress-bar-track {
    height: 12px;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    position: relative;
    border: 2px solid #dee2e6;
    overflow: visible;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4169e1, #663399, #d4af37);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.milestone-markers {
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 40px;
}

.milestone-marker {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.milestone-icon {
    font-size: 16pt;
    color: #d4af37;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 2px;
    animation: sparkle 2s infinite;
}

.milestone-label {
    font-size: 8pt;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}

/* Spiritual Decorations */
.spiritual-decoration {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.decoration-element {
    font-size: 12pt;
    color: #d4af37;
    text-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
    animation: gentle-glow 3s ease-in-out infinite;
}

.start-rays {
    color: #4169e1;
    font-size: 14pt;
}

.milestone-star {
    color: #663399;
    font-size: 16pt;
}

.completion-crown {
    color: #d4af37;
    font-size: 18pt;
}

.light-ray {
    color: #87ceeb;
    font-size: 10pt;
}

/* Spiritual Journey Section */
.spiritual-journey-section {
    margin: 30px 0;
    padding: 25px 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 3px solid #d4af37;
    page-break-inside: avoid;
}

.spiritual-text {
    font-size: 11pt;
    line-height: 1.6;
    color: #2c3e50;
    text-align: justify;
    font-family: 'Times New Roman', serif;
}

.spiritual-text p {
    margin-bottom: 15px;
    text-indent: 0;
}

.spiritual-text p:last-child {
    margin-bottom: 0;
}

/* Enhanced Day Items */
.milestone-day {
    position: relative;
}

.milestone-circle {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    border: 3px solid #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: scale(1.1);
}

.milestone-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3), transparent);
    animation: pulse-glow 2s infinite;
}

.milestone-message {
    font-size: 8pt;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Day Circle */
.day-circle {
    position: relative;
    overflow: visible;
}

/* Animations */
@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

@keyframes gentle-glow {
    0%, 100% { opacity: 0.7; transform: translateY(0px); }
    50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

/* Commitment & Practice Combined Section */
.commitment-practice-section {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    page-break-inside: avoid;
}

.section-title {
    font-size: 18pt;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #d4af37;
    padding-bottom: 10px;
}

.subsection-title {
    font-size: 14pt;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.commitment-content {
    margin-bottom: 20px;
}

.practice-content {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.request-content {
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.dedication-label,
.purpose-label {
    font-size: 12pt;
    font-weight: bold;
    color: #2c3e50;
    margin: 15px 0 8px 0;
    text-align: left;
}

.dedication-label {
    margin-top: 0;
}

.commitment-description {
    font-size: 10pt;
    font-style: italic;
    color: #666;
    margin: 5px 0 10px 0;
}

.bookmark-section {
    margin-bottom: 12px;
}

.bookmark-section strong {
    color: #2c3e50;
    font-size: 14pt;
}

.bookmark-label {
    font-size: 11pt;
    font-style: italic;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.bookmark-text {
    font-size: 11pt;
    line-height: 1.6;
    color: #333;
    height: auto;
    overflow: visible;
}

.bookmark-dates-list {
    line-height: 1.5;
}

/* Scripture Section for Lower Placement */
.scripture-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
    border-radius: 10px;
    text-align: center;
}

/* Bookmark Page */
.bookmark-page {
    padding: 40px 20px;
    text-align: center;
    page-break-inside: avoid;
}

.bookmark-title {
    font-size: 24pt;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
}

.bookmark-container {
    display: flex;
    justify-content: center;
}

.bookmark-wrapper {
    display: inline-block;
    text-align: center;
}

.bookmark {
    width: 300px;  /* 50% wider than 200px */
    min-height: 400px; /* Minimum size */
    max-height: 800px; /* Maximum size */
    height: auto; /* Dynamic height based on content */
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 15px 15px 20px 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
}

.bookmark-header {
    text-align: center;
    border-bottom: 2px solid #d4af37;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.bookmark-header h4 {
    font-size: 18pt;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.bookmark-dates {
    font-size: 14pt;
    color: #663399;
    font-weight: bold;
}

.bookmark-content {
    font-size: 12pt;
    line-height: 1.6;
    color: #333;
}

.bookmark-dates-list,
.bookmark-practice {
    margin-bottom: 15px;
    font-size: 12pt;
}

.bookmark-practice strong {
    display: inline;
}

.bookmark-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #d4af37;
    text-align: center;
    color: #666;
    font-size: 11pt;
}

/* Page Breaks */
.page-break {
    page-break-before: always;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Extended Timeline Section */
.extended-timeline-section {
    margin: 30px 0;
}

.timeline-title {
    font-size: 20pt;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.week-container {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
    page-break-inside: avoid;
}

.week-title {
    font-size: 14pt;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.timeline-day {
    text-align: center;
    padding: 5px;
}

.timeline-circle {
    width: 30px;
    height: 30px;
    border: 2px solid #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px auto;
    font-weight: bold;
    font-size: 10pt;
    background: white;
}

.timeline-milestone .timeline-circle {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    border-color: #d4af37;
    transform: scale(1.2);
}

.timeline-date {
    font-size: 8pt;
    color: #666;
}

.week-reflection {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

.reflection-lines {
    margin-top: 10px;
}

.reflection-line {
    height: 1px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 8px;
}

/* Notes Section */
.notes-section {
    margin: 30px 0;
}

.notes-title {
    font-size: 20pt;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.notes-intro {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #d4af37;
}

.notes-intro p {
    margin: 0;
    font-size: 11pt;
    color: #2c3e50;
    line-height: 1.5;
}

.daily-notes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.daily-note-entry {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
    page-break-inside: avoid;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.note-day {
    font-weight: bold;
    font-size: 12pt;
    color: #2c3e50;
}

.note-date {
    font-size: 10pt;
    color: #666;
}

.note-milestone {
    font-size: 9pt;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.note-content {
    margin: 15px 0;
}

.note-line {
    height: 1px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 12px;
}

.milestone-prompt {
    background: #f0f8ff;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #4169e1;
    margin-top: 10px;
}

.milestone-prompt em {
    color: #2c3e50;
    font-size: 10pt;
}

.final-reflection {
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #d4af37;
    border-radius: 15px;
    page-break-inside: avoid;
}

.final-reflection h4 {
    font-size: 14pt;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.final-reflection-content .reflection-line {
    margin-bottom: 15px;
    border-bottom: 2px solid #ccc;
}

/* Share the Light Section */
.share-section {
    margin: 40px 0;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 30px;
    border-radius: 15px;
    border: 2px solid #d4af37;
}

.share-header {
    margin-bottom: 30px;
}

.share-title {
    font-size: 24pt;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.share-content {
    max-width: 600px;
    margin: 0 auto;
}

.share-message {
    font-size: 14pt;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 30px;
    font-style: italic;
    text-align: justify;
}

.share-qr-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.qr-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.qr-container svg {
    width: 120px;
    height: 120px;
    display: block;
}

.share-url {
    text-align: left;
}

.url-text {
    font-family: 'Courier New', monospace;
    font-size: 12pt;
    font-weight: bold;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin: 0;
    letter-spacing: 0.5px;
}

.share-closing {
    font-size: 16pt;
    font-weight: 600;
    color: #d4af37;
    margin-top: 25px;
    margin-bottom: 0;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Progress Section */
.progress-section {
    margin: 30px 0;
}

.progress-title {
    font-size: 20pt;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    border-top: 2px solid #d4af37;
    border-bottom: 2px solid #d4af37;
    padding: 10px 0;
}

.days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px auto;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.day-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    page-break-inside: avoid;
    width: 80px;
    min-width: 80px;
}

.day-circle {
    width: 50px;
    height: 50px;
    border: 3px solid #2c3e50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.day-circle:hover {
    background: #d4af37;
    transform: scale(1.1);
}

.day-number {
    font-size: 14pt;
    font-weight: bold;
    color: #2c3e50;
}

.day-date {
    font-size: 9pt;
    font-weight: bold;
    color: #666;
    margin-top: 5px;
}

.day-weekday {
    font-size: 8pt;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Instructions Section */
.instructions-section {
    margin: 20px 0;
    page-break-inside: avoid;
}

.instructions-title {
    font-size: 18pt;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 8px;
}

.instructions-list {
    font-size: 11pt;
    line-height: 1.8;
    color: #555;
    background: #f8f9fa;
    padding: 20px 30px;
    border-radius: 10px;
    border-left: 5px solid #d4af37;
    margin-bottom: 25px;
}

.instructions-list li {
    margin-bottom: 8px;
    padding-left: 5px;
}



/* Page Break Controls */
.page-break {
    page-break-before: always;
}

.no-break {
    page-break-inside: avoid;
}

/* Layout adjustments for different novena lengths */
.days-grid {
    max-width: 700px; /* Control max width for centering */
}

/* For short novenas (9 days or less), use 7 per row */
.days-grid[data-length="3"],
.days-grid[data-length="7"],
.days-grid[data-length="9"] {
    max-width: 600px;
}

/* For medium novenas (10-30 days), use 10 per row */
.days-grid[data-length="21"],
.days-grid[data-length="30"] {
    max-width: 850px;
}

/* For very long novenas, use smaller circles and more per row */
.days-grid[data-length="54"],
.days-grid[data-length="100"],
.days-grid[data-length="144"] {
    max-width: 900px;
    gap: 8px;
}

.days-grid[data-length="54"] .day-item,
.days-grid[data-length="100"] .day-item,
.days-grid[data-length="144"] .day-item {
    width: 65px;
    min-width: 65px;
}

.days-grid[data-length="54"] .day-circle,
.days-grid[data-length="100"] .day-circle,
.days-grid[data-length="144"] .day-circle {
    width: 40px;
    height: 40px;
}

.days-grid[data-length="54"] .day-number,
.days-grid[data-length="100"] .day-number,
.days-grid[data-length="144"] .day-number {
    font-size: 10pt;
}

.days-grid[data-length="54"] .day-date,
.days-grid[data-length="100"] .day-date,
.days-grid[data-length="144"] .day-date,
.days-grid[data-length="54"] .day-weekday,
.days-grid[data-length="100"] .day-weekday,
.days-grid[data-length="144"] .day-weekday {
    font-size: 7pt;
}

/* Special styling for completed days (if needed in future) */
.day-circle.completed {
    background: #28a745;
    border-color: #28a745;
}

.day-circle.completed .day-number {
    color: white;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

/* Decree reference styling */
.decree-reference {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    font-size: 0.85rem;
}

.decree-ref-header {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.decree-ref-content {
    color: #495057;
    line-height: 1.5;
}

.decree-ref-meta {
    color: #6c757d;
    font-size: 0.8rem;
}
