/*
 * 	BNE Blocks: Codex
 *
 * 	@author		Kerry Kline
 * 	@copyright	Copyright (c) Kerry Kline
 * 	@link		http://www.bnecreative.com
 *
 * 	@updated:	April 11, 2026
 *
*/

/* == Toggle == */
details.codex-toggle {
    background-color: #fff;
    background-clip: border-box;
    margin-bottom: 1rem;
}

/* Toggle Heading */
details.codex-toggle .codex-heading {
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    column-gap: 0.5rem;
}

/* Toggle Icon */
details.codex-toggle summary::-webkit-details-marker {
    display: none;
}
details.codex-toggle .codex-heading .codex-toggle-icon {
    width: 1em;
}
details.codex-toggle .codex-heading .codex-toggle-icon svg {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    fill: currentcolor;
}

details[open].codex-toggle .codex-heading .codex-toggle-icon svg {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

details.codex-toggle .codex-heading span {
    flex: 1;
}

/* Toggle Content */
details.codex-toggle .codex-content {
    margin-top: 0.5rem;
    padding: .75rem 1rem;
    border: 1px solid #e8e8e8;
    border-radius: var(--border-radius, .5rem);
    position: relative;
}


details.codex-toggle .codex-content:before {
    content: "";
    position: absolute;
    height: 0;
    width: 0;
    top: -9px;
    left: 30px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
    transform: translateX(-50%);
    filter: drop-shadow(0px -2px 1px #ccc);
}



details.codex-toggle .codex-content > *:first-child {
    margin-top: 0;
}

/* Animate */
details.codex-toggle[open] .codex-content {
    animation: codex-toggle 0.3s ease-in-out;
}

@keyframes codex-toggle {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

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