/*
 * Custom Block Styles for SeaNeB
 * Loaded in both Frontend and Gutenberg Editor
 */

/* 1. Key Takeaways Block - Dynamic Box */
.seaneb-takeaway-block,
.is-style-seaneb-takeaway {
    background-color: color-mix(in srgb, var(--seaneb-primary) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--seaneb-primary) 15%, transparent);
    border-radius: 16px;
    padding: 1.5rem 3rem 2.5rem;
    margin: 0 0 2.5rem 0 !important;
}

.seaneb-takeaway-block .seaneb-block-title,
.is-style-seaneb-takeaway .seaneb-block-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 0 !important;
    margin-bottom: 1.5rem;
    color: #111111;
    line-height: 1.2;
}

.seaneb-takeaway-block ul,
.is-style-seaneb-takeaway ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.seaneb-takeaway-block ul li,
.is-style-seaneb-takeaway ul li {
    margin-bottom: 0.75rem;
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.6;
}

.seaneb-takeaway-block ul li:last-child,
.is-style-seaneb-takeaway ul li:last-child {
    margin-bottom: 0;
}

/* 2. FAQ Accordion Block */
/* .seaneb-faq-wrapper {} */

.seaneb-faq-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--seaneb-color-heading);
}

.seaneb-faq-item {
    background-color: color-mix(in srgb, var(--seaneb-color-border) 20%, transparent);
    border: 1px solid var(--seaneb-color-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
}

.seaneb-faq-item[open] {
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-color: color-mix(in srgb, var(--seaneb-color-border) 60%, transparent);
}

.seaneb-faq-item summary {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--seaneb-color-heading);
    cursor: pointer;
    list-style: none;
    /* Hide default arrow in standard browsers */
    position: relative;
    padding-right: 2rem;
    margin: 0;
    /* Remove default margin */
}

.seaneb-faq-item summary::-webkit-details-marker {
    display: none;
    /* Hide default arrow in Safari */
}

/* Custom Arrow Icon */
.seaneb-faq-item summary::after {
    content: "";
    position: absolute;
    right: 5px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--seaneb-color-primary);
    border-bottom: 2px solid var(--seaneb-color-primary);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s ease;
}

.seaneb-faq-item[open] summary::after {
    transform: translateY(-50%) rotate(-135deg);
    /* Point up when open */
    margin-top: 4px;
}

.seaneb-faq-item p {
    margin-top: 1.25rem;
    margin-bottom: 0;
    color: var(--seaneb-color-text);
    line-height: 1.6;
}

.seaneb-faq-item p:last-child {
    margin-bottom: 0;
}

/* Smooth Open Animation */
.seaneb-faq-item[open]>*:not(summary) {
    animation: seanebSmoothFadeIn 0.3s ease-out forwards;
}

@keyframes seanebSmoothFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}