/* POMODORO FEED & LLM DOWNLOAD STYLES */

/* --- LLM Download Button (Floating Bottom Right) --- */
.llm-download-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
    font-weight: bold;

    background-color: #4A5D23;
    color: white;
    border: none;
    font-family: 'Departure Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-radius: 0px; /* Sharp edges */
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 93, 35, 0.3);
    transition: all 0.2s ease;
}

.llm-download-btn:hover {
    background-color: #3b4a1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 93, 35, 0.4);
}

/* --- Grid Paper Aesthetic (Background Only) --- */
.grid-paper-container {
    position: relative;
    background-color: #fafafa; /* Paper color */
    border: 1px solid #eee;
    overflow: hidden;

    /* Grid is printed ON THE PAPER (Background), Image sits on top */
    background-image:
        linear-gradient(rgba(74, 93, 35, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 93, 35, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Remove overlay technique */
.grid-paper-container::after {
    display: none;
}

/* The Image (sits on top, multiplies into grid) */
.grid-paper-container img {
    position: relative;
    z-index: 1;
    display: block;
    mix-blend-mode: multiply; /* The image darks multiply; whites become transparent showing the grid */
    filter: contrast(1.05) grayscale(100%); /* Clean black & white look */
}

/* --- Work Journal Section --- */
.work-journal-section {
    margin-top: 120px;
    border-top: 1px dashed #ddd;
    padding-top: 60px;
    margin-bottom: 80px;
}

.journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* --- Pomodoro Card (Ultra Compact + Hover Expand) --- */
.pomodoro-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 12px 14px;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Compact: Hide summary AND images by default */
.pomodoro-card .pomo-summary,
.pomodoro-card .pomo-images {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.2s ease;
}

/* Hover: Expand the card */
.pomodoro-card:hover {
    border-color: #4A5D23;
    box-shadow: 0 4px 12px rgba(74, 93, 35, 0.1);
    transform: translateY(-2px);
}

.pomodoro-card:hover .pomo-summary {
    max-height: 200px;
    opacity: 1;
    margin-top: 12px;
}

.pomodoro-card:hover .pomo-images {
    max-height: 150px;
    opacity: 1;
    margin-top: 10px;
    margin-bottom: 8px;
}

/* Header: Date BELOW Title (Stacked Layout) */
.pomo-header {
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 0; /* No margin when compact */
}

.pomo-title {
    font-family: 'New York', serif;
    font-size: 14px; /* Smaller */
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.pomo-timestamp {
    font-family: 'Departure Mono', monospace;
    font-size: 9px; /* Smaller */
    color: #aaa;
    white-space: nowrap;
    margin: 0; /* Date below, no margin-left */
}

.pomo-summary {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pomo-summary li {
    font-size: 12px; /* Smaller */
    line-height: 1.4;
    color: #555;
    margin-bottom: 4px;
    padding-left: 12px;
    position: relative;
}

.pomo-summary li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4A5D23;
    font-weight: bold;
}

/* Images in Pomo Card (Fill Space on Hover) */
.pomo-images {
    display: flex;
    gap: 6px;
    flex-wrap: wrap; /* Allow wrapping */
}

.pomo-image {
    height: 60px; /* Larger when expanded */
    width: auto;
    flex: 1 1 auto; /* Fill available space */
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.pomo-image:hover {
    transform: scale(1.05);
    border-color: #4A5D23;
}

/* Load More Button */
.load-more-btn {
    display: block;
    width: 100%;
    margin-top: 40px;
    padding: 12px;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #ccc;
    color: #888;
    font-family: 'Departure Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
}

.load-more-btn:hover {
    background: #f0f0f0;
    color: #333;
    border-color: #999;
}

/* --- Modal Styles (Dark Mode Terminal for Downloads, Light for Images) --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.image-modal.show {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Download Modal (Terminal Style) */
.download-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.download-modal-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    font-family: 'Departure Mono', monospace;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.download-modal-title {
    margin: 0 0 24px 0;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
    padding-bottom: 12px;
}

.download-option {
    display: block;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.download-start-btn {
    flex: 1;
    background: #4A5D23;
    border: 1px solid #5A6D33;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Departure Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    transition: background 0.2s;
}

.download-start-btn:hover { background: #5a6d33; }

.download-cancel-btn {
    flex: 1;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Departure Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.download-cancel-btn:hover { border-color: #666; color: #ccc; }

.progress-steps {
    margin-top: 16px;
    padding: 12px;
    background: #000;
    border-radius: 4px;
    font-size: 10px;
    color: #888;
    display: none;
}

.progress-step { margin-bottom: 4px; }
.progress-step.success { color: #4A5D23; }
.progress-step.skip { color: #444; }
