/* Ogólne ustawienia bazy dokumentu */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 20px;
    font-size: 14px; 
    line-height: 1;
}

/* Główny kontener aplikacji */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
}

/* Nagłówki strukturalne */
h1, h2, h3 {
    color: #222;
    margin-top: 0;
}

/* Wycentrowanie głównego tytułu "טאָגבוך" na stronie głównej */
header h1 {
    text-align: center;
    margin-bottom: 20px;
}

/* Strona główna: Lista notatek */
.notes-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.notes-list li {
    text-align: right; 
    margin-bottom: 4px;
    padding-bottom: 4px;
}

.yiddish-link {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 22px !important;   /* Zmniejszono na komputerach z 22px */
    color: #0066cc;
    text-decoration: none;
    display: inline-block;
    direction: rtl;
}

.yiddish-link:hover {
    text-decoration: underline;
}

/* Strona wyświetlania pojedynczej notatki */

/* Tytuł notatki w jidysz */
h1.yiddish-text {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 26px !important;   /* Zmniejszono na komputerach z 30px */
    margin-bottom: 5px;
    text-align: right;
    direction: rtl;
}

/* Informacja o dacie publikacji */
.meta-date {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: left;
    direction: ltr;
}

/* Główny blok tekstu jidysz w notatce */
.content-box {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 22px !important;   /* Zmniejszono na komputerach z 24px */
    line-height: 1; 
    margin-bottom: 25px;
    text-align: right;
    direction: rtl;
}

/* Sekcja uwag i komentarzy autora */
.comments-section {
    font-size: 16px;   
    color: #555;
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #ccc;
    margin-top: 20px;
    text-align: left;
    direction: ltr;
}

.comments-section h3 {
    font-size: 17px;
    margin-bottom: 5px;
}

/* Formularze i elementy wejściowe */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Pola tekstowe przeznaczone dla jidysz (Tytuł i Treść w edytorze) */
input[id="title"], textarea[id="content"] {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    font-size: 20px !important; /* Dopasowano z 22px w dół do wygodnego pisania */
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: right;
    direction: rtl;
}

textarea[id="comments"], input[type="password"] {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: left;
    direction: ltr;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0,102,204,0.2);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 200px;
}

/* Przyciski i stopka nawigacyjna */
.site-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.bottom-nav {
    display: flex;
    justify-content: flex-start;
}

.bottom-nav a {
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.btn {
    display: inline-block;
    background: #0066cc;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

.btn:hover {
    background: #0052a3;
}

.error-msg {
    color: #cc0000;
    background: #fce8e6;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Dopasowanie pod kątem urządzeń mobilnych - ujednolicone i zmniejszone */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }

    input[id="title"], textarea[id="content"] {
        font-size: 18px !important; 
        padding: 10px;
    }
    
    .yiddish-link {
        font-size: 18px !important;   /* Zmniejszono na mobile z 19px */
    }

    h1.yiddish-text {
        font-size: 22px !important;   /* Zmniejszono na mobile z 24px */
    }

    .content-box {
        font-size: 18px !important;   /* Zmniejszono na mobile z 21px */
    }
}

/* Układ elementu listy, umożliwiający rozsuniecie tekstu i ikony ołówka */
.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

/* Zapewnienie, że link w jidysz zajmuje maksymalną przestrzeń i zachowuje kierunek RTL */
.note-item .yiddish-link {
    flex-grow: 1;
    text-align: right;
}

/* Estetyka dla ikony edycji */
.note-item .edit-link {
    margin-left: 15px;
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

/* Delikatne podświetlenie ołówka po najechaniu myszką */
.note-item .edit-link:hover {
    opacity: 1;
}
