/* FAQ Block Container */
.wp-block-custom-faq-block {
    max-width: 800px;
    margin: 2rem auto;
    font-family: paralucent, Arial, Helvetica, "sans-serif";
}

/* Accordion Container */
.faq-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* FAQ Item */
.faq-item {
    border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
    border-bottom: none;
}

/* Question Button */
.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 2rem;
    font-weight: 600;
    color: #003799;
    transition: background-color 0.2s ease;
    position: relative;
    outline: none;
}

.faq-question:hover {
    background-color: #f7fafc;
}

.faq-question:focus {
    outline: 2px solid #4299e1;
    outline-offset: -2px;
}

.faq-question[aria-expanded="true"] {
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.faq-question-text {
    flex: 1;
    padding-right: 2rem;
}

/* FAQ Icon */
.faq-icon {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background-color: #003799;
    transition: transform 0.3s ease;
}

.faq-icon::before {
    width: 2px;
    height: 16px;
    left: 7px;
    top: 0;
}

.faq-icon::after {
    width: 16px;
    height: 2px;
    left: 0;
    top: 7px;
}

.faq-question[aria-expanded="true"] .faq-icon::before {
    transform: rotate(90deg);
}

/* Answer */
.faq-answer {
    padding: 1.25rem 1.5rem;
    background-color: #ffffff;
    line-height: 1.6;
    color: #191919;
    font-size: 1.5rem;
}

.faq-answer[hidden] {
    display: none;
}

.faq-answer p {
    margin: 0 0 1rem 0;
}

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

.faq-answer a {
    color: #3182ce;
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Editor Styles (admin only) */
.wp-block-custom-faq-block-editor {
    padding: 1rem;
    background: #f9f9f9;
    border: 1px dashed #ccc;
}

.faq-editor-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.faq-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.faq-tab {
    position: relative;
    padding: 0.5rem 2rem 0.5rem 1rem;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.faq-tab.active {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.faq-remove {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fc8181;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-remove:hover {
    background: #f56565;
}

.faq-add-button {
    margin-left: auto !important;
}

.faq-editor-fields {
    padding: 1.5rem;
}

.faq-editor-fields textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.faq-editor-fields textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .faq-question {
        padding: 1rem;
        font-size: 1.5rem;
    }
    
    .faq-answer {
        padding: 1rem;
        font-size: 1.5rem;
    }
    
    .faq-tabs {
        flex-direction: column;
    }
    
    .faq-tab {
        max-width: 100%;
        padding-right: 2.5rem;
    }
    
    .faq-add-button {
        width: 100%;
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .faq-question {
        padding: 0.875rem;
        font-size: 1.5rem;
    }
    
    .faq-answer {
        padding: 0.875rem;
        font-size: 1.5rem;
    }
    
    .faq-question-text {
        padding-right: 1rem;
    }
}

/* Print Styles */
@media print {
    .faq-question {
        background: none !important;
        border: 1px solid #e2e8f0;
        margin-bottom: 0.5rem;
    }
    
    .faq-icon {
        display: none;
    }
    
    .faq-answer {
        display: block !important;
        padding: 0.5rem 1rem 1rem 1rem;
    }
}