/**
 * Product Questions and Answers Styles
 */


.rp-question-item {
    border-bottom: 1px solid #ddd;
}

.rp-question-item:last-child {
    margin-bottom: 0;
}


.rp-customer-name {
    color: var(--bs-primary);
    font-size: 16px;
}

.rp-question-date {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.rp-question-content {
    line-height: 1.6;
    font-size: 16px;
}

/* Answer styling */
.rp-answer {
    border-left: 4px solid var(--bs-primary);
    padding-left: 15px;
    background: #f8f9fa;
}

.rp-answer-header strong {
    color: var(--bs-primary);
}

.rp-answer-date {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.rp-answer-content {
    line-height: 1.6;
    font-size: 16px;
}

.rp-question-form {
    max-width: 600px;
}


.rp-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.rp-form-row .required {
    color: #e74c3c;
}

.rp-form-row input[type="text"],
.rp-form-row input[type="email"],
.rp-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.rp-form-row input[type="text"]:focus,
.rp-form-row input[type="email"]:focus,
.rp-form-row textarea:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.rp-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.rp-submit-question {
    background: var(--bs-primary);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rp-submit-question:hover {
    background: var(--bs-primary);
}

.rp-submit-question:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.rp-form-messages {
    margin-top: 20px;
}

.rp-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.rp-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rp-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Toggle button */
.rp-toggle-questions {
    margin-top: 15px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rp-toggle-questions:hover {
    background: #e0e0e0;
}

/* Responsive design */
@media (max-width: 768px) {
    .rp-submit-question {
        width: 100%;
    }
}

/* Loading state */
.rp-form-loading .rp-submit-question {
    position: relative;
}

.rp-form-loading .rp-submit-question:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Template function link styling */
.rp-questions-link {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.rp-questions-link:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.rp-questions-link:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Answer content links styling */
.rp-answer-content a {
    color: var(--bs-primary, #0073aa);
    text-decoration: underline;
    word-break: break-word;
    transition: color 0.3s ease;
}

.rp-answer-content a:hover {
    color: var(--bs-primary, #005a87);
    text-decoration: underline;
}

.rp-answer-content a:focus {
    outline: 2px solid var(--bs-primary, #0073aa);
    outline-offset: 2px;
}