/**
 * DGA FAQs Stylesheet
 * File: child-theme/css/dga-faqs.css
 */

/* Container */
#dga-faqs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Search Box */
.dga-faqs-search {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    padding: 5px;
    background: white;
}

#dga-faqs-search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    border-radius: 50px;
    font-size: 16px;
}

#dga-faqs-search-btn {
    background: #0066cc;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

#dga-faqs-search-btn:hover {
    background: #0052a3;
}

/* Remove the add form section and replace with button and modal styles */

/* Add FAQ Button */
.dga-add-faq-btn {
    background: linear-gradient(135deg, #ff6600 0%, #ff8844 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dga-add-faq-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.dga-add-faq-btn:active {
    transform: translateY(0);
}

/* Modal Styles */
.dga-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.dga-modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dga-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    transition: all 0.3s;
}

.dga-modal-close:hover {
    background: #ff6600;
    color: white;
    transform: rotate(90deg);
}

.dga-modal h3 {
    color: #0066cc;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

/* Form Styles in Modal */
.dga-form-group {
    margin-bottom: 25px;
}

.dga-form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.dga-form-group input,
.dga-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #f8f9fa;
}

.dga-form-group input:focus,
.dga-form-group textarea:focus {
    border-color: #0066cc;
    outline: none;
    background: white;
}

.dga-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Modal Buttons */
.dga-modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.dga-btn-primary,
.dga-btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.dga-btn-primary {
    background: #0066cc;
    color: white;
}

.dga-btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

.dga-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.dga-btn-secondary:hover {
    background: #e0e0e0;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    .dga-modal-content {
        margin: 20px;
        padding: 30px 20px;
        width: calc(100% - 40px);
    }
    
    .dga-modal h3 {
        font-size: 24px;
    }
    
    .dga-modal-buttons {
        flex-direction: column;
    }
    
    .dga-btn-primary,
    .dga-btn-secondary {
        width: 100%;
    }
}

.dga-faqs-add-form h3 {
    color: #0066cc;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

#dga-faqs-add-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#dga-faq-question,
#dga-faq-answer {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
}

#dga-faq-question:focus,
#dga-faq-answer:focus {
    border-color: #0066cc;
    outline: none;
}

#dga-faq-answer {
    resize: vertical;
    min-height: 80px;
}

#dga-faqs-add-form button[type="submit"] {
    background: #ff6600;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-start;
}

#dga-faqs-add-form button[type="submit"]:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.3);
}

#dga-faqs-add-form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* FAQ List */
#dga-faqs-list {
    margin-bottom: 40px;
}

.dga-faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    overflow: hidden;
}

.dga-faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dga-faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dga-faq-header:hover {
    background-color: #f8f9fa;
}

.dga-faq-item.expanded {
    border: 2px solid #0066cc;
}

.dga-faq-question {
    margin: 0;
    color: #0066cc;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    padding-right: 20px;
    transition: color 0.3s;
    position: relative;
    padding-left: 30px;
}

.dga-faq-question::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
    color: #ff6600;
}

.dga-faq-question.active::before {
    transform: translateY(-50%) rotate(90deg);
}

.dga-faq-question:hover {
    color: #0052a3;
}

.dga-faq-question.active {
    color: #ff6600;
}

/* Action buttons layout */
.dga-faq-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dga-edit-btn,
.dga-delete-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dga-edit-btn {
    color: #0066cc;
}

.dga-edit-btn:hover {
    background: #0066cc;
    color: white;
    transform: scale(1.1);
}

.dga-delete-btn {
    color: #dc3545;
}

.dga-delete-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

.dga-edit-btn .dashicons,
.dga-delete-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Confirmation Dialog */
.dga-confirm-dialog {
    text-align: center;
    max-width: 450px;
}

.dga-confirm-icon {
    margin-bottom: 20px;
}

.dga-confirm-icon .dashicons {
    font-size: 60px;
    color: #ff6600;
    width: 60px;
    height: 60px;
}

.dga-confirm-dialog h3 {
    color: #333;
    margin-bottom: 15px;
}

.dga-confirm-dialog p {
    color: #666;
    margin-bottom: 20px;
}

.dga-confirm-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: left;
}

.dga-confirm-details strong {
    color: #333;
}

/* Danger Button */
.dga-btn-danger {
    background: #dc3545;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.dga-btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

/* Tooltip for buttons */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

[title]:hover::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    z-index: 1000;
}

/* Action buttons hover effects */
.dga-faq-item:hover .dga-faq-actions {
    opacity: 1;
}

.dga-faq-actions {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.dga-like-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.dga-like-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 102, 204, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.dga-like-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.dga-like-btn.liked {
    background: #0066cc;
    color: white;
    animation: likeAnimation 0.4s ease-out;
}

.dga-like-btn.liked::before {
    width: 100px;
    height: 100px;
}

.dga-like-icon {
    font-size: 16px;
    transition: transform 0.3s;
}

.dga-like-btn.animating .dga-like-icon {
    animation: iconPulse 0.5s ease-out;
}

.dga-like-count {
    font-weight: 600;
    transition: transform 0.3s;
}

/* Like Animation */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.5) rotate(10deg);
    }
    75% {
        transform: scale(1.2) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Particle effect */
.like-particle {
    position: absolute;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.5);
    }
}

.dga-faq-answer {
    padding: 0 20px 20px 50px;
    border-top: 2px solid #e8f0ff;
    background-color: #f8f9fa;
    position: relative;
}

.dga-faq-answer::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 25px;
    width: 3px;
    height: calc(100% - 45px);
    background: linear-gradient(180deg, #0066cc, #ff6600);
    border-radius: 3px;
}

.dga-answer-title {
    margin: 20px 0 15px 0;
    color: #0066cc;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.dga-faq-answer p {
    margin: 15px 0 0 0;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

/* Loading and Messages */
.dga-loading,
.dga-error,
.dga-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.dga-error {
    color: #dc3545;
}

/* Pagination */
#dga-faqs-pagination {
    margin-top: 40px;
}

.dga-pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dga-page-btn {
    background: white;
    border: 2px solid #e1e8ed;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    color: #0066cc;
    font-weight: 500;
}

.dga-page-btn:hover {
    background: #f0f8ff;
    border-color: #0066cc;
}

.dga-page-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Responsive Design */
@media (max-width: 768px) {
    #dga-faqs-container {
        padding: 15px;
    }
    
    .dga-faqs-add-form {
        padding: 20px;
    }
    
    .dga-faq-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dga-faq-question {
        font-size: 16px;
        padding-right: 0;
    }
    
    .dga-faq-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .dga-faq-answer {
        padding: 0 15px 15px 35px;
    }
    
    .dga-answer-title {
        font-size: 15px;
        margin: 15px 0 10px 0;
    }
    
    .dga-edit-btn,
    .dga-delete-btn {
        width: 30px;
        height: 30px;
    }
    
    .dga-edit-btn .dashicons,
    .dga-delete-btn .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }
    
    .dga-confirm-dialog {
        margin: 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .dga-faqs-search {
        flex-direction: column;
        border-radius: 15px;
    }
    
    #dga-faqs-search-input,
    #dga-faqs-search-btn {
        width: 100%;
        border-radius: 10px;
    }
    
    .dga-faqs-add-form h3 {
        font-size: 20px;
    }
    
    #dga-faqs-add-form button[type="submit"] {
        width: 100%;
        text-align: center;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dga-faq-item {
    animation: fadeIn 0.3s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}