/**
 * Single post - style szablonu pojedynczego wpisu + archiwum sidebar
 *
 * @package BlekitnyAniol
 */

/* === Layout dwukolumnowy === */

.ba-single-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.ba-single-post {
    flex: 1;
    min-width: 0;
}

.ba-archive-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* === Miniaturka wpisu === */

.ba-single-thumbnail {
    margin-bottom: 20px;
}

.ba-single-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* === Tytuł === */

.ba-single-title {
    font-size: 2em;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 10px;
    line-height: 1.25;
}

.ba-single-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ba-single-title a:hover {
    color: #4A90D9;
}

/* === Meta: data + kategorie === */

.ba-single-meta {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 24px;
}

.ba-single-separator {
    margin: 0 8px;
}

.ba-single-category a {
    color: #547aa5;
    text-decoration: none;
}

.ba-single-category a:hover {
    color: #4A90D9;
}

/* === Treść wpisu === */

.ba-single-content {
    line-height: 1.7;
    color: #34495e;
    margin-bottom: 30px;
}

.ba-single-content img {
    max-width: 100%;
    height: auto;
}

.ba-single-content p:last-child {
    margin-bottom: 0;
}

/* === Nawigacja prev/next === */

.ba-post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.ba-nav-prev,
.ba-nav-next {
    flex: 1;
    min-width: 0;
}

.ba-nav-next {
    text-align: right;
}

.ba-post-navigation a {
    color: #547aa5;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s ease;
}

.ba-post-navigation a:hover {
    color: #4A90D9;
}

/* ============================================
   ARCHIWUM SIDEBAR - Akordeon
   ============================================ */

.ba-archive-heading {
    font-size: 1.3em;
    font-weight: 700;
    color: #2c3e50;
    border-bottom: 2px solid #547aa5;
    padding-bottom: 10px;
    margin: 0 0 15px;
}

/* === Przycisk roku === */

.ba-year-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    font-family: "Open Sans", sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e50;
    text-align: left;
    transition: color 0.2s ease;
}

.ba-year-toggle:hover {
    color: #547aa5;
}

/* === Zawartość roku (lista miesięcy) — domyślnie ukryta === */

.ba-year-content {
    display: none;
    padding: 4px 0 4px 8px;
}

.ba-archive-year.ba-open > .ba-year-content {
    display: block;
}

/* === Przycisk miesiąca === */

.ba-month-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 0 8px 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Open Sans", sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    color: #547aa5;
    text-align: left;
    transition: color 0.2s ease;
}

.ba-month-toggle:hover {
    color: #4A90D9;
}

/* === Lista wpisów w miesiącu — domyślnie ukryta === */

.ba-month-posts {
    display: none;
    list-style: none;
    margin: 0;
    padding: 4px 0 8px 24px;
}

.ba-archive-month.ba-open > .ba-month-posts {
    display: block;
}

.ba-month-posts li {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ba-month-posts li:last-child {
    border-bottom: none;
}

.ba-month-posts li a {
    color: #34495e;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.ba-month-posts li a:hover {
    color: #4A90D9;
}

/* === Aktualnie wyświetlany wpis === */

.ba-archive-current a {
    color: #4A90D9 !important;
    font-weight: 700;
}

/* === Ikona toggle (▶ / ▼) === */

.ba-toggle-icon {
    font-size: 0.65em;
    display: inline-block;
    transition: transform 0.2s ease;
    color: #7f8c8d;
}

.ba-archive-year.ba-open > .ba-year-toggle .ba-toggle-icon,
.ba-archive-month.ba-open > .ba-month-toggle .ba-toggle-icon {
    transform: rotate(90deg);
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */

@media (max-width: 767px) {
    .ba-single-container {
        flex-direction: column;
        gap: 30px;
        margin: 20px auto;
    }

    .ba-archive-sidebar {
        width: 100%;
    }

    .ba-single-title {
        font-size: 1.5em;
    }

    .ba-post-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .ba-nav-next {
        text-align: left;
    }
}
