/* Giới hạn chiều rộng và căn giữa khu vực bình luận */
#comments {
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

/* Ẩn các trường Tên, Email, Website mặc định của WordPress cho khách */
.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-cookies-consent {
    display: none !important;
    visibility: hidden !important;
}

.zc-container {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}


/* --- THIẾT KẾ CÔNG TẮC (TOGGLE SWITCH) HIỆN ĐẠI --- */
.zc-comment-type-switcher {
    display: flex;
    background-color: #f1f5f9; /* slate-100 */
    border-radius: 9999px; /* Dạng viên thuốc */
    padding: 4px;
    margin-bottom: 20px;
}

.zc-type-label {
    flex: 1;
    position: relative;
    cursor: pointer;
    border-radius: 9999px; /* Bo tròn theo */
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.zc-type-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
}

.zc-type-content {
    text-align: center;
    padding: 8px 15px;
    transition: all 0.3s ease-in-out;
}

.zc-type-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155; /* slate-700 */
    transition: color 0.3s ease-in-out;
}

.zc-type-note {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748b; /* slate-500 */
    line-height: 1.2;
    transition: color 0.3s ease-in-out;
}

/* TRẠNG THÁI ĐƯỢC CHỌN (Điều khiển bằng class .is-selected từ JS) */
.zc-type-label.is-selected {
    background-color: #3b82f6; /* blue-500 */
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.zc-type-label.is-selected .zc-type-title,
.zc-type-label.is-selected .zc-type-note {
    color: #ffffff;
}
/* --- KẾT THÚC THIẾT KẾ CÔNG TẮC --- */


#zc-nickname-fields {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out, margin-top 0.5s ease-in-out;
    margin-top: 0;
}
#zc-nickname-fields.is-active {
    max-height: 500px;
    opacity: 1;
    margin-top: 20px;
}

.zc-field-group {
    margin-bottom: 20px;
}
.zc-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}
#zc_nickname {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #fff;
    box-sizing: border-box;
}
#zc_nickname:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}
#zc-nickname-notice {
    font-size: 0.9em;
    padding: 5px 0;
}
#zc-nickname-notice.success { color: #16a34a; }
#zc-nickname-notice.error { color: #dc2626; }

#zc-nickname-notice .zc-show-verify-form-link {
    font-weight: 700;
    color: #3b82f6;
    text-decoration: none;
    cursor: pointer;
}
#zc-nickname-notice .zc-show-verify-form-link:hover {
    text-decoration: underline;
}


.zc-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  	padding: 0 7px 0 7px;
}
.zc-avatar-item {
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    position: relative;
    border: 3px solid transparent;
}
.zc-avatar-item:hover {
    transform: scale(1.1);
}
.zc-avatar-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 50%;
}
.zc-avatar-item.selected {
    border-color: #3b82f6;
}
.zc-avatar-item.selected::after {
    content: '✔';
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #3b82f6;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid white;
}

.zc-welcome-back {
    padding: 15px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    color: #1e40af;
    line-height: 1.5;
}
.zc-welcome-back img {
    border-radius: 50%;
    margin-right: 15px;
}

#respond .form-submit input#submit {
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    width: auto;
    display: inline-block;
}
#respond .form-submit input#submit:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}
#respond .form-submit input#submit:active {
    transform: translateY(0);
}

/* Style cho phần đặt Passcode */
#zc-set-passcode-prompt {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #bfdbfe;
    font-size: 0.9rem;
    width: 100%;
}
#zc-passcode-form-container {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
#zc-passcode-input {
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 120px;
}
#zc-submit-passcode {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
}
#zc-submit-passcode:hover {
    background-color: #2563eb;
}
.zc-form-note {
    font-size: 0.8rem;
    color: #64748b;
    flex-basis: 100%;
    margin: 0;
}
.zc-passcode-success {
    color: #16a34a;
    font-weight: 500;
}

/* Style cho khu vực xác thực inline mới */
#zc-inline-verify-section {
    background-color: #fefce8; /* yellow-50 */
    border: 1px solid #fde047; /* yellow-300 */
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}
.zc-verify-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0 !important; /* Ghi đè margin-bottom mặc định của zc-field-group */
}
.zc-verify-group label {
    margin-bottom: 0; /* Ghi đè margin-bottom của label */
    flex-shrink: 0; /* Không cho label bị co lại */
}
.zc-verify-group input {
    flex-grow: 1; /* Cho ô nhập chiếm hết không gian còn lại */
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}
.zc-verify-group button {
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.zc-verify-group button:hover {
     background-color: #2563eb;
}
#zc-verify-error-notice {
    margin-top: 10px;
    font-weight: 500;
    color: #dc2626;
    font-size: 0.9em;
}


/* BỔ SUNG RESPONSIVE CHO MÀN HÌNH NHỎ */
@media (max-width: 500px) {
    /* Điều chỉnh nhóm xác thực passcode trên mobile */
    .zc-verify-group {
        flex-wrap: wrap; /* Cho phép các thành phần xuống dòng */
    }
    .zc-verify-group label {
        flex-basis: 100%; /* Label chiếm 1 hàng */
    }
}