.st-faq-list {
	margin: 40px auto 60px auto;
}

.st-faq-item {
    border-top: 1px solid #D8561D;
    border-left: 1px solid #D8561D;
    border-right: 1px solid #D8561D;
    margin-bottom: 0;
	box-sizing: border-box;
}

.st-faq-item:last-child,
.st-faq-item.st-faq-item--last-visible {
    border-bottom: 1px solid #D8561D;
}


.st-faq-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
	box-sizing: border-box;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 20px;
    color: #1e293b;
    font-family: inherit;
    color: inherit;
}

.st-faq-trigger[aria-expanded="true"] {
	background: #D8561D;
	color: #fff;
}
	
.st-faq-question-text {
    font-size: 16px;
}

.st-faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
}

.st-faq-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.st-faq-trigger[aria-expanded="true"] .st-faq-icon {
    transform: rotate(180deg);
	filter: brightness(0) invert(1);
}

.st-faq-content {
	padding: 0 8%;
	box-sizing: border-box;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
    transition: all 0.3s ease;
}

.st-faq-trigger[aria-expanded="true"] + .st-faq-content {
    grid-template-rows: 1fr;
	padding: 20px 8%;
    transition: all 0.3s ease;
}

.st-faq-inner {
    overflow: hidden;
}

.st-faq-inner > *:first-child {
    margin-top: 0;
}

.st-faq-inner > *:last-child {
    margin-bottom: 20px;
}

/* Editor Styles - Clean Card UI */
.st-faq-block-editor {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    overflow: hidden; /* Zaokrąglenie rogów dla dzieci */
    margin: 0 !important; /* Usuwamy domyślne marginesy Gutenberga */
    width: 100% !important; /* Wymuś pełną szerokość */
    max-width: 100% !important;
    transition: all 0.2s ease;
}

.st-faq-block-editor:hover,
.st-faq-block-editor.is-selected {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.st-faq-block-editor.is-open {
    border-color: #cbd5e1;
}

/* Nagłówek Pytania */
.st-faq-block-editor .st-faq-question {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Wyrównanie do góry dla długich pytań */
    gap: 12px;
    cursor: default; /* Kursor tekstowy, bo edytujemy tekst */
    transition: background-color 0.2s ease;
}

.st-faq-block-editor:hover .st-faq-question {
    background: #f1f5f9;
}

.st-faq-block-editor.is-open .st-faq-question {
    border-bottom-color: #e2e8f0;
    background: #fff; /* Białe tło po otwarciu */
}

/* Tekst Pytania */
.st-faq-block-editor .st-faq-question-text {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    flex-grow: 1;
    min-height: 24px; /* Żeby puste pytanie nie znikało */
}

.st-faq-block-editor .st-faq-question-text:empty::before {
    content: attr(placeholder);
    color: #94a3b8;
    pointer-events: none;
}

/* Przycisk Zwijania */
.st-faq-toggle-editor {
    flex-shrink: 0;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: -2px; /* Wyrównanie optyczne */
}

.st-faq-toggle-editor:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.st-faq-toggle-editor .dashicon {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Treść Odpowiedzi */
.st-faq-block-editor .st-faq-answer {
    padding: 20px;
    background: #fff;
    animation: stFaqFadeIn 0.3s ease;
}

@keyframes stFaqFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Poprawki dla Gutenberga */
.st-faq-block-editor .block-editor-rich-text__editable:focus {
    outline: none;
    box-shadow: none;
}

.st-faq-block-editor.is-selected {
    outline: 2px solid var(--wp-admin-theme-color, #007cba);
}

/* FAQ Category Header Styles */
.st-faq-category-header {
    margin-bottom: 20px;
}

.st-faq-category-header h2 .st-heading-inner {
	gap: 12px !important;
}

.st-faq-category-icon {
    width: 40px;
    height: auto;
    display: block;
}

.st-faq-category-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}


@media screen and (min-width: 1000px) {
	.st-faq-list {
		width: 100%;
		max-width: 800px;
		margin: 0 auto 80px auto;
	}
	
	.st-faq-trigger {
		padding: 20px 20px;
	}
	
	.st-faq-content {
		padding: 0 20px;
	}
	
	.st-faq-trigger[aria-expanded="true"] + .st-faq-content {
		padding: 20px 20px;
	}
}
