/* notes.css - Styl pro poznámky (Dark Mode) */

/* Definice barev pro kartičky (akcenty) */
:root {
    --note-bg: #1e1e1e; /* Stejné jako --surface v basic.css */
    --note-border: #333;
    
    /* Barvy proužků nahoře */
    --c-default: #555;
    --c-blue: #3498db;
    --c-green: #2ecc71;
    --c-red: #e74c3c;
    --c-yellow: #f1c40f;
}

h1 {
    margin-bottom: 30px;
    color: var(--text);
}

/* --- FORMULÁŘ --- */
.add-note {
    background: var(--note-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--note-border);
    margin-bottom: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.note-title-input {
    flex: 1;
    background: #2d2d2d;
    border: 1px solid #444;
    padding: 12px;
    color: #fff;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
}

.color-select {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
    padding: 0 15px;
    border-radius: 5px;
    cursor: pointer;
}

textarea {
    width: 100%;
    background: #2d2d2d;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 15px;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box;
    min-height: 100px;
    margin-bottom: 15px;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-submit {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.btn-submit:hover {
    background-color: #357abd;
}

/* --- GRID POZNÁMEK --- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responzivní grid */
    gap: 20px;
    align-items: start; /* Aby se karty nenatahovaly na výšku */
}

/* Prázdný stav */
.empty-state {
    text-align: center;
    grid-column: 1 / -1;
    color: #666;
    padding: 50px;
}
.empty-state i {
    font-size: 4em;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Karta poznámky */
.note-card {
    background: var(--note-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid var(--note-border);
    border-top-width: 5px; /* Barevný proužek nahoře */
    transition: transform 0.2s;
    position: relative;
    word-wrap: break-word; /* Zalomí dlouhá slova */
}

.note-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* Barvy proužků podle výběru */
.color-default { border-top-color: var(--c-default); }
.color-blue    { border-top-color: var(--c-blue); }
.color-green   { border-top-color: var(--c-green); }
.color-red     { border-top-color: var(--c-red); }
.color-yellow  { border-top-color: var(--c-yellow); }

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.note-date {
    font-size: 0.8em;
    color: #777;
}

.btn-delete {
    color: #666;
    text-decoration: none;
    font-size: 1.1em;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-delete:hover {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.note-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #fff;
}

.note-content {
    color: #ccc;
    line-height: 1.6;
    white-space: pre-wrap; /* Zachová mezery a odřádkování z textarea */
}

/* Responzivita pro mobil */
@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }
}