/* =========================================
   TimeTracker CSS — Official Stylesheet
   ONLY CSS — No HTML, No JS
   ========================================= */

/* -----------------------------------------
   CSS VARIABLES
----------------------------------------- */
:root {
    --bg: #f7f7f9;
    --card-bg: #ffffff;
    --text: #222;
    --accent: #3a7afe;
    --border: #ddd;
    --radius: 8px;
    --spacing: 1rem;
}

/* -----------------------------------------
   GLOBAL RESET + BASE STYLE
----------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    font-family: "Inter", system-ui, sans-serif;
    color: var(--text);
    line-height: 1.55;
    padding: var(--spacing);
}

main {
    max-width: 800px;
    margin: 0 auto;
}

/* -----------------------------------------
   GENERIC CARD STYLE
----------------------------------------- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: calc(var(--spacing) * 1.2);
    margin-bottom: calc(var(--spacing) * 1.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* -----------------------------------------
   HEADER
----------------------------------------- */
header {
    text-align: center;
    margin-bottom: calc(var(--spacing) * 1.5);
}

header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--accent);
}

/* -----------------------------------------
   DATE SECTION
----------------------------------------- */
#date-section {
    composes: card;
}

#date-section label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.4rem;
}

#dateInput {
    width: 100%;
    padding: 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 1rem;
}

/* -----------------------------------------
   NEW TIME BLOCK SECTION
----------------------------------------- */
#new-block-section {
    composes: card;
}

#new-block-section label {
    font-weight: 600;
    display: block;
    margin: 0.8rem 0 0.4rem;
}

#newBlockStartTime,
#newBlockTasks {
    width: 100%;
    padding: 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 1rem;
}

#newBlockTasks {
    height: 110px;
    resize: vertical;
}

#addBlockBtn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.7rem;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

#addBlockBtn:hover {
    background: #2963d6;
}

#addBlockBtn:active {
    background: #1e4fb4;
}

/* -----------------------------------------
   TIME BLOCK DISPLAY SECTION
----------------------------------------- */
.time-block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing);
    margin-bottom: var(--spacing);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* On larger screens, lay out in a grid */
@media (min-width: 600px) {
    .time-block {
        display: grid;
        grid-template-columns: 120px 1fr 100px;
        align-items: start;
    }
}

.time-block-start {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

.time-block-tasks ul {
    list-style: disc;
    padding-left: 1.2rem;
}

.time-block-tasks li {
    margin-bottom: 0.25rem;
}

.time-block-duration {
    font-size: 0.95rem;
    color: #555;
    font-weight: 600;
    text-align: right;
}

/* -----------------------------------------
   NOTES SECTION
----------------------------------------- */
#notes-section {
    composes: card;
}

#notes-section label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.4rem;
}

#notesInput {
    width: 100%;
    padding: 0.7rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    height: 160px;
    font-size: 1rem;
    resize: vertical;
}

/* -----------------------------------------
   SAVE BUTTON
----------------------------------------- */
#saveDayBtn {
    width: 100%;
    padding: 0.9rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--spacing);
    transition: 0.2s;
}

#saveDayBtn:hover {
    background: #2963d6;
}

#saveDayBtn:active {
    background: #1e4fb4;
}

/* -----------------------------------------
   UTILITY SPACING CLASSES (Optional)
----------------------------------------- */
.mt { margin-top: var(--spacing); }
.mb { margin-bottom: var(--spacing); }
