﻿/*---------- Q&A Popup ----------*/
.c-qa-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.c-qa-popup.is-active {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.c-qa-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

/* Content */
.c-qa-popup__content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.c-qa-popup.is-active .c-qa-popup__content {
    transform: translateY(0);
}

/* Close button */
.c-qa-popup__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c-qa-popup__close:hover {
    background-color: #DA1A32;
    color: #fff;
}

/* Header */
.c-qa-popup__header {
    margin-bottom: 12px;
}

/* Badge */
.c-qa-popup__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.c-qa-popup__badge--question {
    background-color: #DA1A32;
    color: #fff;
}

.c-qa-popup__badge--answer {
    background-color: #28a745;
    color: #fff;
}

/* Question */
.c-qa-popup__question {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Divider */
.c-qa-popup__divider {
    height: 1px;
    background: linear-gradient(to right, #DA1A32, #e5e5e5);
    margin: 20px 0;
}

/* Answer */
.c-qa-popup__answer {
    font-size: 15px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Meta */
.c-qa-popup__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 13px;
}

.c-qa-popup__doctor {
    color: #DA1A32;
    font-weight: 600;
}

.c-qa-popup__doctor::before {
    content: "\f0f0";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 6px;
}

.c-qa-popup__date {
    color: #888;
}

.c-qa-popup__date::before {
    content: "\f073";
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    margin-right: 6px;
}

/* Responsive */
@media (max-width: 767px) {
    .c-qa-popup__content {
        width: 95%;
        padding: 20px 15px;
        max-height: 85vh;
    }

    .c-qa-popup__question {
        font-size: 15px;
    }

    .c-qa-popup__answer {
        font-size: 14px;
    }

    .c-qa-popup__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/*---------- End Q&A Popup ----------*/

/*---------- Q&A Page ----------*/
/* Page Header */
.c-qa-page-header {
    background: linear-gradient(135deg, #DA1A32 0%, #b01428 100%);
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 25px;
    color: #fff;
}

.c-qa-page-header__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.c-qa-page-header__title .c-qa-icon {
    width: 36px;
    height: 36px;
    background-color: #fff;
}

.c-qa-page-header__title .c-qa-icon::before {
    color: #DA1A32;
    font-size: 18px;
}

.c-qa-page-header__desc {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Page Form */
.c-qa-page-form {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.c-qa-page-form__title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #DA1A32;
    display: inline-block;
}

.c-qa-page-form .form-control {
    background-color: #f8f9fa;
    border-color: #e5e5e5;
}

.c-qa-page-form .form-control:focus {
    background-color: #fff;
    border-color: #DA1A32;
    box-shadow: 0 0 0 0.2rem rgba(218, 26, 50, 0.15);
}

/* Page List */
.c-qa-page-list {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.c-qa-page-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
}

.c-qa-page-list__title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.c-qa-page-list__count {
    font-size: 13px;
    color: #666;
}

/* Page Items */
.c-qa-page-items {
    padding: 0;
}

.c-qa-page-item {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.c-qa-page-item:last-child {
    border-bottom: none;
}

.c-qa-page-item:hover {
    background-color: #fef7f8;
}

.c-qa-page-item__question {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.c-qa-page-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background-color: #DA1A32;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.c-qa-page-item__text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
}

.c-qa-page-item:hover .c-qa-page-item__text {
    color: #DA1A32;
}

.c-qa-page-item__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 40px;
    font-size: 13px;
}

.c-qa-page-item__date {
    color: #888;
}

.c-qa-page-item__date i {
    margin-right: 5px;
}

.c-qa-page-item__status {
    font-weight: 500;
}

.c-qa-page-item__status.is-answered {
    color: #28a745;
}

.c-qa-page-item__status.is-pending {
    color: #ffc107;
}

.c-qa-page-item__status i {
    margin-right: 5px;
}

/* Pagination */
.c-qa-pagination {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
}

.c-qa-pagination .pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    margin: 0;
    gap: 5px;
}

.c-qa-pagination .page-item {
    display: inline-block;
}

.c-qa-pagination .page-link {
    display: block;
    padding: 8px 14px;
    color: #DA1A32;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.c-qa-pagination .page-item.active .page-link {
    background-color: #DA1A32;
    border-color: #DA1A32;
    color: #fff;
}

.c-qa-pagination .page-item.disabled .page-link {
    color: #ccc;
    pointer-events: none;
    background-color: #f8f9fa;
}

.c-qa-pagination .page-link:hover {
    background-color: #fef7f8;
    border-color: #DA1A32;
    color: #DA1A32;
}

.c-qa-pagination .page-item.active .page-link:hover {
    background-color: #b01428;
    border-color: #b01428;
    color: #fff;
}

/* Responsive */
@media (max-width: 767px) {
    .c-qa-page-header {
        padding: 20px;
    }

    .c-qa-page-header__title {
        font-size: 20px;
    }

    .c-qa-page-form {
        padding: 15px;
    }

    .c-qa-page-list__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .c-qa-page-item {
        padding: 15px;
    }

    .c-qa-page-item__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding-left: 40px;
    }
}

/*---------- End Q&A Page ----------*/


/*---------- Q&A Box - Hỏi đáp cùng bác sĩ ----------*/
.c-qa-box {
    border-color: #DA1A32 !important;
}

    .c-qa-box .c-box__title__name {
        display: flex;
        align-items: center;
        gap: 8px;
    }

.c-qa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #DA1A32;
    border-radius: 50%;
    flex-shrink: 0;
}

    .c-qa-icon::before {
        content: "?";
        color: #fff;
        font-weight: 700;
        font-size: 14px;
    }

/* Form */
.c-qa-form {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e5e5e5;
}

    .c-qa-form .form-control {
        background-color: #f5f5f5;
        border-color: #f5f5f5;
    }

        .c-qa-form .form-control:focus {
            background-color: #fff;
            border-color: #DA1A32;
        }

    .c-qa-form textarea.form-control {
        resize: vertical;
        min-height: 80px;
    }

.c-qa-form__message {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

    .c-qa-form__message p {
        margin: 0;
        font-size: 13px;
    }

/* Q&A List */
.c-qa-list__title {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.c-qa-list__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.c-qa-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

    .c-qa-item:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

.c-qa-item__question {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s ease;
}

    .c-qa-item__question:hover {
        color: #DA1A32;
    }

.c-qa-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background-color: #DA1A32;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.c-qa-list__more {
    margin-top: 15px;
    text-align: center;
}

    .c-qa-list__more a {
        display: inline-block;
        font-size: 13px;
        color: #DA1A32;
        text-decoration: none;
        font-weight: 500;
    }

        .c-qa-list__more a:hover {
            text-decoration: underline;
        }

/*---------- End Q&A Box ----------*/
