/**
 * SP Ohlášky
 *
 * @version 0.4
 * @author KH + ChatGPT
 */

/* --------------------------------------------------
   Celý blok
-------------------------------------------------- */

.sp-ohlasky {
    margin: 0;
}


/* --------------------------------------------------
   Aktuální ohláška
-------------------------------------------------- */

.sp-current {
    margin-bottom: 18px;
}

.sp-current-heading {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.sp-current-pdf {
    margin: 16px 0;
    padding: 10px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.sp-current-pdf iframe {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
}

.sp-current-download {
    margin: 12px 0 0;
}

.sp-current-download a {
    font-weight: 600;
    text-decoration: none;
}

.sp-current-download a:hover {
    text-decoration: underline;
}


/* --------------------------------------------------
   Blok roku
-------------------------------------------------- */

.sp-year-block {
    margin-bottom: 24px;
}


/* --------------------------------------------------
   Rok
-------------------------------------------------- */

.sp-year {

    display: block;
    position: relative;

    margin: 28px 0 10px;
    padding: 0 0 8px 22px;

    cursor: pointer;
    user-select: none;

    border-bottom: 1px solid #ddd;
}

/* CSS šipka */

.sp-year::before {

    content: "";

    position: absolute;

    left: 0;
    top: 8px;

    width: 8px;
    height: 8px;

    border-right: 2px solid #666;
    border-bottom: 2px solid #666;

    transform: rotate(-45deg);
    transition: transform .2s ease;
}

/* otevřený rok */

.sp-year-block.open .sp-year::before {
    transform: rotate(45deg);
}


/* --------------------------------------------------
   Obsah roku
-------------------------------------------------- */

.sp-year-content {
    display: none;
    margin-top: 10px;
}

.sp-year-block.open .sp-year-content {
    display: block;
}


/* --------------------------------------------------
   Měsíc
-------------------------------------------------- */

.sp-ohlasky h3.sp-month {

    margin: 14px 0 4px;
    padding: 0;

    font-size: 1em;
    font-weight: 700;
    line-height: 1.2;
}


/* --------------------------------------------------
   Jedna ohláška
-------------------------------------------------- */

.sp-item {

    margin: 0;
    padding: 1px 0 1px 18px;

    line-height: 1.35;

    transition: background-color .15s ease;
}

.sp-item:hover {
    background-color: #f7f7f7;
}

.sp-item a {
    text-decoration: none;
}

.sp-item a:hover {
    text-decoration: underline;
}


/* --------------------------------------------------
   Starší ohlášky
-------------------------------------------------- */

.sp-archive {
    margin-top: 14px;
    padding-top: 0;
}

.sp-archive-title {

    margin: 0;

    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;

    cursor: pointer;
    user-select: none;

    display: flex;
    align-items: center;

    color: inherit;
}

.sp-archive-title::before {

    content: "▼";

    display: inline-block;
    width: 1.2em;

    transition: transform .2s ease;
}

.sp-archive:not(.open) .sp-archive-title::before {
    transform: rotate(-90deg);
}

.sp-archive-content {
    margin-top: 4px;
}

.sp-archive:not(.open) .sp-archive-content {
    display: none;
}

.sp-archive .sp-year:first-child {
    margin-top: 2px;
}