/* WooCommerce Product Q&A Frontend Styles */

.wc-product-qa-wrapper {
    margin: 20px 0;
}

.wc-qa-form-section {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.wc-qa-form-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.wc-qa-form {
    max-width: none;
}

.wc-qa-user-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.wc-qa-field {
    margin-bottom: 15px;
}

.wc-qa-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.wc-qa-field input,
.wc-qa-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.wc-qa-field input:focus,
.wc-qa-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.wc-qa-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.wc-qa-submit button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wc-qa-note {
    color: #666;
    font-style: italic;
}

.wc-qa-login-message {
    text-align: center;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
}

.wc-qa-login-message a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.wc-qa-login-message a:hover {
    text-decoration: underline;
}

/* Sorular bölümü */
.wc-qa-questions-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.wc-qa-no-questions {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #6c757d;
    font-style: italic;
}

/* Soru-cevap item'ları */
.wc-qa-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.wc-qa-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wc-qa-question {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.wc-qa-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wc-qa-user {
    color: #0073aa;
    font-size: 14px;
}

.wc-qa-date {
    color: #666;
    font-size: 12px;
}

.wc-qa-question-text {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.wc-qa-answer {
    padding: 20px;
    background: #fff;
}

.wc-qa-answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wc-qa-answerer {
    color: #28a745;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-qa-store-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.wc-qa-answer-date {
    color: #666;
    font-size: 12px;
}

.wc-qa-answer-text {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    background: #f0f8f0;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

/* Daha fazla yükle butonu */
.wc-qa-load-more {
    text-align: center;
    margin-top: 20px;
}

.wc-qa-load-more button {
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.wc-qa-load-more button:hover {
    background: #005a87;
}

.wc-qa-load-more button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Bildirimler */
.wc-qa-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: 600;
}

.wc-qa-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-qa-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wc-qa-notice {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.wc-qa-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-qa-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading state */
.wc-qa-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wc-qa-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: wc-qa-spin 1s linear infinite;
}

@keyframes wc-qa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .wc-qa-user-fields {
        grid-template-columns: 1fr;
    }
    
    .wc-qa-submit {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wc-qa-submit button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .wc-qa-question-header,
    .wc-qa-answer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .wc-qa-answerer {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .wc-qa-form-section,
    .wc-qa-item {
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
    }
    
    .wc-qa-question,
    .wc-qa-answer {
        padding: 15px;
    }
}

/* Form validasyonu */
.wc-qa-field input:invalid,
.wc-qa-field textarea:invalid {
    border-color: #dc3545;
}

.wc-qa-field input:invalid:focus,
.wc-qa-field textarea:invalid:focus {
    box-shadow: 0 0 0 1px #dc3545;
}

/* Smooth animations */
.wc-qa-item {
    animation: wc-qa-fadeIn 0.5s ease-in-out;
}

@keyframes wc-qa-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}