/**
 * TLDR Post Summary – Frontend Styles
 */

.tldr-summary-box {
    margin-top: 1em;
    margin-bottom: 1em;
    border: 1px solid #e9d9b7;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tldr-summary-box p:empty {
    display: none;
}

.tldr-summary-box__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: #fff5e0;
    color: #000;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.2s ease;
}

button.tldr-summary-box__header {
    width: 100%;
}

.tldr-summary-box__header:focus {
    outline: 2px solid #ffd16d;
    outline-offset: -2px;
}

/* Toggle arrow */
.tldr-summary-box__toggle {
    display: flex;
    align-items: center;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.tldr-summary-box__header[aria-expanded="false"] .tldr-summary-box__toggle {
    transform: rotate(-180deg);
}

.tldr-summary-box__icon {
    display: flex;
    align-items: center;
    opacity: 0.85;
}

.tldr-summary-box__label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tldr-summary-box__body {
    padding: 20px;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
}

.tldr-summary-box__body.tldr-collapsed {
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.tldr-summary-box__text {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    margin: 0 0 16px;
}

.tldr-summary-box__takeaways {
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.tldr-summary-box__takeaways-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.tldr-summary-box__takeaways ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tldr-summary-box__takeaways li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.tldr-summary-box__takeaways li:last-child {
    margin-bottom: 0;
}

.tldr-summary-box__takeaways li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: #ffd16d;
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 600px) {
    .tldr-summary-box__body {
        padding: 16px;
    }

    .tldr-summary-box__text {
        font-size: 14px;
    }
}
