/**
 * Elementor FAQ Widget Styles
 */

/* Main Widget Container */
.efaq-widget {
    width: 100%;
}

/* Search Field */
.efaq-search-wrapper {
    margin-bottom: 20px;
}

.efaq-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.efaq-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.1);
}

.efaq-search-input::placeholder {
    color: #999;
    opacity: 1;
}

/* Tags */
.efaq-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.efaq-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #666666;
    background-color: #f5f5f5;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.efaq-tag:hover {
    color: #333333;
    background-color: #e0e0e0;
    transform: translateY(-1px);
}

.efaq-tag:active {
    transform: translateY(0);
}

.efaq-tag.active {
    color: #ffffff !important;
    background-color: #0073aa !important;
    border-color: #0073aa !important;
}

.efaq-tag:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Buttons (Reset & Toggle All) */
.efaq-reset-wrapper,
.efaq-toggle-all-wrapper {
    margin-bottom: 20px;
}

.efaq-reset-button,
.efaq-toggle-all-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #ffffff;
    background-color: #0073aa;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.efaq-reset-button:hover,
.efaq-toggle-all-button:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.efaq-reset-button:active,
.efaq-toggle-all-button:active {
    transform: translateY(0);
}

.efaq-reset-button:focus,
.efaq-toggle-all-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Result Counter */
.efaq-result-count {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666666;
}

.efaq-count-number {
    font-weight: 600;
    color: #0073aa;
}

/* Badges */
.efaq-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    background-color: #e74c3c;
    border-radius: 10px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Numbering */
.efaq-number {
    display: inline-block;
    font-weight: 700;
    color: #0073aa;
    margin-right: 10px;
}

/* Last Updated */
.efaq-last-updated {
    font-size: 12px;
    color: #999999;
    margin-top: 10px;
    font-style: italic;
}

/* Action Buttons (Print, Copy Link) */
.efaq-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

.efaq-action-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-size: 13px;
    color: #666666;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.efaq-action-buttons button:hover {
    color: #0073aa;
}

.efaq-action-buttons button svg {
    flex-shrink: 0;
}

/* Read More Button */
.efaq-read-more {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #0073aa;
    background: transparent;
    border: 1px solid #0073aa;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.efaq-read-more:hover {
    color: #ffffff;
    background-color: #0073aa;
}

.efaq-content-inner.efaq-collapsed {
    overflow: hidden;
    position: relative;
}

.efaq-content-inner.efaq-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #ffffff);
}

/* Load More Button */
.efaq-load-more-wrapper {
    text-align: center;
    margin-top: 20px;
}

.efaq-load-more-button {
    display: inline-block;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #ffffff;
    background-color: #0073aa;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.efaq-load-more-button:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.efaq-load-more-button:active {
    transform: translateY(0);
}

.efaq-load-more-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Empty State */
.efaq-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 16px;
}

/* Icon Position Left */
.efaq-icon-left .efaq-title {
    flex-direction: row-reverse;
}

.efaq-icon-left .efaq-icon {
    margin-right: 16px;
    margin-left: 0;
}

.efaq-icon-left .efaq-title-text {
    margin-right: 0;
    margin-left: 16px;
}

/* Border Styles */
.efaq-border-connected .efaq-item {
    border-radius: 0;
    margin-bottom: 0;
}

.efaq-border-connected .efaq-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.efaq-border-connected .efaq-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.efaq-border-connected .efaq-item:not(:last-child) {
    border-bottom: none;
}

.efaq-border-none .efaq-item {
    border: none !important;
}

/* Pagination Hidden Items */
.efaq-item.efaq-hidden {
    display: none;
}

/* Accordion Items Container */
.efaq-items-wrapper {
    display: flex;
    flex-direction: column;
}

/* Accordion Item */
.efaq-item {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.efaq-item:not(:last-child) {
    margin-bottom: 10px;
}

.efaq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Accordion Title */
.efaq-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.efaq-title:hover {
    background-color: #f0f0f0;
}

.efaq-item.active .efaq-title {
    background-color: #f0f0f0;
}

.efaq-title-text {
    flex: 1;
    margin-right: 16px;
}

/* Accordion Icon */
.efaq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.efaq-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.efaq-item.active .efaq-icon {
    transform: rotate(180deg);
}

/* Special rotation for plus icon */
.efaq-item.active .efaq-icon svg line:first-child {
    transform: rotate(90deg);
    transform-origin: center;
}

/* Accordion Content */
.efaq-content {
    padding: 20px;
    color: #666666;
    background-color: #ffffff;
    line-height: 1.6;
    display: none;
}

.efaq-content p:last-child {
    margin-bottom: 0;
}

/* No Results Message */
.efaq-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 16px;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .efaq-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .efaq-title {
        padding: 14px 16px;
        font-size: 15px;
    }

    .efaq-content {
        padding: 16px;
        font-size: 14px;
    }

    .efaq-tag {
        padding: 6px 12px;
        font-size: 13px;
    }

    .efaq-tags-wrapper {
        gap: 8px;
    }

    .efaq-reset-button,
    .efaq-toggle-all-button,
    .efaq-load-more-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .efaq-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .efaq-action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .efaq-action-buttons button {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .efaq-title {
        padding: 12px 14px;
        font-size: 14px;
    }

    .efaq-content {
        padding: 14px;
        font-size: 13px;
    }

    .efaq-icon {
        width: 18px;
        height: 18px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.efaq-item {
    animation: fadeIn 0.3s ease;
}

/* Print Styles */
@media print {
    .efaq-search-wrapper,
    .efaq-tags-wrapper,
    .efaq-reset-wrapper,
    .efaq-toggle-all-wrapper,
    .efaq-result-count,
    .efaq-load-more-wrapper,
    .efaq-action-buttons {
        display: none;
    }

    .efaq-item {
        page-break-inside: avoid;
    }

    .efaq-content {
        display: block !important;
    }

    .efaq-icon {
        display: none;
    }

    .efaq-badge {
        background-color: transparent;
        color: #000;
        border: 1px solid #000;
    }

    .efaq-content-inner.efaq-collapsed {
        max-height: none !important;
    }

    .efaq-content-inner.efaq-collapsed::after {
        display: none;
    }

    .efaq-read-more {
        display: none;
    }
}

/* Accessibility */
.efaq-title:focus,
.efaq-title:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .efaq-item {
        border-width: 2px;
    }

    .efaq-tag {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .efaq-item,
    .efaq-title,
    .efaq-icon,
    .efaq-tag,
    .efaq-search-input,
    .efaq-reset-button,
    .efaq-toggle-all-button {
        transition: none;
    }

    .efaq-item {
        animation: none;
    }
}
