/* Base styles */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");

:root {
    --main-font: "Inter", sans-serif;
    --title-font: "Playfair Display", serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--main-font);
}

.container {
    width: 100%;
    max-width: 48em;
    margin: 2em auto;
    padding: 0em 2em;
    min-height: 98vh;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    position: relative;
}

/* Mobile styles */
@media (max-width: 768px) {
    .container {
        margin: 0;
        padding: 1em;
        min-height: 100vh;
        box-shadow: none;
    }

    .post-it.left,
    .post-it.right {
        display: none !important;
    }

    .grid {
        display: block;
    }

    .grid-item {
        width: 100%;
        margin-bottom: 1em;
    }

    .month-year {
        font-size: 2.5rem;
        margin: 0.5em 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .controls {
        flex-direction: column;
        gap: 1em;
        margin: 1em 0;
    }

    .print-btn,
    .reset-btn {
        width: 100%;
        padding: 12px;
    }

    .footer-text {
        order: -1;
        margin-bottom: 1em;
    }
}
/* Post-it note styles */
.post-it {
    position: absolute;
    width: 120px;
    height: 120px;
    background: #fff6a6;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transform: rotate(-3deg);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--main-font);
    font-size: 0.8rem;
    text-align: center;
    padding: 10px;
    line-height: 1.2;
}

.post-it::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent #f3dd70 transparent transparent;
}

/* Left post-it */
.post-it.left {
    top: 15%;
    left: -8em;
    transform: rotate(-5deg);
}

/* Right post-it */
.post-it.right {
    top: 37%;
    right: -8em;
    transform: rotate(5deg);
}

/* Add subtle edge shading */
.container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0) 5%,
        rgba(0, 0, 0, 0) 95%,
        rgba(0, 0, 0, 0.02) 100%
    );
    pointer-events: none;
}

/* Add this to push footer to bottom */
.content {
    flex: 1;
}

/* Typography */
.month-year {
    font-family: var(--title-font);
    font-size: 3.5rem;
    font-weight: 700;
    margin: 16px 0 16px;
    text-align: center;
    letter-spacing: -0.03em;
}

.section-title {
    font-family: var(--title-font);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}

.horizontal-line {
    border-top: 1px solid #000;
    margin-bottom: 1.5rem;
}

.section {
    margin-bottom: 0.75em;
}

/* Grid layouts */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.grid-item {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    padding: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.05);
}

.goal-title {
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: -0.01em;
    padding-bottom: 4px;
}

.goal-description {
    font-size: 0.75rem;
    letter-spacing: -0.005em;
}

/* Editable content */
[contenteditable="true"] {
    outline: none;

    border-radius: 2px;
}

[contenteditable="true"]:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

[contenteditable="true"]:focus {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Footer */
.footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    width: 100%;
    position: absolute;
    bottom: 2vh;
    left: 0vw;
}

.footer div {
    padding: 10px;
    color: #666;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    cursor: text;
}

/* Style for editable month */
.footer .month-field {
    color: #666;
    font-size: 0.9rem;
}

/* Controls */
.controls {
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
}

.print-btn {
    padding: 8px 16px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: var(--main-font);
}

.print-btn:hover {
    background: #333;
}

.reset-btn {
    padding: 8px 16px;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    cursor: pointer;
    font-family: var(--main-font);
}

/* Print styles */
@media print {
    @page {
        size: letter;
    }

    .add-item-btn,
    .remove-item-btn,
    .post-it.left,
    .post-it.right {
        display: none;
    }

    .grid-item {
        margin-bottom: 0.2em;
    }

    body {
        padding: 0pt;
        font-size: 11pt;
        background: none;
    }

    .container {
        padding-left: 18pt;
        padding-right: 18pt;
        margin: 0em auto;
        box-shadow: none;
    }

    .container::before,
    .container::after {
        display: none;
    }

    .controls {
        display: none;
    }

    .month-year {
        margin: 4pt 0 4pt;
    }

    .section {
        page-break-inside: avoid;
        margin-bottom: 8pt;
    } /* Ensure text remains crisp */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Update these styles */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.section-title {
    font-family: var(--title-font);
    font-size: 2rem;
    font-weight: 700;
    white-space: nowrap;
    margin-bottom: 0;
}

.horizontal-line {
    flex-grow: 1;
    border-top: 1px solid #000;
    margin: 0;
    height: 0;
}

.section-controls {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.add-item-btn,
.remove-item-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    color: #333;
}

.add-item-btn:hover,
.remove-item-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.footer-text {
    margin: 0 auto;
    align-self: center;
    text-align: center;
}
