/* ============================================================
   AE4U Box List — Frontend Styles
   ============================================================ */

:root {
    --ae4u-color: #3b82f6;
}

.ae4u-bl-wrap {
    margin: 2rem 0;
    font-family: inherit;
}

/* ── Header ── */
.ae4u-bl-header {
    margin-bottom: 1.5rem;
    text-align: center;
}
.ae4u-bl-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.4rem;
    line-height: 1.3;
}
.ae4u-bl-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* ── Grid ── */
.ae4u-bl-grid {
    display: grid;
    gap: 1.25rem;
}
.ae4u-bl-cols-1 .ae4u-bl-grid { grid-template-columns: 1fr; }
.ae4u-bl-cols-2 .ae4u-bl-grid { grid-template-columns: repeat(2, 1fr); }
.ae4u-bl-cols-3 .ae4u-bl-grid { grid-template-columns: repeat(3, 1fr); }
.ae4u-bl-cols-4 .ae4u-bl-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .ae4u-bl-cols-3 .ae4u-bl-grid,
    .ae4u-bl-cols-4 .ae4u-bl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .ae4u-bl-grid { grid-template-columns: 1fr !important; }
}

/* ── Base Item ── */
.ae4u-bl-item {
    position: relative;
    padding: 1.25rem 1.1rem;
    border-radius: 10px;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}
.ae4u-bl-linked { cursor: pointer; }
.ae4u-bl-linked:hover { transform: translateY(-3px); }

/* ── Style: CARD (shadow) ── */
.ae4u-bl-style-card .ae4u-bl-item {
    border: 1px solid #e8edf3;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.ae4u-bl-style-card .ae4u-bl-linked:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
}

/* ── Style: BORDER (viền) ── */
.ae4u-bl-style-border .ae4u-bl-item {
    border: 2px solid var(--item-color, var(--ae4u-color));
}
.ae4u-bl-style-border .ae4u-bl-linked:hover {
    background: color-mix(in srgb, var(--item-color, var(--ae4u-color)) 8%, white);
}

/* ── Style: LEFT accent ── */
.ae4u-bl-style-left .ae4u-bl-item {
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--item-color, var(--ae4u-color));
    border-radius: 6px;
}
.ae4u-bl-style-left .ae4u-bl-linked:hover {
    border-left-width: 6px;
    background: #f8fafc;
}

/* ── Style: MINIMAL ── */
.ae4u-bl-style-minimal .ae4u-bl-item {
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: transparent;
    padding: 1rem 0.5rem;
}
.ae4u-bl-style-minimal .ae4u-bl-linked:hover {
    background: #f8fafc;
    padding-left: 1rem;
}

/* ── Style: ICON BIG ── */
.ae4u-bl-style-icon .ae4u-bl-item {
    border: 1px solid #e8edf3;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    align-items: center;
    text-align: center;
    padding: 1.75rem 1.25rem;
}
.ae4u-bl-style-icon .ae4u-bl-icon {
    font-size: 2.5rem !important;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.ae4u-bl-style-icon .ae4u-bl-linked:hover {
    border-color: var(--item-color, var(--ae4u-color));
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* ── Icon ── */
.ae4u-bl-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Content ── */
.ae4u-bl-content { flex: 1; }
.ae4u-bl-item-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}
.ae4u-bl-linked .ae4u-bl-item-title {
    color: var(--item-color, var(--ae4u-color));
}
.ae4u-bl-item-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.3rem 0 0;
    line-height: 1.5;
}

/* ── Badge ── */
.ae4u-bl-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.7rem;
    background: var(--item-color, var(--ae4u-color));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Arrow ── */
.ae4u-bl-arrow {
    font-size: 1.1rem;
    color: var(--item-color, var(--ae4u-color));
    align-self: flex-end;
    opacity: 0.7;
    transition: transform 0.15s;
}
.ae4u-bl-linked:hover .ae4u-bl-arrow { transform: translateX(4px); opacity: 1; }

/* ── Error / Empty ── */
.ae4u-bl-error,
.ae4u-bl-empty {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 1.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}
